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



Joe,
I think you understand what you need to do.
LIKEDS implicitly declares the data structure as QUALIFIED so there won't be
a name conflict with the original EDS you declare.
You could move/copy the input DS to the unqualified original EDS as the
first line of code. That would put it into a non-qualified DS.
I like the QUALIFIED feature myself, perhaps if you're adding values to
numeric fields you don't like to do this:

   myDS.mySubfield =  myDS.mySubfield + XYZ

I'm sure you remember that on V5R2 and later you can code the following
instead:

   myDS.mySubfield  +=  XYZ


-Bob Cozzi
www.RPGxTools.com
RPG xTools - Enjoy programming again.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Joe Pluta
Sent: Saturday, January 21, 2006 10:16 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: Specifying a data structure on a prototype

Maybe I'm just not getting it, but I haven't been able to figure out how to
define an externally described data structure as an input parameter in a
prototype.  With a *ENTRY PLIST, I could specify the data structure in my D
specs, then simply specify the name of the EDS in my PLIST.  Now, though, I
can't seem to figure out how to do that.  The closest I've been able to get
is to define the structure as LIKEDS and use qualified on the original EDS
(because otherwise the subfields would collide).  The downside to that is
having to use qualified names throughout the procedure, which isn't
necessarily a bad thing.  Another option is to make the EDS based, and then
the first statement in the procedure is to set the basing pointer to the
address of the parameter.  Both work, but neither is quite as clean as I
would like it.

 

Any suggestions?

 

Joe


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.