Posted: Tue May 13, 2008 12:09 pm Post subject: reading ASCII on server, writing to M/F
Apologies in advance if this topic is covered elsewhere. I searched for refrences to this issue but could not find any.
My issue is this. I'm trying to read an ASCII file with CR/LF at the end of each record in order to write that file to a fixed blocked file on the mainframe.
The CR/LF is ignored at the end of the ASCII records so they are being picked up as one large record. I've yet to find a way of forcing the CR/LF to be recognized as end-of-record. Record volumes vary greatly on these files so parsing on the M/F side is not a solution.
My JCL is as follows. Any suggestions or references to other topics that I have missed in my searches would be greatly appreciated.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue May 13, 2008 12:38 pm Post subject:
jrever,
what format are you using to FTP ? The FTP protocol for ASCII stream transfer requires two byte (carriage return, line feed) (x'0D0A') which the receiving end (z/OS) treats as line/record break. Unix has only LF (line feed) char (x'0A') which Unix expects as a record/line delimiter in text (character) files. Make sure the file has x'0D0A' at the end of every record
The ASCII file does indeed have the CR/LF characters hex'0D0A' terminating each line. When the records come across as one big stream the CR/LF are not included.
So something is stripping them off. _________________ jrever
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum