Previous Topic Next topic Print topic


L2 run-time switch

Determines the character(s) to be used as the record terminator when reading a line sequential file.
Restriction: These switches are supported for native COBOL only.

Properties:

Default: Off
Type: File handling

Comments:

When off (-L2), x"0A" is taken as the record terminator.

When on (+L2), x"0D0A" is taken as the record terminator. This provides compatibility with earlier versions of this system, correctly reading files written using a WRITE ... AFTER ADVANCING statement.

This switch only affects read operations and not write operations.

Use of the +L2 switch is in many respects unnecessary for the majority of applications. The File Handler is able to recognize line sequential delimiters for data files created, irrespective of the platform on which the files are processed. Using this method to change the delimiters will not result in the user record area ever containing x'0D' characters (unless escaped using the INSERTNULL option) because these are discarded as noise characters by the File Handler. This is in contrast to OCDS behavior.

Previous Topic Next topic Print topic