Ü  %FIELDS (Field_name1:Field_name2...)

·         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.

Example –%fields built-in function in rpgle

In the example below, salary and address will be updated for employee physical file record format rec1.

   chain empno rec1;
   salary = salary + 2000;
   addr = ‘STATE=xxxx COUNTRY=yyyyy’;
   update rec1 %fields(salary:addr);


User Comments:



Copyright © Go4as400.com, 2013-2017. Copyright notice