|
Scott wrote: >You're telling the CL program to pass >the parameter by reference. You're >telling the RPG program to receive >the parameter by value. That is quite correct, but CL has limitations regarding passing a literal to a CONST receiver. You MUST pad the literal to it's full size, just like calling from a command line -or- have the called procedure use CEEDED to find the Real Length passed. In other words, CL does not honour CONST; it uses OPDESC. CL Programming guide, Chapter 3. I Am Nailed To The Hull... er... Chapter 3. Controlling Flow and Communicating between Programs and Procedures: "When you use the CALLPRC command and pass character string constants, you must specify the exact number of bytes, and pass exactly that number. The called procedure can use the information in the operational descriptor to determine the exact number of bytes passed. You can use the API CEEDOD to access the operational descriptor." The example that follows illustrates this very well although it calls a CL procedure and not an RPG procedure. ILE CL indeed. --buck
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.