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



On 7/8/2010 11:13 AM, Thorbjoern Ravn Andersen wrote:
We now have a situation where we want to send copy members over data
queues from Cobol to Java and back again. Previously in similar
situation where we need to share a data structure, I have recreated the
Cobol data structure by hand in Java, which is a bit tedious and error
prone.
...
I was wondering if any of the Cobol compilers on the i could be asked
nicely to generate a dump of the resulting datastructure, so you could
look up "PACKINGGROUP" and be told "ah, that is a character array 10
long placed in index 142 (or so) of PARAM-FIELDS". We use OPM Cobol but
ILE would be fine too.


PCML might help. You could try defining a program with your data structure as a parameter to the program, and ask the ILE COBOL compiler to generate PCML.

CRTBNDCBL PGMINFO(*PCML) INFOSTMF(...)

The PCML can be used by the ProgramCallDocument class of Java.

I was able to generate the PCML when I removed the FILLER line so the subfields were defined as part of PARAM-FIELDS. (I also had to rename CLASS since it seems to be a reserved word.)

01 PARAM-FIELDS PIC X(1024).
03 STATUS-CODE PIC X(02).
...

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.