COBOL Manual for TNS and TNS/R Programs
Using HP COBOL in the OSS Environment
HP COBOL Manual for TNS and TNS/R Programs—522555-006
19-22
WRITE Statement
END-REWRITE
ends the scope of the REWRITE statement, causing the REWRITE to be a
delimited-scope statement. If the REWRITE statement does not end with an END-
REWRITE phrase, the presence of the INVALID KEY or the NOT INVALID KEY
phrase causes the REWRITE statement to be a conditional statement, which ends
at the next period separator.
WRITE Statement
The WRITE statement for a line sequential file has this syntax:
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 cannot specify an index
data item.
END-WRITE
ends the scope of the WRITE statement, causing the WRITE to be a delimited-
scope statement.
record-name
WRITE
FROM from-name END-WRITE
VST631.vsd