VMS Help
COBOL, PROCEDURE_DIVISION, FETCH
*Conan The Librarian
|
The FETCH statement is a combined FIND and GET that establishes a
specific record in the database as the current record of the run unit and
makes the record available to the run unit in the User Work Area.
Format -
FETCH database-record
[ FOR UPDATE ]
[ [{| REALM |}] ]
[RETAINING [{| RECORD |}] CURRENCY]
[ [{| { SET [ set-name ] ... } |}] ]
[ [{| { { set-name } ... } |}] ]
[{ [ AT END stment ] [ NOT AT END stment ] } ]
[{ [ ON ERROR stment ] [ NOT ON ERROR stment ] } ]
[ END-FETCH ]
represents a record selection expression. References are made to a
record in the data-base according to the rules for Record Selection
Expressions.
names a subschema set type.
is an imperative statement.