COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
WRITE for Line Sequential Files
record-name
is a logical record described in the File Section of the Data Division. The record-name can
be qualified by the name of the file with which the record is associated. The data written is the
current contents of record-name.
from-name
is the identifier of a data area whose contents are to be moved to the record specified by
record-name before the WRITE occurs. from-name must specify a data area other than
that specified by record-name. It also cannot specify an index data item.
END-WRITE
ends the scope of the WRITE statement, causing the WRITE to be a delimited-scope statement.
If the WRITE statement does not end with an END-WRITE phrase, the presence of the AT
END-OF-PAGE, the NOT AT END-OF-PAGE, the INVALID KEY, or the NOT INVALID KEY phrase
causes the WRITE statement to be a conditional statement, which ends at the next period
separator.
Usage Considerations:
• See these usage considerations in WRITE for Sequential Files (page 487):
◦ Action of the WRITE Statement
◦ File-Status Data Item
◦ Reel-Swap Sequence for Multiple-Reel Tape Files
◦ Buffered Cache
WRITE for Relative, Indexed, and Queue Files
494 Procedure Division Verbs










