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



LOL Darren - it took you only 1 post to say what took 2 for me!

Sigh!

On 10/2/2014 9:26 AM, darren@xxxxxxxxx wrote:
First, I've come to really like qualified structure, so this isn't usually
an issue for me. Heck, you're using underscore (_) in a pseudo
qualification method already. But, maybe this is a copy book or there is
some other reason to use this as is. So, to make it work, I think you'll
need to copy the *ENTRY parm to the unqualified data structure. You'll
have to copy it back before the return if you happen to be modifying some
of the incoming values in this program. An alternative to this would be to
make the defined data structure based on a pointer, and point the structure
to the address of the incoming parm, but that again, isn't something I
think I've tried before.





From: Brian Stapleton <BStapleton@xxxxxxxxxxxx>
To: "rpg400-l@xxxxxxxxxxxx" <rpg400-l@xxxxxxxxxxxx>
Date: 10/02/2014 09:49 AM
Subject: *Entry Plist Replacement in Free Format.
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>



Good Morning Team

Need some Syntax help here please.

This is what I have


Dcl-DS DS01_RC40C0;
D01_Retn Char(001);
D01_Optn Char(002);
D01_Astp Char(001);
D01_Asn Char(020);
D01_TxParm Char(050);
END-DS;



**********************************************************************
C *Entry Plist
C Parm DS01_RC40C0



And I would like to replace the *Entry PLIST with the DCL-PR/DCL-PI, but I
am confused with the Syntax since the Parm for the *Entry is a Data
Structure.


So I did this:

Dcl-DS DS01_RC40C0;
D01_Retn Char(001);
D01_Optn Char(002);
D01_Astp Char(001);
D01_Asn Char(020);
D01_TxParm Char(050);
END-DS;

// --------------------------------------------------
// Prototype for procedure: Main
// --------------------------------------------------
DCL-PR Main EXTPGM('RC40C0RP');
Arriving_Parms_DS LIKEDS(DS01_RC40C0);
END-PR ;

DCL-PI Main;
Arriving_Parms_DS LIKEDS(DS01_RC40C0);
END-PI ;


**********************************************************************
C* *Entry Plist
C* Parm DS01_RC40C0


And it works, except that now to access the arriving parms, I need to do
this Arriving_Parms_DS.D01_Optn, instead of just doing a D01_Optn. (the
arriving parms are like a qualified ds)

Is there any way that I can accept an arriving DS, using the DCL-PR/DCL-PI
and access the fields of the DS individually without having to access the
fields as a qualified data structure?




Brian Stapleton
Information Services
Carhartt, Inc
5750 Mercury Drive
Dearborn, MI 48126
Desk - 313-749-6586
Fax - 313-271-3455
BStapleton@xxxxxxxxxxxx<mailto:BStapleton@xxxxxxxxxxxx>

[Description: Description: Carhartt_emaillogo]


Confidential: This electronic message and all contents contain information
from Carhartt, Inc. and its affiliates which may be confidential or
otherwise protected from disclosure. The information is intended to be for
the addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited. If you
have received this electronic message in error, please notify us
immediately at (313) 271-8460 and destroy the original message and all
copies.
--
This is the RPG programming on the IBM i (AS/400 and 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 ...

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.