Reading an entire row from sequential file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
patonp
Premium Member
Premium Member
Posts: 110
Joined: Thu Mar 11, 2004 7:59 am
Location: Toronto, ON

Reading an entire row from sequential file

Post by patonp »

I'm almost embarrassed to ask this question, since it seems so simple, but here goes...

I'm attempting to read the entire contents of a row from a sequential stage into a single column. The rows within the source file have varying lengths and may contain any ASCII value. I've defined a single column in my sequential file stage, and I've tried specifying a variety of delimiters (including 000), but in each case at least one row in the data appears to contain the delimiter value and throws up a "too many columns in record" error.

Any suggestions?

Thanks!

Peter
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you tried delimiters such as ctrl-Y (025) or ctrl-A (001) ? How about something above 128, say 170 (which I chose at random) ? Or 255 or 254 ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Re: Reading an entire row from sequential file

Post by ArndW »

patonp wrote:...The rows within the source file have varying lengths and may contain any ASCII value...
If the line terminator can be part of the data and is not quoted you really have no means of determining what a "line" consists of. In case like this you usually parse the data in the job according to some other rules, so I've found it best to arbitrarily set a fixed width column with no terminators of any sort, and then modify the data myself in the job.
patonp
Premium Member
Premium Member
Posts: 110
Joined: Thu Mar 11, 2004 7:59 am
Location: Toronto, ON

Post by patonp »

Thanks folks...

In the end, I cheated by switching over to the parallel canvas and defining my sequential file delimiter as "none". Seemed to work ok.
Post Reply