On 4/7/2010 4:44 PM, Simon Coulter wrote:
... Also, I might WANT to do a blanket copy of
data without respect to like-named sub-fields so there must be an
alternative to EVAL-CORR even on VRM540 and later.
...
Simon, RPG does a blanket copy with EVAL-CORR if the data structures are
defined LIKEDS each other. The EVAL-CORR summary will indicate this.
For data structures defined LIKEDS each other, using a straight
assignment with EVAL or MOVE is usually the same as EVAL-CORR; the
possible difference is that EVAL-CORR also assigns any null-indicators
associated with the data structure, while EVAL and MOVE ignore the
null-indicators.
I have two data structures, DSA and DSB, defined identically, and a
third, DSA1, defined LIKEDS DSA. EVAL-CORR DSA=DSA1 produces the first
summary and EVAL-CORR DSA=DSB produces the second. The first EVAL-CORR
would do a blanket copy, and the second would assign subfield by
subfield even though the data structure are actually identical.
E V A L - C O R R S u m m a r y
EVAL-CORR summary 1 9
Both data structures defined with same LIKEDS or LIKEREC
EVAL-CORR summary 2 10
SUB1 Assigned; exact match
SUB2 Assigned; exact match
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.