EOL - Set End-Of-Line Handling

Syntax


EOL

[ CRLF | CR | LF | NL | AUTO | AUTONL | hh | hhhh | NONE ]


Operands


CRLF

Use the carriage return / line feed combination as the line separator.


CR

Use the carriage return character as the line separator.


LF

Use the line feed character as the line separator.


NL

Use the new line character as the line separator.


AUTO

Automatic detection of line separators is performed, with lone CR characters used to overprint.  See discussion below.


AUTONL

Automatic detection of line separators is performed, with lone CR characters treated as new lines.  See discussion below.


hh

Where 'hh' may be any two valid hex characters. The resulting character will be used as the line separator.


hhhh

Where 'hhhh' may be any four valid hex characters. This two character string will be used as the line separator


NONE

There are no line separator characters used.  The file must have an LRECL value greater than 0 which will be used to perform the line separation function


Description


The EOL setting is stored in the file type's profile and is used when reading and writing files to support handling different file formats.  


The command itself has no default; you must specify a line-delimiter operand.  SPFLite will assume a never-before seen file-type uses CRLF, the standard delimiter in Windows.


For additional information on these values and their effect, see "Handling Non-Windows Text Files".


The value is stored as part of the PROFILE options which are maintained individually by file type.


Handling of EOL AUTO and EOL AUTONL


The End of Line options EOL AUTO and AUTONL allow for automatic detection of  line terminations, possibly containing inconsistent and spurious line terminators, so that files edited across different system, mainframe SYSOUT files, and other inconsistently-terminated text files can be opened, viewed and edited in a reasonable way.  


EOL AUTO and AUTONL may be applied to non-mainframe files as well, to handle situations where a file's line termination is inconsistent for some reason.  A possible cause of this is a file shared between Windows and Unix on a network and edited with different editors applying different line endings.


Line terminations under EOL AUTO and AUTONL are handled as follows:


FF characters delimit lines, and cause a =PAGE> marker to be placed in the sequence area.





A lone LF is treated as a line delimiter equivalent to CR,LF


SpuriousCR characters that seemingly don't belong there, such as CR,CR,LF are ignored.  For example, in the sequence CR,CR,LF, the first CR is spurious; the remaining CR,LF is a normal line termination.


A CR,FF or CR,LF,FF sequence is considered as the end of one line, followed by a page separator line.  


A hex value of X'1A' (Ctrl-Z) at the end of the file is ignored.


Choosing between EOL AUTO and EOL AUTONL


A “lone CR” character – that is, a CR not followed by LF, FF or another CR – is sometimes produced by software that attempts to overprint the data in order to simulate underscores or bold print.  It may also exist in non-Windows text files; older versions of Macintosh and some lesser-known systems used CR as a line termination.  


Because of this, a lone CR character might be used for two different, conflicting purposes.  


To handle this, you may choose between EOL AUTO and EOL AUTONL.  These two options work as follows:


For all but the “lone CR” situation, EOL AUTO and EOL AUTONL work identically.


Action taken for EOL AUTONL:  CR = New Line


When EOL is set to AUTONL and SPFLite detects a lone CR in a file, the CR is considered to be a “new line” and is treated as if the lone CR were actually a normal CR/LF line termination.


Action taken for EOL AUTO:  CR = Overprint


When EOL is set to AUTO and SPFLite detects a lone CR in a file, it is considered to be an overprint request.  At this point, SPFLite will buffer the lines involved in the overprint request until a ‘normal' line terminator is found, and then attempts to simulate an overprint.  This means that, on a column-by-column basis, it examines the characters that are attempting to ‘occupy' the same column at the same time.  For each two characters involved in this way:






Note for Hercules users


Hercules users are familiar with a utility called HercPrt, which (among other things) has the ability to take a SYSOUT file and format it into a PDF file that looks remarkably like a computer printout on "green bar" paper - complete with sprocket holes and perforation!  This is cute and very clever, but it also uses a large amount of disk space.  By using alternating background colors (along with EOL AUTO and PAGE ON mode), it is possible to very closely simulate the effect of a HercPrt-formatted file without the PDF disk-space overhead.  You will still be editing or browsing ordinary text files in native mode, but the display will have the look and feel of paging through an actual hard copy printout.


If you wish to match the same colors generated by the HercPrt utility, make the main background color white, and the alternative background color a light green.  A good starting point for a HercPrt-like light green color you could try is BRG value 233, 255, 233.  You may wish to tie the profile attributes to a specific file extension like SYSOUT.


Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation