-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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.
call qxmlserv.iplug4k('*NA', '*HERE',
'<?xml version="1.0" ?>'
|| '<script><pgm name="ZZSRV" lib="XMLSERVICE" func="ZZNOPASS">'
|| '<parm><data type="10a" var="myName">Ranger</data></parm>'
|| '<parm><data type="10a" var="yourName">Buddy</data></parm>'
|| '<return><data type="50a" var="blah" varying="on">asdf</data></return>'
|| '</pgm></script>'
, '');
Here's the output I receive back:
Output Parameter #4 (C0) = <?xml version="1.0" ?><script><pgm name="ZZSRV" lib="XMLSERVICE" func="ZZNOPASS">
<parm><data type="10a" var="myName">Ranger</data></parm>
<parm><data type="10a" var="yourName">Buddy</data></parm>
<return><data type="50a" var="blah" varying="on">my name is -1 Ranger NOPASS</data></return>
<success><![CDATA[+++ success XMLSERVICE ZZSRV ZZNOPASS ]]></success>
</pgm></script>
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.