Sequential file truncating integer

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
bgs
Participant
Posts: 22
Joined: Sat Feb 05, 2005 9:43 pm

Sequential file truncating integer

Post by bgs »

Hi,
I have a parallel job with sequential file as source,and delimeter is ",". Input file has few integer columns. I noticed that if the value received in the integer field is "1 2" sequential file is reading "1" and truncating the rest. Did anyone have this issue and can I reject such records to reject link?
Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Sequential File stage scans the input stream until it finds a character that isn't part of an integer (or a delimiter) and returns that. Then it scans to find the next field or record delimiter. So it's working as designed.

Technically, the value "1 2" is NOT an integer, so maybe you need to set up a Filter command to tidy up the data. Or get "them" to provide clean data in the first place.

Beyond that, you could try reading the field as a VarChar data type, then use IsValid() function to detect whether or not it is a valid integer. "1 2" will fail that test.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply