Key field updates
An iSeries™ program is allowed to change any part of a data record including key fields.
The exception to this is an ILE COBOL program because the ILE COBOL language does not allow key field changes. A System/36™ program cannot change primary key fields in a record, regardless of the access method specified when the file is opened. Logical file key fields can be changed under some circumstances, but primary key fields can never be changed.
This means that an ILE RPG program, for example, that routinely changes key fields in a local keyed file might fail when it is redirected to a remote keyed file on a System/36 (or other system with similar restrictions). Several different errors might be returned by the DDM target, depending on the access method or access path being used when the key field change is attempted.
Parent topic:
Work with access methods for DDM