Load from cursor rejecting rows of data. How can I determine which rows are rejected?
Posted on 2010-09-23
Question: Hello all,
I am loading from cursor a particular table which is range partitioned from the mainframe DB2 z/os machine to DB2 on a AIX box. Ok, now I went on to load the table and got the following statistics:
Number of rows read = 10149185
Number of rows skipped = 0
Number of rows loaded = 10148630
Number of rows rejected = 555
Number of rows deleted = 0
Number of rows committed = 10149185
Is there a way to determine the rows being rejected? Is it possible to write rejected rows to another file? I have tried to use the "modified by dumpfile = filename" option of the Load utility such as thi "db2 "LOAD FROM LOAD_CUR11 OF CURSOR messages load.msg modified by dumpfile = rca_load_rejects.txt REPLACE INTO PADBA001.PADTB_AR_TRANSACTION nonrecoverable" but got error "SQL0104N An unexpected token "modified" was found following "<identifier>". Expected tokens may include: "REMOTE". SQLSTATE=42601"
Then I reposition the dumpfile option like this "db2 "LOAD FROM LOAD_CUR11 OF CURSOR modified by dumpfile = rca_load_rejects.txt messages paw_ar_transaction.msg REPLACE INTO PADBA001.PADTB_AR_TRANSACTION nonrecoverable" and got a different error:
SQL3016N An unexpected keyword "dumpfile" was found in the filetmod parameter
for the filetype.
Does this mean I can't use modified by dumpfile in this context? Anyway I can do what I need done which is to trap rejected rows?
Any help will be highly appreciated.