Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Posts
    46

    Unanswered: Load Query using Method L

    I am new to DB2 , and I have been using pipe delimited files for loads using coldel|, but now my source is fixed width flat file,

    Can any one give example of using Load query using method L ,

    My input file is a fixed width flat file with 10 columns and i know have to use method L option in load query, can any one give an example of how to use ??


    Thanks
    Mark.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Have you had a chance to look at the Command Reference ??

    Cheers
    sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jun 2004
    Posts
    46
    HTML Code:
    METHOD--+-L--(----column-start--column-end-+--)--+------------------------------------------------+-+-'

    but here what does column start and end require ?? is it , start and end for all the 10 columns?? like Method L 1,10 11,5 16,2 etc...


    Thanks
    Mark

  4. #4
    Join Date
    Jun 2004
    Posts
    46
    I got the answer, thanks for your suggestion..


    Thanks
    Mark

  5. #5
    Join Date
    Jun 2004
    Posts
    46
    HTML Code:
    EM060DBX229220040501  2     1001D200405EM0606236000555041110
                                                 25.002004-08-17GEAC - AP Master    LOD
    To Load above fixed width data into a table i am using following querey but i am getting invalid datetime string representation error... but i don't see anything wrong... can any one throw some light for the cause of error..

    Code:
    db2 "Load From $DATASOURCE/$DATAFILE.sort of ASC method L ( 1 5,6 6,7 12,13 22,23 23,24 29,30 32,33 33,34 37,38 39,40 44,45
    ,47 51,52 55,56 58,59 60,61 68,69 69,70 85,86 87,88 134,138 162,163 177,178 187,188 207,208 210 ) SAVECOUNT 50000 messages
    TASOURCE/$DATAFILE.TXT tempfiles path $DATASOURCE replace into $TABLENAME statistics yes with distribution and detailed ind
    s all nonrecoverable"

    Thanks
    Mark.

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You'll need to include the following option in the LOAD command:
    Code:
    ...MODIFIED BY dateformat="YYYYMMDD"
    or whatever your date format is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •