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"/>

  <!-- 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"/>


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?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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

This mailing list archive is Copyright 1997-2022 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.