PCML Call reality check
Pete Helgren <[email protected]> Thu, 7 Oct 2021 13:11:43 -0500
| Newsgroups | gmane.comp.lang.as400.java |
|---|---|
| Message-ID | <[email protected]> |
OK. I am using this example as a template: https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/rzahh/pcmldata.htm I am using this API: https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/qycdrnwc.htm Using the tried and true "Monkey see, monkey do" approach, I came up with this PCML: <pcml version="1.0"> <!-- PCML source for calling "Renew Certificate (QycdRenewCertificate) API" --> <!-- Format RNWC0300 - Other formats are available --> <struct name="rnwc0300"> <data name="certificatePathOffset" type="int" length="4" usage="input"/> <data name="lengthOfPathAndFile" type="int" length="4" usage="input"/> <data name="certPathAndFileName" type="int" length="4" usage="input" init="0"/> </struct> <!-- Program QYCDRNWC and its parameter list for retrieving RNWC0300 format --> <program name="qycdrnwc" path="/QICSS.lib/QYCDRNWC.pgm"> <data name="certReqData" type="struct" struct="rnwc0300" usage="input"/> <data name="certReqLength" type="int" length="4" usage="input" /> <data name="format" type="char" length="8" usage="input" init="RNWC0300"/> <data name="errorCode" type="int" length="4" usage="input" init="0"/> </program> </pcml> I have never used PCML to make a call before so I am a little uncertain as to whether pcml above is correct. Also, if you scroll down the page in the java code sample provided by IBM, you'll see that there aren't any input parameters in that java program and the API (above) has at least one (the path and file name) plus the length of that path/file name. I don't see the syntax for setting types of input parameters. Those values would be set on the "rnwc0300" struct but it's the offset and the *char that is throwing me. I can get the string (path and file name) and get it's length, but what about setting the offset and how do I handle that *char in the java code itself? -- Pete Helgren www.petesworkshop.com GIAC Secure Software Programmer-Java AWS Certified Cloud Practitioner Microsoft Certified: Azure Fundamentals Twitter - Sys_i_Geek IBM_i_Geek -- This is the Java Programming on and around the IBM i (JAVA400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/java400-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/java400-l. Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com