Previous Topic: STARTPAGE (DC/UCF)Next Topic: STORE RECORD (LRF)


STORE RECORD

The STORE RECORD statement performs the following functions:

Steps Before Executing STORE RECORD

Before executing the STORE RECORD statement, satisfy the following conditions:

Location Modes

A record is stored in the database based on the location mode specified in the schema definition of the record. The location modes are as follows:

Currency

Following successful execution of a STORE RECORD statement, the stored record becomes current of run unit, its record type, its area, and all sets in which it participates as owner or automatic member.

Syntax
►►─── STORE RECORD (record-name);─────────────────────────────────────────────►◄

Parameter

record-name

Defines the named record occurrence, as specified in program variable storage. Record-name must specify a record type included in the subschema.

The ordering rules for each set govern the insertion point of the specified record in the set.

Example

The following figure illustrates the steps necessary to add a new EMPLOYEE record to the database. Since EMPLOYEE is defined as an automatic member of both the DEPT_EMPLOYEE and OFFICE_EMPLOYEE sets, currency must be established in each of those sets before issuing the STORE RECORD.

The first two DML statements establish OFFICE 1 and DEPARTMENT as current of the OFFICE_EMPLOYEE and DEPT_EMPLOYEE sets, respectively. When EMPLOYEE 27 is stored, it is connected automatically to each set.

Status Codes

Upon completion of the STORE RECORD function, the ERROR_STATUS field in the IDMS DB communications block indicates the outcome of the operation:

0000

The request has been serviced successfully.

1201

The area in which the named record is to be stored has not been readied.

1202

The suggested DIRECT_DBKEY value is not within the page range for the named record.

1205

Storage of the record would violate a duplicates-not-allowed option for a CALC record, a sorted set, or an index set.

1208

The named record is not in the subschema. The program has probably invoked the wrong subschema.

1209

The named record's area has not been readied in one of the update usage modes.

1210

The subschema specifies an access restriction that prohibits storage of the named record.

1211

The record cannot be stored in the area because of insufficient space.

1212

The record cannot be stored because no db-key is available. This is a system internal error.

1218

The record has not been bound.

1221

An area other than the area of the named record occurrence has been readied with an incorrect usage mode.

1225

A set occurrence has not been established for each set in which the named record is to be stored.

1233

At least one set in which the record participates as an automatic member has not been included in the subschema.

1253

The subschema definition of an indexed set does not match the indexed set's physical structure in the database.

1254

Either the prefix length of an SR51 record is less than zero or the data length is less than or equal to zero.

1255

An invalid length has been defined for a variable length record.

1260

A record occurrence that was encountered in the process of connecting automatic sets is inconsistent with the set named in the ERROR_SET field of the CA IDMS/DB communications block; probable causes include a broken chain or improper database description.

1261

The record cannot be stored because of broken chains in the database.