Page 1 of 1

Sequential File Output Format

Posted: Fri Aug 03, 2007 4:11 pm
by gsbrown
I'm needing help producing a sequential file that will append a \n at the end of every row (except the last one) and the last row end with an EOF character that is used in Linux.

Is there a painless way to do this? Is there a setting within the sequential file stage that would do this without concatenating the '\n' to the end of my last column in the transform. How would I append the final EOF character after the last row?

Thanks,
Greg

Posted: Fri Aug 03, 2007 4:28 pm
by chulett
So, build it on a Windows server for eventual consumption by Linux? You shouldn't have to do anything special, just tick the Line Termination option for 'UNIX Style' and then if you don't want one on the last line enable the 'Omit last new-line' option as well. Shouldn't be any more difficult than that, I would think.

Posted: Fri Aug 03, 2007 4:34 pm
by ekempd
Do a after job custom routine that open de file and change the last character..

Posted: Mon Aug 06, 2007 6:38 am
by gsbrown
Sorry, I misunderstood our client.

They didn't physically want an ASCII '\n' at the end of every row. I generated the file using the Unix(CR LF) option checked, instead of DOS, and they were able to process the file just fine.

Haven't ever had to think outside the DOS box until now :oops:

Greg

Posted: Mon Aug 06, 2007 6:46 am
by chulett
Right, they didn't want the physical characters "slash n" but rather what that stands for - a 'newline'. And it means different things on different systems as you've just found: for UNIX a LF, for DOS a CR/LF pair, etc.

Perhaps a little much, but a Wiki on the subject:

http://en.wikipedia.org/wiki/Newline