|
Ok so we agree LOL...perhaps it's a compiler...(dare I say it...) bug? Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tyler, Matt Sent: Thursday, January 12, 2006 1:56 PM To: RPG programming on the AS400 / iSeries Subject: **SPAM** RE: Overlapping subfields with a MOVE Tommy, I'm not really looking for the solution around the overlapping sub fields. We did take care of the issue, but we want to know why EVAL gets away with it when MOVE does not. Thank you, Matt Tyler WinCo Foods, LLC mattt@xxxxxxxxxxxxxx -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Holden Tommy Sent: Thursday, January 12, 2006 12:12 PM To: RPG programming on the AS400 / iSeries Subject: RE: **SPAM** Overlapping subfields with a MOVE HUH?? With the DS as coded below FLD1 will always have the value of FLD2 & vice versa. Just eval one field & the other gets the data by default. Basically the DS just allows you to reference the same memory address by 2 different names....even if the compiler doesn't complain...it's a waste of movement. Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tyler, Matt Sent: Thursday, January 12, 2006 12:58 PM To: RPG programming on the AS400 / iSeries Subject: **SPAM** Overlapping subfields with a MOVE A programmer here was making simple changes and happened to have a data structure with overlapping sub fields. Example code: DDS DS D FLD1 1 10 D FLD2 1 10 C MOVE FLD1 FLD2 The compiler complains about the above code but not this... C EVAL FLD2 = FLD1 So, we were wondering what is significant about the two operations that prevent MOVE from working over EVAL? I did search the archives and FAQ using "RNF7017" and "overlapping sub fields" (and variations of) and I found nothing. This is just a query for a simple answer. We know the solution is to change MOVE to EVAL whenever possible and not to move data for overlapping sub fields. Thank you, Matt Tyler WinCo Foods, LLC mattt@xxxxxxxxxxxxxx
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.