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



We are not talking about this.
Off Course you will end up with your 5 XXXX in BIGNAME when you do this.
But why should you define these things in a datastructure and think that when 
you do a EVAL *ALL to  SMALLNAME that it would affect all of the positions in 
BIGNAME??
Off Course MOVE(P) against SMALLNAME makes then no difference!!
But that makes it hypothetical and not something from real life (I can not 
think of any reason to define and handle it in that way).
 
So when we talk about a real situation where I have a BIGNAME with *ALL(X) and 
a separate SMALLNAME with *ALL(Y) and I want the value of SMALLNAME in BIGNAME; 
I can do:
MOVE(P) SMALLNAME BIGNAME.
As a result BIGNAME will have the value of SMALLNAME with 5 leading blanks (If 
character fields).
MOVEL(P) SMALLNAME BIGNAME.
As a result BIGNAME will have the value of SMALLNAME with 5 trailing blanks (If 
character fields).
 
When you want it anyway in a datastructure you will have to do manaullay what 
the (P) part of the MOVE can do for you, say:
CLEAR BIGNAME
EVAL *ALL(Y) SMALLNAME
Or perhaps if you want that BIGNAMES contains *ALL(Y):
EVAL *ALL(Y) BIGNAME is your solution?????
 
Cheers,
Eduard
RPower@xxxxxxxxxx wrote:
I posted a previous reply to this that even MOVE(P) would fail under.

How so?
If they are defined in a data structure as
d ds 
d BigName 40 
d SmallName 35 overlay(BigName)

If you use BigName to get SmallName all the time you are fine. But let's 
say BigName contains 40 characters all 'X', and we do
Eval SmallName = *All('Y')

BigName would have 35 Y's and 5 X's at end nes pas?

Just change the eval to
MOVE(P) *ALL('Y') SmallName

End result would be the same.


Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
Tel: 709-576-8132
Email: rpower@xxxxxxxxxx
Website: http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. - 
Sir Winston Churchill




Eduard Sluis 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
11/08/2004 11:14 AM
Please respond to
RPG programming on the AS400 / iSeries 


To
RPG programming on the AS400 / iSeries 
cc

Subject
Re: Same field names in different files






So then you use MOVE(P) to padout the not covered part of the to field.
Eduard.

rob@xxxxxxxxx wrote:


Only if he uses MOVE. :-)

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com


|-----------------------------+-------------------------------------------|
| RPower@xxxxxxxxxx | |
| Sent by: | |
| rpg400-l-bounces@midrange.| To|
| com | RPG programming on the AS400|
| | / iSeries |
| 08/09/2004 06:17 AM | |
| | cc|
| Please respond to | |
| RPG programming on the | Fax to|
| AS400 / iSeries | |
| | Subject|
| | Re: Same field names in |
| | different files |
| | |
| | |
| | |
| | |
| | |
| | |
|-----------------------------+-------------------------------------------|






The only problem with that I see is that if a future programmer tries to
use the longer of the two fields (for example, use the shorter field as
input to populate the longer field) then you could end up with data in the
last 5 chars that is left over from a previous operation.

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
Tel: 709-576-8132
Email: rpower@xxxxxxxxxx
Website: http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. -
Sir Winston Churchill




"Michael Naughton" 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/08/2004 11:13 AM
Please respond to
RPG programming on the AS400 / iSeries 


To
RPG programming on the AS400 / iSeries 
cc

Subject
Re: Same field names in different files






I agree with the responses that say a different size means you need a
different field name.

My solution to this is to set up the shorter field as an overlaid field
(or DS if you prefer) based on the field in the database. That way, it's
automatically populated with the correct data.

RPG programming on the AS400 / iSeries writes:
>I've experienced only one problem and that is if
>there is a difference in sizes then the program gives a compilation
error.
>
>Eg: The NAME is 30 chrs in the Customer file & you want to print/display
>only the first 25 characters. If we use the same field names i.e NAME it
>gives a compilation error.


Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA 01376
413-863-4357 x444
mnaughton@xxxxxxxxxxxx

--
This is the RPG programming on the AS400 / iSeries (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.




This OutBound email has been scanned for Viruses
--
This is the RPG programming on the AS400 / iSeries (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.



--
This is the RPG programming on the AS400 / iSeries (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.

--
This is the RPG programming on the AS400 / iSeries (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.




This OutBound email has been scanned for Viruses
--
This is the RPG programming on the AS400 / iSeries (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 ...

Follow-Ups:
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.