Technical data

GET
GET
Function
The GET statement moves the contents of the current database record of the run
unit to your user work area.
General Format
GET
record-name
{ record-item } . . .
ON ERROR stment
NOT ON ERROR stment2
END-GET
record-name
names a subschema record type.
record-item
is a group or elementary data item in a subschema record type. Record-item may
be qualified.
stment
is an imperative statement executed for an on error condition.
stment2
is an imperative statement executed for a not on error condition.
Syntax Rules
1. Each record-item must reference a data item in the same subschema record
type.
2. If record-item is a group item, its subordinate group and elementary items
cannot be referenced in the same GET statement.
General Rules
1. The GET statement references the current record of the run unit.
2. If you use the record-name option, or if you do not specify either the record-
item or the record-name option, the DBCS makes a copy of the entire current
record of the run unit available to the program in the user work area.
3. If you use the record-item option, only those items in the current record of the
run unit are made available to the program in the user work area.
4. Any change made to the user work area does not affect the record in the
database. You must execute a MODIFY and a COMMIT statement to make
permanent changes to the database.
5. Use record-name to check that the record type of the current record is
identical to the record type specified by record-name.
6. The GET statement has no effect on currency indicators.
Procedure Division 4–41