COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-300
WRITE for Line Sequential Files
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:
°
Action of the WRITE Statement
°
File-Status Data Item
°
Reel-Swap Sequence for Multiple-Reel Tape Files
°
Buffered Cache
record-name
WRITE
FROM from-name END-WRITE
VST631.vsd