If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Signal on rejected rows when importing data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-08-11, 07:17
rwgieseler rwgieseler is offline
Registered User
 
Join Date: Apr 2004
Posts: 6
Signal on rejected rows when importing data

How do I flag this condition? I am running several imports via a table driven Unix (ksh) script. When I get any rows skipped or rejected, I want to be notifiied. I have a check in my script for checking rc != 0, but rc is 0 so no email is generated. Thanks.

The commands I am using is as follows:

db2 "import from ${datadir}/${tabname}.ifx of ixf COMMITCOUNT ${commitCountRule} messages ${msgdir}/${tabname}.msg INSERT_UPDATE into ${schname}.${tabname}"

rc=$?

Importing with no special format: default. tabname: LKP_FORM_DOC_MAP

Number of rows read = 3362
Number of rows skipped = 0
Number of rows inserted = 0
Number of rows updated = 0
Number of rows rejected = 3362
Number of rows committed = 3362

Import rc = 0
DB20000I The SQL command completed successfully.
Reply With Quote
  #2 (permalink)  
Old 02-08-11, 07:55
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by manual
WARNINGCOUNT n

Stops the import operation after n warnings. Set this parameter if no warnings are expected, but verification that the correct file and table are being used is desired. If the import file or the target table is specified incorrectly, the import utility will generate a warning for each row that it attempts to import, which will cause the import to fail. If n is zero, or this option is not specified, the import operation will continue regardless of the number of warnings issued.
IMPORT - IBM DB2 9.7 for Linux, UNIX, and Windows
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On