Technical data
MODIFY
MODIFY
Function
The MODIFY statement changes the contents of specified data items in a
database record.
General Format
MODIFY
record-name
{ record-item } . . .
RETAINING
REALM
RECORD
SET [ set-name ] . . .
{ set-name } . . .
CURRENCY
ON ERROR stment
NOT ON ERROR stment2
END-MODIFY
record-name
names a subschema record type.
record-item
is a group or elementary data item in a subschema record type. Record-item can
be qualified.
set-name
names a subschema set type.
stment
is an imperative statement executed for an on error condition.
stment2
is an imperative statement executed for a not on error condition.
Syntax Rules
1. Each record-item must reference a data item in the same subschema record
type.
2. If record-item is a group item, its subordinate group and elementary data
items cannot be referenced as a record-item in the same MODIFY statement.
3. Use record-name to check that the current record of the run unit is a record
type identical to the record-name record type.
General Rules
1. Changes are made to a database record by:
• Locating the target record (FIND and GET, or FETCH)
• Moving the new data to the data-name references in the user work area
• Executing the MODIFY statement
Procedure Division 4–45