%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.
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
and *NULL must not be specified. 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.
/free
chain empno record;
salary = salary + 2000;
status = STATEXEMPT;
update record %fields(salary:status);
/end-free