× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.