× 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.



Hello,

Has anybody been able to use PCML to retrieve rows of data
without specifying the attribute, outputsize, from the client?
We are using Java, pcml, and COBOL.  Here is an example of
the pcml code we use:

<pcml version="4.0">
<program name="PROGA" path="/QSYS.LIB/%LIBL%.LIB/PROGA.PGM">
<struct name="INPUT" usage="inputoutput">
<data name="USERID" type="char" length="10" init="JAVADEV"/>
<data name="RCD-CNT" type="zoned" length="4" init="3"/>
<data name="START-RCD" type="zoned" length="4" init="1"/>
<data name="ARRAY-SIZE" type="int" length="4" />
</struct>
<struct name="OUTPUT" usage="inputoutput" >
    <data name="RETURN-CODE" type="char" length="9" init="000000000"/>
    <data name="RCD-CNT" type="int" length="2" init="0" />
    <data name="TOT-RCD-CNT" type="int" precision="15" length="2" init="0"
/>
        <struct name="OUT-ARRAY" count="PASS-OUTPUT.RCD-CNT" usage="inputoutput"
outputsize="INPUT.ARRAY-SIZE" >
            <data name="ACCTNUM" type="char" length="8" init="1234567890"/>
            <data name="NAME" type="char" length="20" init="JOHNDOE"/>
        </struct>
</struct>
</program>
</pcml>

Within the java code, the ARRAY-SIZE is calculated based on the record size
and
a maximum number of rows.  I have not been able
 to get the rows back without specifying the memory size required
for the data on the java side (outputsize).  It would be great
if the size could be computed based on the amount of data that was returned
by COBOL, and not be the Java program.  If I do not initialize
INPUT.ARRAY-SIZE
in the java side, I get an exception like: not enough memory for output
exception.

Does anyone have a similar problem, or can recommend a solution?

Thanks very much.

Paula Decker



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003


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-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.