Topic
2 replies Latest Post - ‏2011-05-19T08:39:42Z by SystemAdmin
SystemAdmin
SystemAdmin
3105 Posts
ACCEPTED ANSWER

Pinned topic DB2 LOAD Utility, no discards

‏2011-05-18T09:18:17Z |
Hi all,

how can I tell the DB2 Load Utility to stop if any row is subject to discard ?
DISCARDS 0 means no limit, all rows can be discarded
DISCARDS 1 means at least one row can be discarded

I'm working with DB2 V9.1

Thanks in advance for your help
Updated on 2011-05-19T08:39:42Z at 2011-05-19T08:39:42Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    3105 Posts
    ACCEPTED ANSWER

    Re: DB2 LOAD Utility, no discards

    ‏2011-05-18T11:20:42Z  in response to SystemAdmin
    tsx, Not sure of exactly what you goal is but DISCARD 1 is what you want if you want the Load to abend on the first Discard row found.

    
    DISCARDS integer   Specifies the maximum number of source records that are to be written on the discard data set. Integer can range from 0 to 2147483647. If the discard maximum is reached, LOAD abnormally terminates, the discard data set is empty, and you cannot see which records were discarded.
    


    So when the Load finds 1 discard row, the Load will abend and the row will be deleted from any Discard file you may have allocated.
  • SystemAdmin
    SystemAdmin
    3105 Posts
    ACCEPTED ANSWER

    Re: DB2 LOAD Utility, no discards

    ‏2011-05-19T08:39:42Z  in response to SystemAdmin
    SDas, thanks for the hint, indeed DISCARDS 1 is want I wanted, I think I mixed something up. I thought one row can be discarded but it means if at least one row is subject to discard DB2 will abend.