On Mon, Oct 24, 2011 at 3:43 PM, McKown, John <john.mck...@healthmarkets.com
> wrote:

>
> On most ASCII UNIX system, the end-of-line character is a single LF
> (LineFeed) or 0x0A.
> On Windows, the normal end-of-line is a 0x0D0A (CRLF or
> CarriageReturn-LineFeed).
> On z/OS UNIX, in EBCDIC, the end-of-line character is the NL (NewLine) or
> 0x15. NOT 0x25. 0x25 is a CarriageReturn.
>
> When you create a file on an ASCII UNIX system, the lines end with a 0x0A.
> If you store this on a "share" where a Windows server can get at it directly
> and you use a Windows ftp client, the file in the z/OS UNIX system is "hosed
> up". Just as you have seen, the lines end with a 0x25 whereas they should
> end with a 0x15. I view this as an error in the Windows ftp client because
> it demands that text line end with CRLF instead of just LF. What you can do
> is have your UNIX process add the "extraneous" CR so that the lines end with
> a CRLF. There is usually a program called "unix2dos" which can do this. If
> you don't have "unix2dos", it can be done with a "sed" command: "sed -i
> 's/$/\r/' file.on.windows". At least, this works with GNU's sed. I don't
> know about others. Some don't expand \r to CR.
>
>
A very good explanation of an all-to-common problem.   Many non-M$ ftp
clients don't suffer the same stupidity.

<plug>
If you use Co:Z SFTP on z/OS and in text mode the default is to recognize
any combination of CR, LF, NL as a line terminator.   On output to Windows,
you can specify whether you want CRLF or LF.   With SSH/SFTP, you can use
any Windows client, such as the free popular PuTTY psftp command.   Co:Z
SFTP is free to use but enterprise license and support agreements are also
available.
</plug>

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

----------------------------------------------------------------------
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