× 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.



Matt,

I would assume that the Eval syntax is smart enough to realize this
assignment is pointless.  Since both field elements are pointing to the same
memory address, what would be the purpose in this assignment?  Both of these
fields will ALWAYS match, since they are looking at the same value in
memory.  Why waste CPU cycles?

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-297-2863 or ext. 1863



-----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: 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 thread ...

Follow-Ups:

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.