Monday, 28 July 2014

COBOL Fixed-length versus variable-length records

A file is used to to store data for further processing in form of records, a record can be of two type i.e. Fixed length or Variable Length. 

Although most files contain fixed-length records, some files contain variable-length records. These records are usually blocked too.

When a COBOL program reads a variable-length record, it needs to determine what the length of the record is. When a program writes a variable-length record, it must provide the length of the record.

The following examples show how the FD entry might look for a line-sequential file:

Created with Artisteer

No comments:

Post a comment