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



The fields in PCML are not implicit initialized. To initialize them
explicitely, you can use init-keyword in your PCML, i.e.
init = " " for chars and
init= "0" for packed or zoned

Here is an example, how I use PCML:

<program name="OV003A-KF" path="/QSYS.LIB/EBKPGMP.LIB/OV003A.PGM">
<data name="METHODE" type="char" init="KF" length="2"
usage="input"/>
<struct name="REFERENZ" usage="inputoutput">
<data name="GEBHRSCHL" type="packed" init="0" length="2"
precision="0" usage="inherit" />
<data name="BUCHTXSCHL" type="packed" init="0" length="3"
precision="0" usage="inherit" />
<data name="TARIF" type="char" init=" " length="2"
usage="inherit" />
<data name="REFBETRAG" type="packed" init="0" length="17"
precision="2" usage="inherit" />
<data name="BBEGINNDAT" type="packed" init="0" length="8"
precision="0" usage="inherit" />
<data name="MAXANZAHL" type="zoned" init="0" length="2"
precision="0" usage="inherit" />
<data name="DUMMY" type="char" init=" " length="1"
usage="inherit" />
</struct>
<struct name="PARAM" usage="output">
<struct name="PARAM-TAB" usage="inherit" count="2">
<data name="BETRAG" type="packed" init="0" length="17"
precision="2" usage="inherit" />
<data name="WERTSTELL" type="packed" init="0" length="8"
precision="0" usage="inherit" />
<data name="DUMMY" type="char" init=" " length="1"
usage="inherit" />
</struct>
</struct>
<struct name="ERGEBNIS" usage="output">
<struct name="RESULT" usage="inherit">
<data name="ORESULT" type="char" init=" " length="1"
usage="inherit" />
</struct>
<struct name="FEHLER" usage="inherit" count="20">
<struct name="OFEHLER" usage="inherit">
<data name="FEHLERFELD" type="char" init=" " length="17"
usage="inherit" />
<data name="FEHLERNR" type="char" init=" " length="4"
usage="inherit" />
<data name="KORREKTUR" type="char" init=" " length="1"
usage="inherit" />
<data name="FEHLERKLASSE" type="char" init=" " length="1"
usage="inherit" />
<data name="FEHLERMODUL" type="char" init=" " length="8"
usage="inherit" />
</struct>
</struct>
</struct>
</program>

So your Java programmer does not have to initialize all fields.
He/She have only set the fields he need to call the COBOL-object for
specified task.


Regards

Mgr. Ing. Roman Miklóš

Úsek informačných technológií
Prvá stavebná sporiteľna a.s.
Bajkalská 30, P.O.Box 48
829 48 Bratislava 25

Tel. : +421 2 58231 174
Fax : +421 2 58231 109
GSM : +421 903 184192




"Rick Beethe" <rick.beethe@xxxxxxxxxxxx>
Sent by: cobol400-l-bounces@xxxxxxxxxxxx
15.08.2007 21:30
Please respond to
COBOL Programming on the iSeries/AS400 <cobol400-l@xxxxxxxxxxxx>


To
<cobol400-l@xxxxxxxxxxxx>
cc

Subject
[COBOL400-L] COBOL and PCML and OUTPUT only fields






I've searched the archive for anything to do with PCML and didn't come
up with much.



Here is the problem we are encountering:

We would like to be able to cause the PCML to be generated with
usage=output so the java developer does not have to initialize
structures because they are currently inputoutput. We've found that by
creating this as a module and service program we can use the GIVING
clause in the PROCEDURE DIVISION statement. We have no problem
interfacing from COBOL to COBOL using this method however the PCML that
gets generated contains an error:

<struct name="LS-GETMSG01-OUTPUT-AREA" usage="output">

<!-- Error: the "returnvalue" data item must be a 4 byte
integer. (E) -->

<struct name="LS-FORMATTED-MESSAGES" usage="inherit">

<data name="LS-GETMSG-SEVERITY" type="char" length="2"
usage="inherit" />

<data name="LS-GETMSG-TEXT-L1" type="char" length="79"
usage="inherit" />

<data name="LS-GETMSG-TEXT-L2" type="char" length="79"
usage="inherit" />

<data name="LS-GETMSG-BIBO-NBR" type="char" length="79"
usage="inherit" />

<data name="LS-GETMSG-BIBO-TEXT" type="char" length="79"
usage="inherit" />

</struct>

</struct>

</program>

</pcml>

************End of Data********************

Here is the COBOL side of this:



WORKING-STORAGE SECTION.



01 LS-GETMSG01-OUTPUT-AREA.

* Data returned to caller

05 LS-FORMATTED-MESSAGES.

10 LS-GETMSG-SEVERITY PIC X(2).

10 LS-GETMSG-TEXT-L1 PIC X(79).

10 LS-GETMSG-TEXT-L2 PIC X(79).

10 LS-GETMSG-BIBO-NBR PIC X(79).

10 LS-GETMSG-BIBO-TEXT PIC X(79).



PROCEDURE DIVISION USING

BY REFERENCE LS-PROGRAM-COMM-AREA,

BY REFERENCE LS-MESSAGE-AREA,

BY REFERENCE LS-TEMP-STATE-AREA,

BY REFERENCE LS-GETMSG01-INPUT-AREA,

GIVING LS-GETMSG01-OUTPUT-BINARY.



Does anyone on the list have experience with PCML?

Our java team would prefer that we identify inputs versus outputs versus
inputoutput fields.



Rick Beethe

Manager of Application Development

Computer Research, Inc.

10170 Church Ranch Way, Suite 300

Westminster, CO 80021-6061

303.297.9200 x225








As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.