Eval-Corr copy and manage DS

 

coollogo_com-247503328Eval-Corr … what is this ? I found it reading an italian forum where great Mr. Obelix suggest this operation code to solve ad problem with DS (see original message at http://it.comp.as400.narkive.com/Dx0ArfSk/campi-numerici-contenenti-blanks).

Googling for Eval-Corr I learn something new:

IBM manual says:

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