DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
BradMiller



Group memberships:
Premium Members

Joined: 18 Feb 2008
Posts: 87
Location: Sacramento, CA
Points: 712

Post Posted: Tue Dec 18, 2018 11:36 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
Hi ,

I have a sequential file which is pipe delimited that has around 300 fields. Each field has field width specified as well. For eg: Gender varchar(1).
I want to capture the rows that violate the field width. For eg: If I get gender value as "M*" , currently the sequential file stages reads the record, truncates "M*" to "M" and loads it into the Database.
Is there a way I can reject this record to a file?.
I want to capture the reject if any of the 300 field values violate the field width. So checking the length in a transformer is kind of tedious.

Any other easy way to do this?.

Thanks!
BradMiller



Group memberships:
Premium Members

Joined: 18 Feb 2008
Posts: 87
Location: Sacramento, CA
Points: 712

Post Posted: Tue Dec 18, 2018 5:04 pm Reply with quote    Back to top    

Found out that we can use the below environment variable in the job to capture the records with fields that run over the defined limit in metadata.

$APT_IMPORT_REJECT_STRING_FIELD_OVERRUNS=True

https://www.ibm.com/support/knowledgecenter/en/SSZJPZ_9.1.0/com.ibm.swg.im.iis.ds.parjob.adref.doc/topics/r_deeadvrf_APT_IMPORT_REJECT_STRING_FIELD_OVERRUNS.html
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2855
Location: USA
Points: 21702

Post Posted: Wed Dec 19, 2018 3:50 am Reply with quote    Back to top    

Good find! Thank you for sharing it.

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours