Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Posts
    8

    Smile Unanswered: Load file but skip header and trailer records

    I want to load db2 table from a file that contains say 100 records with one header(1st record in file) and one trailer record. Is there any way to LOAD the 98 records (100 - 2 hdr/trl records) without pre-processing the file. Is there a parameter to LOAD command that can do this.

    Thanks!

  2. #2
    Join Date
    Apr 2003
    Posts
    191

    Re: Load file but skip header and trailer records

    Hi,

    you can try WARNINGCOUNT 2 and hope header and trailer record get dumped.

    Cleanest way would be to extract them beforehand.

    Johann

    Originally posted by voorkey
    I want to load db2 table from a file that contains say 100 records with one header(1st record in file) and one trailer record. Is there any way to LOAD the 98 records (100 - 2 hdr/trl records) without pre-processing the file. Is there a parameter to LOAD command that can do this.

    Thanks!

  3. #3
    Join Date
    May 2003
    Posts
    8

    Re: Load file but skip header and trailer records

    Originally posted by jsander
    Hi,

    you can try WARNINGCOUNT 2 and hope header and trailer record get dumped.

    Cleanest way would be to extract them beforehand.

    Johann
    Thanks for the response!

    The problem is that in some tables the header and trailer record data gets loaded without any error / warning due to character data structure in the tables. I am thinking about using the "NOHEADER" LOAD parameter to skip header record and calc'ing the number of rows - 1 and passing it to "ROWCOUNT" LOAD parameter to skip the trailer record.

  4. #4
    Join Date
    Apr 2003
    Posts
    191

    Re: Load file but skip header and trailer records

    Hi,

    afaik NOHEADER pertains to parallel loads and won't help with this problem at all.

    Johann

    Originally posted by voorkey
    Thanks for the response!

    The problem is that in some tables the header and trailer record data gets loaded without any error / warning due to character data structure in the tables. I am thinking about using the "NOHEADER" LOAD parameter to skip header record and calc'ing the number of rows - 1 and passing it to "ROWCOUNT" LOAD parameter to skip the trailer record.

Posting Permissions

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