The GET statement transfers the contents of a specified record occurrence from the record buffer into program variable storage. Elements in the specified record are moved to their respective locations in variable storage according to the subschema view of the record. The transferred elements will appear in storage at the location to which the record has been bound (for further details, see BIND RECORD earlier in this chapter).
Currency
The GET statement operates only on the record that is current of run unit. Following successful execution of a GET statement, the accessed record is current of run unit, its record type, its area, and all sets in which it participates as member or owner.
►►─── GET ─┬────────────────────────┬─ ; ─────────────────────────────────────►◄ └─ RECORD (record-name) ─┘
Parameter
Optionally specifies the record type of the current of run unit. If this optional clause is used, the current of run unit must be an occurrence of the named record type.
The following statement moves the record that is current of run unit (in this case, the OFFICE record) from the record buffer into program variable storage:
GET RECORD (OFFICE);
Upon completion of the GET function, the ERROR_STATUS field in the IDMS DB communications block indicates the outcome of the operation:
The request has been serviced successfully.
Currency has not been established.
The named record is not in the subschema. The program has probably invoked the wrong subschema.
The subschema specifies an access restriction that prohibits retrieval of the named record.
A current record of run unit either has not been established or has been nullified by a previous ERASE statement.
The record has not been bound.
The current record is not the same type as the named record.
The requested record has been erased.
An invalid length has been returned for a variable-length record.
|
Copyright © 2014 CA.
All rights reserved.
|
|