On Thu, May 28, 2015 at 10:29 PM, Ze'ev Atlas <
[email protected]> wrote:

> Hi allI am dealing with some C package on classic z/OS (PDS/E, no USS).
> When C reads text files it inserts 0x15 in the end of the record (it goes
> that far as to drop the trailing blanks and substitute them with one 0x15
> for fixed length records, but I think that there is an option to override
> that).  0x15 is defined as New Line, but there is a separate character,
> 0x25 that is defined as Line Feed.  Does anybody know why do we need two
> characters that seem to do the same thing (besides the evil desire to
> confuse the poor user :)  Ze'ev Atlas
>

​0x15 is _NOT_ a Line Feed character. It is a New Line (NEL) character from
the 3215 console days. In EBCDIC, 0x25 is the true Line Feed character. On
the 3215, the NEL​

​was a single byte which did a carriage return and line feed operation all
in one. If you sent a 0x15 (LF) to a 3215, the platen (roller) would
advance one line, but the print head would remain stationary.

As a side note (as I have heard it), the reason that Windows uses CRLF as a
line ending is because MS-DOS did the same. MS-DOS used CRLF because CPM-80
used CRLF. And, finally, CPM-80 used CRLF because the common printers at
the time could not do a carriage return / line feed in a single operation.
So, Gary Kindall (author of CPM-80) decided to end text files with CRLF so
that he didn't need to complicate the printer driver to put a LF in when a
CR was detected. This made good sense in the day that 64K RAM and a 1 Mhz
8080 was top of the line equipment for the hobbyist.

-- 
My sister opened a computer store in Hawaii. She sells C shells down by the
seashore.

If someone tell you that nothing is impossible:
Ask him to dribble a football.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to