To add to a line-sequential file, open the file as EXTEND and use the WRITE statement to add records immediately after the last record in the file.
Blanks at the end of the record area are removed, and the record delimiter is added. The characters in the record area from the first character up to and including the added record delimiter are written to the file as one record.
Records written to line-sequential files must contain only USAGE DISPLAY and DISPLAY-1 items. Zoned decimal data items must be unsigned or declared with the SEPARATE phrase of the SIGN clause if signed.
related tasks
Opening line-sequential files
Reading records from line-sequential files
Closing line-sequential files
Defining and allocating line-sequential files
related references
OPEN statement (Enterprise COBOL Language Reference)
WRITE statement (Enterprise COBOL Language Reference)