Skip to content

Call to service program functions don't have %PARMS() set properly - ie with *NOPASS parameters and <pgm mode="ile"> #62

@brandonp42

Description

@brandonp42

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions