> -----Original Message-----
> From: Farley, Peter x23353
> Sent: Monday, October 24, 2011 6:22 PM
> To: 'IBM Mainframe Discussion List'
> Subject: RE: CRLF in Unix being translated on Mainframe to x'25'
> 
> > -----Original Message-----
> > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On
> > Behalf Of Lizette Koehler
> > Sent: Monday, October 24, 2011 4:10 PM
> > To: IBM-MAIN@bama.ua.edu
> > Subject: CRLF in Unix being translated on Mainframe to x'25'
> >
> > A programmer I am working with is getting a file from Unix which will be
> > sent to the mainframe.  This will be using FTP.
> >
> > The process is we receive the file from the Unix system and it is placed
> > on a Windows 2008 server.
> >
> > Then from the Windows 2008 it is going to be FTP'd to the mainframe.
> >
> > Is there a way to keep the CRLF command at the end of each line?  And
> will
> > the mainframe recognize it as a newline?
> >
> > What we really want is the UNIX file to be individual (FB Lrecl 946)
> going
> > into the mainframe.
> >
> > It seems the Unix CRLF is x'0A' whereas the mainframe is x'25'
> 
> Assuming for the moment you will be using the Windows 2008 FTP client to
> send the file, ISTM that the key is for the Unix FTP transfer to translate
> the Unix line ending (X'0A') into the Windows line ending (X'0D0A') when
> transferring the file to the Windows box.  Then the normal Windows FTP
> client will recognize the line endings (and Notepad will edit it properly
> as well).
> 
> Another alternative if that is not feasible from the Unix-Windows path is
> to use a Windows version of the Unix utility "utod" (unix-to-dos) to
> translate the line endings.  I believe Cygwin has a "utod" somewhere in
> one of the text-processing packages.  The DJGPP Unix ports to command-mode
> DOS (16-bit only) definitely have "utod" available.  That one may not
> survive to the next version of Windows though.  Win7 already stopped
> supporting 16-bit applications, so I'm sure the Server versions will
> follow soon (if they haven't already).
> 
> If the Unix-to-Windows transfer is being done as a binary transfer, then
> the Unix guys can do the translation on their end for you ahead of time,
> using either "utod" if they have it or they could use the "tr" utility to
> do the translation before they FTP the file to your Windows server.
> 
> As long as the Windows copy of the file has line endings X'0D0A' then even
> a mainframe-initiated transfer should preserve the record lengths.


I also just remembered to check the z/OS "SITE" parameters available when using 
the Windows FTP client to send to or receive from the z/OS FTP server.  This 
parameter is available and can be set to "LF" if you need to:

SBSENDEOL=value Specifies the line terminator for outbound SBCS
                ASCII data.  Value is CRLF, CR, LF, or NONE

I am not sure what "outbound" means in this description; it may only refer to 
receiving files from the mainframe rather than sending them to the mainframe.

HTH

Peter
--


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to