> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Howard Brazee
> Sent: Tuesday, October 17, 2006 1:59 PM
> To: [email protected]
> Subject: FTP has extra CR
> 
> A vendor has been FTPing a file from their mainframe to our Unix
> machine, and we have been FTPing it up to our mainframe.   These have
> been character FTPs, not binary.    I looked at their script 
> and it has
> record size and block size of 80,800.    
> 
> Our mainframe file has after every line a line with a single hex 0D on
> it.
> 
> Do one of us need to change an FTP parm?

Do you mean that every line on the file ends with an 0x0D? Or that you
have a line consisting of a single 0x0D after each data line? I.e. the
0x0D is on a line by itself?

If there is an extra 0x0D at the end of each line, then look at the file
on your UNIX machine. I will bet that there is an extra x0D there. To
me, this implies that somewhere along the line, there was an ASCII ftp
to a Windows machine (which uses 0x0A0D for a line end sequence)
followed by an BINARY ftp to a UNIX machine.

I cannot prove the above, but it has been my experience in the past.

Depending on what programs are available on your UNIX box, you might be
able to use the program "dos2unix" to remove the extra 0x0D on the UNIX
box before ftp'ing to the z/OS system. Another possibility if you don't
have "dos2unix"(not quite as nice) is to use the "tr" command on the
UNIX box to delete the 0x0D. This requires a command similar to:

tr -d '\r' <input.file.with.x0Ds >output.file

Then ftp the "output.file" to your z/OS system. Note that if you ftp
onto a z/OS UNIX file instead of a legacy dataset, you can run the "tr"
on the z/OS system, then use OCOPY or OGET to copy the data into a
legacy dataset (or use PATH= in your batch JCL to directly read the UNIX
file).

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited. 
 

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

Reply via email to