View previous topic :: View next topic
|
Author |
Message |
RSR2011
New User
Joined: 02 Mar 2011 Posts: 1 Location: Chennai, India
|
|
|
|
Hi,
I have written a DB2 load utility that loads a tab delimited file ftpd from SQL server. For one of the columns defined as VARCHAR in DB2, we receive data with a quotation mark in the beginning (") without an ending quote. The load utility throws a delimiter mismatch error and rejects this record.
I have following two questions:
1. Is there an option in DB2 Load to avoid the default CHARDEL value (")? I saw that DB2 unload utility has an option 'NOCHARDEL' but an option in LOAD.
2. Also is there a way to make the utility skip the problematic column and load rest of the columns instead of skipping the entire row?
Code: |
input row "QTR RND WM11 BAM 12X13X4
Error message DSNU1143I DSNURILD - RECORD 156058 WILL BE DISCARDED DUE TO DELIMITER MISMATCH FOR COLUMN NAME |
|
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
One option would be to 'scrub' the data before doing the load.
You could use Fileaid or a Sort product to do this.
The purpose of the DB2 load utility is to just do that LOAD.
It has every expectation that the data given to it is clean.
This would be my approach.
Ignore me if you will. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
why don't you look in the manual for the load statement.
You would have found
LOAD ... FORMAT DELIMITED {[CHARDEL'"' |CHARDEL chardel]}
so maybe try CHARDEL 'ยง' or some other strange character that does not appear in your input |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
since you are getting garbage from an outside source,
you could try running the file thru DFSORT and inserting a '"' where necessary. |
|
Back to top |
|
|
|