Technical data

STORE
If you do not specify the WITHIN option, the DBCS stores a new record
occurrence in one valid subschema realm for that record type.
3. If you specify the DBKEY option, the target area is determined by page size.
If the page specified by the DB-KEY special register has space available, that
page is the target area. Otherwise, the DBCS chooses the next page that has
available space.
4. After a successful STORE operation, the DB-KEY special register contains
the database key for the record.
5. The STORE statement stores a record occurrence of the record-name record
type from your user work area to a single target area.
6. If the DBCS can store record-name in more than one realm or area, the
selected realm or area is unspecified.
7. The successful STORE statement directs the DBCS to store these items in the
target area:
Each record-name data item defined in the subschema.
The default value for any record-name data items defined in the schema
but not defined (omitted) in the subschema. The schema DEFAULT clause
defines the values for these omitted data items.
8. The DBCS establishes the newly stored record as the owner record of an
empty set for each set type for which record-name is defined as the owner
record type.
9. The DBCS connects the newly stored record as a member record of the current
set of each set type for which record-name is defined as an AUTOMATIC
member record type. The set criteria defined in the schema for that set type
determine the position where the DBCS inserts record-name.
10. Unless otherwise specified by the RETAINING clause (see Section 4.9.1,
RETAINING Clause), these currency indicators point to the stored record:
Run unit
Realm
Record type
Set type for each set type the record owns, and for each set type of which
it is an AUTOMATIC member
11. The contents of the user work area do not change after the successful or
unsuccessful execution of a STORE statement.
12. If a database exception condition occurs during the processing of a STORE
statement, the DBCS places a database exception condition code in the
special register DB-CONDITION (see Technical Notes). This code identifies
the condition.
Technical Notes
STORE statement execution can result in these DB-CONDITION database
exception condition codes:
DBM$_NODEFVAL There is no schema DEFAULT clause for an omitted
data item in record-name.
4–60 Procedure Division