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?
As an Amazon Associate we earn from qualifying purchases.