Processing line-sequential files

Line-sequential files reside in the z/OS® UNIX file system and can contain both printable characters and control characters as data. Each record ends with an EBCDIC newline character (X'15'), which is not included in the record length.

About this task

Because line-sequential files are sequential, records are placed one after another according to entry order. Your program can process these files only sequentially, retrieving (with the READ statement) records in the same order as they are in the file. A new record is placed after the preceding record.

To process line-sequential files in a program, code COBOL language statements that:

  • Identify and describe the files in the ENVIRONMENT DIVISION and the DATA DIVISION
  • Process the records in the files in the PROCEDURE DIVISION

After you have created a record, you cannot change its length or its position in the file, and you cannot delete it.