× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Barbara, just checked my compile list and got the exact match messages. Learnt some new French on the way.
So these DS will be assigned field by field :


D wDS E DS EXTNAME ( COTTOT ) INZ
D wCot DS LIKEREC ( COTTOTF1 : *OUTPUT ) INZ

/FREE


EVAL-CORR wCot = wDS;


D wTrnIn DS LIKEREC ( TRNPRGF1 : *INPUT ) INZ
D wTrnOut DS LIKEREC ( TRNPRGPF : *OUTPUT ) INZ

/FREE

EVAL-CORR wTrnOut = wTrnIn;



-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Barbara Morris
Envoyé : mercredi 5 janvier 2011 17:15
À : rpg400-l@xxxxxxxxxxxx
Objet : Re: EVAL-CORR

On 2011/1/3 8:30 AM, Vern Hamberg wrote:
I just had reason to look at eval-corr - turns out it is
smart enough
to do a mass move if the DS' have all the same fields. Nice!

But it does the field-at-a-time if there is a difference, either in
order or name, I guess.


Vern, it only does a mass move if the two DS' are explicitly
related through LIKEDS or LIKEREC. If they are defined
separately, and just happen to have identical subfields, they
will still be handled subfield by subfield.

You can see exactly what will happen from the EVAL-CORR
Summary in the listing.

1 D ds1 ds qualified
2 D subf 1a
3 D ds2 ds qualified
4 D subf 1a
5 D ds2b ds likeds(ds2)
6 /free
7 eval-corr ds2 = ds1;
8 eval-corr ds2 = ds2b;

E V A L - C O R R S u m m a r y
EVAL-CORR summary 1 7
SUBF Assigned; exact match
EVAL-CORR summary 2 8
Both data structures defined with same LIKEDS or LIKEREC
--
This is the RPG programming on the IBM i / System i
(RPG400-L) mailing list To post a message email:
RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.