> -----Original Message----- > From: Linux on 390 Port [mailto:[email protected]] On > Behalf Of Al Dunsmuir > Sent: Friday, June 04, 2010 9:08 AM > To: [email protected] > Subject: Re: tar extract - code conversion. > <snip> > John > > There are 2 different EBCDIC character line termination conventions. > > EBCDIC CR (x0D) + LF (x25). > I believe this originated from BiSync, and was a direct translation > of Teletype ASCII. This tended to be associated with traditional > MVS processing. > > Equivalent to ASCII CR (x0D) + LF (x0A) used by DOS and Windows > > EBCDIC NL (x15) Newline > This was used by VM (perhaps originating from 3715 printer?). > It was in turn used by the C/C++ compilers on VM/MVS/zOS. > > Equivalent to ASCII LF (x0A) convention used by UNIX. It is natural > and a good thing that Linux followed this convention. > > The ASCII NEL (x85) is normally associated with Unicode (UTF-8) > encoding. See http://en.wikipedia.org/wiki/Newline. In a few months > I'm going to be playing with EBCDIC<>ASCII in Unicode, so I'm not sure > of all the details on z/OS. The latest (zOS XL 1.11) C/C++ compiler > does add Unicode support, so those and the LE docs will be my first > stop. > > The iconv function reflects the LE iconv function operation, and I do > agree that it can be a pain. It associates the output line terminator > based on the "to" code page selected. IBM-037 (traditional MVS) gets > you CRLF. IBM-1047 (UNIX System Services) gets you NL. > > What was the command line that you used which resulted in NEL instead > of NL when converting to ASCII? > Al
When I use pax on z/OS UNIX to do my conversion, I use: pax -ofrom=IBM-1047,to=ISO8859-1 -wvf file.pax list.of.files and my ISO8859-1 files are good on Linux when I use tar to unwind them. The problem comes if I don't do the conversion on z/OS using pax. In that case, I transfer the IBM-1047 encoded files via pax, unwind on Linux, then convert from IBM-1047 to ISO8859-1 on Linux. The iconv on Linux converts the NEL (0x15 EBCDIC) to 0x85. So after the iconv, I need a tr to convert \205 to \012 (octal equivalents of 0x85 and 0x0a). -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
