COBOL Manual for TNS/E Programs (H06.03+)

Using HP COBOL in the OSS Environment
HP COBOL Manual for TNS/E Programs520347-003
19-19
REWRITE Statement
The INTO phrase is allowed only when either:
All records associated with file-name are defined as data structures or as
elementary alphanumeric items and data-name is either a data structure or
an elementary alphanumeric item.
Only one record is associated with file-name.
LOCK
keeps other programs from gaining access to the record retrieved until an
UNLOCKFILE or UNLOCKRECORD statement is executed. The file specified by
file-name must be associated with a disk device.
imperative-stmt-1
is an imperative statement to be performed when the end of the file is encountered
at the beginning of the read operation. This phrase is required if no USE statement
is applicable for the file. If both a USE statement and an AT END phrase are
present, only the AT END phrase is used.
imperative-stmt-2
is an imperative statement to be performed when the end of the file is not
encountered at the beginning of the read operation.
END-READ
ends the scope of the READ statement, causing the READ to be a delimited-scope
statement. If the READ statement does not end with an END-READ phrase, the
presence of the AT END or the NOT AT END phrase causes the READ statement
to be a conditional statement, which ends at the next period separator.
REWRITE Statement
The REWRITE statement for a line sequential file has this syntax:
record-name
is the record-name in an file description entry whose current contents replaces a
record in the file. The file must be open in I-O mode.
REWRITE
END-REWRITE
record-name
FROM data-name
VST721.vsd