Page 1 of 1

Reading an entire row from sequential file

Posted: Thu Aug 02, 2007 2:27 pm
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

Posted: Thu Aug 02, 2007 3:03 pm
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 ?

Re: Reading an entire row from sequential file

Posted: Thu Aug 02, 2007 3:52 pm
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.

Posted: Fri Aug 03, 2007 3:44 pm
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.