COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-194
READ for Line Sequential Files
LOCK
keeps other programs from accessing the record retrieved until an UNLOCKFILE
statement, UNLOCKRECORD statement, or REWRITE UNLOCK statement
executes. The file that file-name specifies 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.
See these usage considerations in READ for Sequential or Dynamic Access:
•
In Action of the READ Statement (Sequential Read):
°
Retrieval of a logical record
°
Alignment within record area
°
Unsuccessful read operation
•
File-Status Data Item
•
Retrieval
•
GUARDIAN-ERR Special Register
•
Handling Exception Conditions
•
Variable-Length Records
•
Setting the Value of the DEPENDING Item (Variable-Length Records)
•
Concept of Next Record
•
Sequential Block Buffering and HP COBOL Fast I-O
•
Eight-Character Volume Names and HP COBOL Fast I-O