Linefeed in Unix files 
Author Message
 Linefeed in Unix files

Someone was complaining about line-feed in the line sequential files
versus the mainframe-like sequential files under unix.
Well, this reminds me of the situation under MS-DOS.  The typical MS-DOS
text file is delimited by Carriage return/Line feed.  The mainframe
files are delimited by length typically.

Using Micro Focus cobol under the PC environment, I learned early on
that it was easier to make the adjustment to the PC environment and
specify input files as line sequential, so that I could use native
text editors to look at the input.

However, there is a work-around.  Using SPF386 from Command Technology,
the editor handles such things as EBCDIC input, length delimited as
opposed to native CR/LF delimited files.

However, under UNIX, the typical text file is delimited with the linefeed
character.  So, if you want to use the typical tools such as vi, cat
and so forth, you had better use line sequential.

Perhaps another option would be to write a C utility or a COBOL utility
that will convert sequential to line sequential, and another that
converts the other way.

You could setup a loop and every time the character was '\n' then you
could skip that character, and in the other direction, you could add
the '\n' character every N bytes where N is the LRECL...

Chris Mason
"The Unknown COBOL Programmer"
The opinions expressed are mine, not my Employers.

LMSC5:  Tons of Beautiful Big Blue Iron...

Sat, 23 Aug 1997 00:00:08 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Unix Data files vs DOS data files

2. Apache Password File And Unix File Semantics Question

3. replacing ^M characters with linefeed

4. linefeeds in sed

5. Removal of a linefeed in

6. C3.1 Dos Printer LINEFEED Problem

7. Document editor that strips linefeeds?

8. Binary output to stdout without linefeeds, possible?

9. How do I parse with respect to a Linefeed character

10. RDE linefeeds

11. Carriage Return without a linefeed on Win95?

12. Linefeed Character


Powered by phpBB® Forum Software