Special Note:        

Because the EOL, LRECL, and RECFM settings are logically intertwined in controlling how your fiiles are read and written, validating and changing these critical values needs to be done together. All three of these commands are handled by a single command processor to ensure that no illogical combinations of operands are created.


This means that the DCB command can be used to alter any of these critical values, either singly, or in combinations.


When one or more of the 3 categories (RECFM, LRECL  EOL) are omitted the existing values are swapped in for the purposes of validation.


e.g. if DCB EOL CRLF is entered, the existing values for LRECL and RECFM will be assumed for the validation process.


Syntax


DCB

?




[ RECFM xxx ]  [ LRECL nnn ]  [ EOL yyy ]



Where:

?

Display the current settings.





RECFM xxx

XXX may be:


U        The file uses Undefined type records. i.e. The records are separated by unique delimiters which should be specified using the EOL operand.


F        The file uses Fixed record length records. Fixed records may or may not also use unique delimiters. If delimiters are also used, the specific delimiters should be set via the EOL operand. As well, the length of the fixed records should be set via the LRECL operand. 


V        The file uses Variable record format. Typically this means it originated at an IBM mainframe site or from an emulator (such as Hercules). If so, then EBCDIC would probably also need setting via the SOURCE command. Note this support is only for unblocked variable, SPFLite does not support VB or VBS record formats.


VBI        The file uses variable format where a 4 byte RDW (Record Descriptor Word) precedes the record data. The RDW contains the length of the data, not including the RDW itself. VBI indicates the word is in 'Big-endian' format.


VLI        The file uses variable format where a 4 byte RDW (Record Descriptor Word) precedes the record data. The RDW contains the length of the data, not including the RDW itself. VLI indicates the word is in 'Little-endian' format.



LRECL nnn

Conventional Windows text files are simple text lines delimited by an End-Of-Line sequence, usually the control characters CR/LF. 


Text records may be any length from zero up to the systems maximum string length (2 gig), though in practice, text lines are never so long. A conventional Windows text file has the following record format information in its Profile: RECFM=U, LRECL=0,EOL=CRLF


For SPFLite, LRECL generally means the fixed logical record length. Specifying record-length = 0 does not mean the value is zero, but rather, that there is no (arbitrary) length.


Files originating on a mainframe or a nonstandard system may contain a fixed-length record format. This parameter allows you to specify a given fixed length for a record. 


Fixed-length records may be stored either with or without End-of-Line (EOL) characters. The value refers to the data length, without regard to the presence of delimiters. 


If you wish to edit a file with no End-of-Line delimiters at all, you would specify EOL as NONE. File types declared with NONE must have a defined record-length value that is not 0 (zero). You would also have record-format = F to signify a fixed-length file, or record-format V to signify a variable-length file that contains Record Descriptor Words (RDW's) instead of EOL delimiters.



EOL yyy

The following are supported for yyy:


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


CRLF                        Use the carriage return / Line Feed pair 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 NewLine character as the line separator.


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        

       



Description


These three settings control the record deblocking and deblocking to be used when reading/writing the file. The values are stored in the file Profile and are used when reading and writing the files.


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


Handling of End-Of-Line AUTONL


Note:  AUTONL is used to allow for lone CR characters in a text file.  


Lone CR characters will always be treated as a new line request,


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 AUTONL are handled as follows:


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


    • Scrolling commands UP PAGE and DOWN PAGE will locate these marked lines.


    • Since UP PAGE and DOWN PAGE will move the file to these =PAGE marker lines, which may have a variable number of lines involved, to regain the ‘full screen motion' that UP/DOWN PAGE does in other files, you can use a scroll amount of HALF or DATA, or you could enter a numeric value for a specific number of lines. For most users who would have used UP/DOWN PAGE, UP/DOWN by the DATA scroll amount should work well for them.


    • When you have a file that shows this =PAGE> marker on a line, and you PRINT this file, you will have a Form Feed sent to the printer for every line containing the =PAGE> marker.


Both a lone LF (line feed) or a lone CR (carriage return) will be 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.


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: Effortlessly optimize your documentation website for search engines