In a recent note, McKown, John said:

> Date:         Wed, 28 Jun 2006 08:05:14 -0500
> 
> Perhaps I'm confused, but I am fairly sure that z/OS UNIX text files are
> 
IBM has done its best to confuse us on this point.

> delimited by the x'15' code point. This is not an LF (Line Feed). It is
> a NL (New Line). All other UNIX systems use LF (Ascii x'0A') as the "end
> of line" delimited. IBM for some reason chose NL. An EBCDIC LF is 0x25.
> This is why a simple "iconv" of a ASCII UNIX file, ftp'ed to z/OS via
> BINARY, results in a "bad" EBCDIC file if you do:
> 
> iconv -t IBM-1047 -f ISO8859-1 <ascii.unix.file >ebcdic.unix.file
> 
> The 0x0A "line delimiters" in "ascii.unix.file" will be converted to
> 0x25 in the "ebcdic.unix.file" when they really need to be 0x15. The
> conversion is technically correct because ASCII 0x0A is LF, which is
> EBCDIC 0x25. But the z/OS UNIX expects 0x15 as the "line delimiter".
> Again, because ASCII UNIX system use "Line Feed" as the delimiter
> whereas as z/OS UNIX uses "New Line". These are different characters and
> thus different code point.
> 
Actually, no.  The experiment:

    [EMAIL PROTECTED]:134$ uname -a
    OS/390 MVS3 15.00 03 9672
    [EMAIL PROTECTED]:135$ awk 'BEGIN { printf( "%c", 10 ); exit } END' | od -x
    0000000000      0A15
    0000000002
    [EMAIL PROTECTED]:136$ awk 'BEGIN { printf( "%c", 10 ); exit } END' | iconv 
-fISO8859-1 -tIBM-1047 | od -x
    0000000000      153D
    0000000002
    [EMAIL PROTECTED]:137$

Evidently IBM makes an exception for this case, and implements the
effect of the OEMVS311 conversion table, which is, as you note,
quite practical but technically _incorrect_.

IBM ought to relieve the confusion and permit technical correctness
by defining YA code page, identical to IBM-1047 except for having
LF at 0x15 and NL at 0x25.  This would enable coders, particularly
those not versed in the IBM tradition to wite conversion routines
"by the book" with no exceptions or footnotes to accommodate.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

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