Capture warning records in Sequential file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
BradMiller
Premium Member
Premium Member
Posts: 87
Joined: Mon Feb 18, 2008 3:58 pm
Location: Sacramento, CA

Capture warning records in Sequential file

Post by BradMiller »

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
Premium Member
Premium Member
Posts: 87
Joined: Mon Feb 18, 2008 3:58 pm
Location: Sacramento, CA

Re: Capture warning records in Sequential file

Post by BradMiller »

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/knowledgece ... RRUNS.html
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

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
Post Reply