|
On 2022-08-05 12:20 p.m., Pete Helgren wrote:
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
In this example of calling QSYRUSRI, they call getOutputSize() to get the size of an output parameter.
https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/rzahh/pcmldata.htm#pcmldata__pcmlqsyrusri
Assuming getOutputSize() only works with usage="output", maybe you could define another dummy program with the struct defined with usage="output", and get the size of that parameter.
Something like this, a bit kludgy, but maybe it will work ...
<program name="rnwc0300Size">
<data name="rnwc" type="struct" struct="rnwc0300"
usage="output"/>
</program>
...
pcml.setValue("qycdrnwc.reqdataLength",
pcml.getOutputsize("rnwc0300Size.rnwc"));
As an Amazon Associate we earn from qualifying purchases.
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.