E@DBSTORE
Name
The E@DBSTORE call has the following format:
DN@<Logical>(E@DBSTORE)
where <Logical> identifies the database file and index to use to perform the E@DBSTORE call.
Description
E@DBSTORE either adds or updates the current record in the file record area. The choice depends on how you define the record in that area.
If you use either E@DBCREATE or E@DBRECREATE, the subsequent E@DBSTORE routine adds a new record to the appropriate file and its indexes. You define new key field values in the file record area before performing E@DBSTORE.
If you perform a modify routine to read the current database record, the subsequent E@DBSTORE routine updates the appropriate file with the current record area contents. The E@DBSTORE routine also updates all changed index entries for the changed record.
Using the API in a Program
-
Use the U@AUDITBEGIN routine to open a transaction state.
-
Make a new blank record in the database using the E@DBCREATE routine.
-
E@DBSTORE does not use the record retrieval variables (D@ fields) to access a particular record. Instead, you must set valid values in the record area associated with the file before performing E@DBSTORE.
-
The S1@MVDT call is to a procedure that populates the fields for the new record. If any fields are not populated, they remain filled with zeros or spaces.
-
The E@DBSTORE call adds the new record to the DBAPVGP file.
-
U@AUDITEND closes the transaction state, committing the transaction to the database.
Input Values
Field | Description |
---|---|
<Logical> | <Logical> in the E@ statement identifies the database file and index to use to perform the call. |
Programming Example
|