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



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.



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.