-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call to service program functions don't have %PARMS() set properly - ie with *NOPASS parameters and <pgm mode="ile"> #62
Comments
Update: It turns out that the service program is being called via the PASE functions, not the ILE functions as I originally thought. It's ultimately using Qp2CallPase(). The RPG documentation at https://www.ibm.com/docs/en/i/7.3?topic=functions-parms-return-number-parameters indicates that %PARMS needs an operational descriptor to be passed but I haven't found anything yet that indicates how one might do that from "another ILE language". Even though the XMLSERVICE is actually RPG that caveat applies because it's not calling things the normal way a regular RPG program would. |
Does anybody know if we converted the Qp2CallPase() calls to use _ILECALLX would it be possible to somehow generate the operational descriptor that RPG needs to support %PARMS? Ie maybe if the argument list is prepared with build_ILEarglist() first? |
With the latest comment on the NodeJS iToolkit issue it seems like this is not possible to fix without IBM i Idea 3080 (https://ibm-power-systems.ideas.ibm.com/ideas/IBMI-I-3080) being implemented. |
It doesn't seem like service program functions are getting the %PARMS set properly when called. You can see this with the XMLSERVICE(ZZNOPASS) function for example: (I ran this in ACS Run SQL Scripts). I've tried on both my work system and PUB400 with the same result in both places.
Here's the output I receive back:
I've looked at the source file PLUGILE ileSRV() and don't see anything obvious, but I'm not sure how the %PARMS works behind the scenes. Should it be doing something extra before calling the service program sub-procedure to tell the OS how many parameters are being passed? Also I suspect the code where it iterates through argv to set argc might not work properly for *OMIT parameters with a *NULL if there are subsequent parameters filled in, but I haven't been able to test that yet.
The text was updated successfully, but these errors were encountered: