Previous Topic: KEEP LONGTERMNext Topic: READY


MODIFY

Purpose

Replaces element values of a record occurrence in the database with new element values defined in the dialog's record buffer.

Syntax

►►─── MODIFY record-name ───────┬────────────────────┬────── . ───────────────►◄
                                └─ error-expression ─┘

Parameters

record-name

Specifies the current occurrence of the named record to be modified with the values in the dialog's record buffer.

The named record must be known to the dialog's subschema.

error-expression

Specifies the status codes that are returned to the dialog.

Usage

Considerations

If autostatus is not in use, a dialog's error-status field indicates the outcome of a MODIFY command:

Status code

Meaning

0000

The request was executed successfully

0805

Modification of the record violates a duplicates-not-allowed specification for a CALC record, sorted set, or index set

0806

Currency was not established for the object set

0809

The object record's area was not readied in an update usage mode

0810

The dialog's subschema specifies an access restriction that prohibits modification of the named record

0813

Run-unit currency was not established or was nullified by an ERASE command

0820

The current record of run unit is not the same type as the named record

0821

An area other than the area of the object record was readied with an incorrect usage mode

0825

No current record of set type was established

0829

A run-unit deadlock condition occurred. DBMS aborted and rolled back the run unit. All resources associated with the task are released

0833

Not all sorted sets in which the object record participates are included in the dialog's subschema

0855

An invalid length was defined for a variable-length record

0883

The length of a record in a native VSAM ESDS was changed or a prime key in a native VSAM KSDS was modified

Further Considerations

Example

The statements in the following example retrieve an occurrence of the CUSTOMER record by using its CALC key, update the value of the CUST-NAME element in the dialog's record buffer, and then modify the record occurrence in the database:

MOVE IN-CUST-NUMBER TO CUST-NUMBER.
OBTAIN CALC CUSTOMER.
MOVE NEW-CUST-NAME TO CUST-NAME.
MODIFY CUSTOMER.

More information:

Error Handling