|
Doh! I didn't even think about that because I am so used to getting reminded by the compiler of such mistakes. Thanks for the reply Scott, that fixed the problem! Aaron Bartell -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Monday, May 24, 2004 5:59 PM To: RPG programming on the AS400 / iSeries Subject: Re: Dynamic Service Pgm Call - Passing parms Hi Aaron, > I have successfully implemented code to make dynamic calls to service > programs, or to bind at runtime; but my parms that I pass come across > as jeeeuuunk. By junk I mean that I am reading something else's > memory. None of my information that I specify on the dynamic call > makes it to the sub procedure. [SNIP] The problem isn't related to the dynamic activation, it's related to the fact that your prototype does not match the procedure interface. If the procedure interface expects to receive parameters by VALUE, then the prototype has to also pass them by value, or things won't work. Here's the prototype that you're using: D callPgm Pr LikeDS(myDS) D ExtProc(procPtr) D pArch LikeDS(myDS) Here's the procedure interface that you're using: D ActivateMe Pr LikeDS(myDS) D pDS Value LikeDS(myDS) P ActivateMe B Export D ActivateMe PI LikeDS(myDS) D pDS Value LikeDS(myDS) (Scott starts singing songs from Sesame Street... "which one of these things is not like the others? which one of these things just doesn't belong?") You need to either change callPgm to have a VALUE keyword on the pArch parameter, or remove the VALUE keyword from ActivateMe. _______________________________________________ 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 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.