RE: PCML Structure length
Richard Schoen <richard-DiTrGpQEJGItADg8e/3/[email protected]> Fri, 5 Aug 2022 17:09:15 +0000
| Newsgroups | gmane.comp.lang.as400.java |
|---|---|
| Message-ID | <CH0PR12MB5250A1182FEEAD31D183257AB79E9@CH0PR12MB5250.namprd12.prod.outlook.com> |
Just a thought if you don't get PCML to work.... You could wrap the call to QYCDRNWC in an RPG program if you can't get it to work and then simplify your parms perhaps. Regards, Richard Schoen Web: http://www.richardschoen.net Email: richard-DiTrGpQEJGItADg8e/3/[email protected] ---------------------------------------------------------------------- message: 1 date: Fri, 5 Aug 2022 11:20:46 -0500 from: Pete Helgren <[email protected]> subject: PCML Structure length Working with a PCML call that I *almost* have working....the issue seems to be that one of the parameters is the length of the structure which I am not sure how to calculate/get.? The API being called is: https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/qycdrnwc.htm (yeah, been working on this for a while).? The PCML file I created is: <pcml version="2.0"> <!-- PCML source for calling "Renew Certificate" (QYCDRNWC) API --> ? <!-- Format RNWC0300 - Other formats are available --> ? <struct name="rnwc0300"> ??? <data name="offsettofile"?????????????? type="int"??? length="4"? usage="input"/> ??? <data name="lengthoffilename"?????????? type="int"??? length="4"? usage="input"/> ??? <data name="certfile"?????????????????? type="char"?? length="lengthoffilename" usage="input"/> ? </struct> ? <!-- Program QYCDRNWC and its parameter list for retrieving RNWC03000 format --> ? <program name="qycdrnwc" path="/QSYS.LIB/QICSS.LIB/QYCDRNWC.SRVPGM" entrypoint="QycdRenewCertificate"> ??? <data name="certreqdata"????? type="struct"?? struct="rnwc0300"?? usage="input"/> ??? <data name="reqdataLength"??? 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> The relevant code (Java) is this: ??????????? pcml.setValue("qycdrnwc.certreqdata.offsettofile",8); ??????????? pcml.setValue("qycdrnwc.certreqdata.lengthoffilename",pathlen); ??????????? pcml.setValue("qycdrnwc.certreqdata.certfile",certificate_path); ??????????? pcml.setValue("qycdrnwc.reqdataLength",[how to I get this value??]); So the structure is constructed using the setValue methods for each element of the structure.? But, I also need the length of the qycdrnwc.certreqdata structure to pass as the second parameter.? I was hoping that there was a PCML method called getLength(variable)...no joy. How do I get the length of that structure? -- 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: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org 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