EVAL-CORR (Assign corresponding subfields)

Free-Form Syntax EVAL-CORR{(HMR)} target = source;
Code Factor 1 Extended Factor 2
EVAL-CORR target = source

The EVAL-CORR operation assigns data and null-indicators from the corresponding subfields of the source data structure to the subfields of the target data structure. The subfields that are assigned are the subfields that have the same name and compatible data type in both data structures. For example, if data structure DS1 has character subfields A, B, and C, and data structure DS2 has character subfields B, C, and D, statement

EVAL-CORR DS1 = DS2

will assign data from subfields DS2.B and DS2.C to DS1.B and DS1.C. Null-capable subfields in the target data structure that are affected by the EVAL-CORR operation will also have their null-indicators set from the null-indicator from the source data structure's subfield, or to *OFF, if the source subfield is not null-capable.

If an operation code extender H is specified, the half-adjust function applies on all numeric assignments. Extenders for EVAL-CORR can be specified only in Free-form calculations.

If operation code extender M or R is specified, it applies to the arguments of any procedure call specified as part of the source or target expression. Extenders for EVAL-CORR can be specified only in Free-form calculations.

The EVAL-CORR Summary section in the compiler listing can be used to determine

See the IBM Rational Development Studio for i: ILE RPG Programmer's Guide for more information about the EVAL-CORR Summary section.

Remember the following when using the EVAL-CORR operation:



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