Ok, the error you're getting is because you're passing a literal ('0000000') for the last parameter. You can only do that if the parameter prototype has either the VALUE or CONST keyword; in this case you need to use the CONST keyword. In fact, you could put that on all 3 parameters.

More questions: how are ZZMBR and ZZLIB defined (I'm guessing 10A) and what values are in them? What error handling does the CLLE do? For example, what happens if the object or library doesn't exist? Does the CLLE assume a particular object type? That's a required parm for the RTVOBJD command.

GKern@xxxxxxxxxxxxxxxx wrote:
Hi Peter - thanks for responding:

"I assume you meant the USEDATE parm of the RTVOBJD command (I don't know what the RTVOBJA cmd is)." Yes USEDATE on the RTVOBJD command (Sorry - I made a typo...). "And you're compiling the CLLE subproc as a module and using the CRTPGM command to bind it with the RPGLE program." Correct "And in the RPGLE pgm you prototyped the call to the CLLE subproc. What does the prototype look like?" It looks like this. ReturnVal is a 27 byte field: * Retrieve date last used D ZFndpdmy PR 27A ExtProc('ZFNDPDMY') D Object 10A D Library 10A D LastUsed 7A C Eval ReturnVal = ZFndpdmy(ZZMBR:ZZLIB:'0000000') "Does it expect a returned value, or are you using one of the parameters to get the returned value?" Yes I want it to return a value, and was expecting the return value to appear in last 7 bytes of the return value. Keep in mind that parameters passed to CL should be by reference, not by value (i.e. either use the CONST keyword or nothing - do not use the VALUE keyword). And if you were trying to pass a 1-byte parm there would be additional considerations, but the date in question should be 7A, right?

Yes the value I want to use should be the last 7 bytes in the return value. Sorry if any of my answers sound screwy - I've been trying all sorts of things.

My last compile error is RNF7542: Parm 3 not valid as parm passed by reference.


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.