%FIELDS (Fields to update)

%FIELDS(name{:name...})

A list of fields can be specified as the final argument to Input/Output operation UPDATE coded in a free-form group. Only the fields specified are updated into the Input/Output buffer.

Notes:
  1. Each name must be the name of a field in the input buffer for the record. If the field is renamed, the internal name is used.
  2. The name can be a subfield from a data structure defined with the EXTNAME/LIKEREC keyword using the file/format name of the record being updated. *INPUT must be specified with the keyword used. The name specified must contain the subfield name that corresponds to the input field. For a qualified data structure, the simple qualified name of the subfield is used.
  3. The name can be a subfield of a data structure defined with the LIKEDS keyword of a data structure defined as described above.

%FIELDS specifies a list of fields to update. For example:

Figure 218. Updating Fields
 /free
   chain empno record;
   salary = salary + 2000;
   status = STATEXEMPT;
   update record %fields(salary:status);
 /end-free


[ Top of Page | Previous Page | Next Page | Contents | Index ]