Thanks for all the replies so far.
I've started with having a look on the OPTION(*MAP) as it seems to be the
simplest to get started with from where we are now.  CRTCBLPGM gives a nice,
long listing with the following snippet corresponding to the beginning of
this copy member.
  1410  01  PARAM-FIELDS                     WS  00000000     1024  AN
.D02EA64
  1411  01  FILLER                           WS  00000000      822  GROUP
.D02EADA  REDEFINES .D02EA64
  1412  02  STATUS-CODE                      WS  00000000        2  AN
.D02EB42
  1413  02  KEYS                             WS  00000002        5  GROUP
.D02EBB8
  1414  03  DGMID                            WS  00000002        5  AN
.D02EC98
  1415  02  DATA-FIELDS                      WS  00000007      815  GROUP
.D02ED08
  1416  03  ADR-FIELDS                       WS  00000007      310  GROUP
.D02ED7E
  1417  04  AUNNUMBER                        WS  00000007       10  AN
.D02EDF2
  1418  04  ACLASS                           WS  00000017       10  AN
.D02EE66
  1419  04  ASUBRISK                         WS  00000027       10  AN
.D02EED6
  1420  04  APSN                             WS  00000037       85  AN
.D02EF48
  1421  04  APACKINGGROUP                    WS  00000122       10  AN
.D02EFB6
  1422  04  AKGL                             WS  00000132       10  AN
.D02F02E
  1423  04  AMAXQUANTITY1136                 WS  00000142       10  AN
.D02F09C
  1424  04  ACLASSIFICATIONCODE              WS  00000152       10  AN
.D02F116
I read this as line number, level (renumbered), field name, _W_orking
_S_pace, starting index (from where?), length, type (AN=alpha numeric?,
GROUP is a group, and elsewhere I've seen NE, ZONED, PACKED, BOOLN, etc.),
I-name (internal location of variable information?), and attributes (with
plenty more besides REDEFINES like INDICATOR, VALUE, DEVICE DATABASE etc).
Does this happen to be officially documented anywhere?  My Google-fu did not
locate anything.
Thanks :)
/Thorbjørn
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Simon Coulter
Sent: 8. juli 2010 20:35
To: Java Programming on and around the iSeries / AS400
Subject: Re: Copy book layout - can a compiler tell?
On 09/07/2010, at 1:13 AM, Thorbjoern Ravn Andersen wrote:
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.
OPTION(*MAP) will give that information (for both compilers). Note  
that you'll still have to generate a matching Java structure. VRM520  
and later compilers  support generating PCML via the PGMINFO keyword  
but that will (I think) only give you the program call interface and  
nothing about any internal structures.
Regards,
Simon Coulter.
--------------------------------------------------------------------
    FlyByNight Software         OS/400, i5/OS Technical Specialists
    
http://www.flybynight.com.au/
    Phone: +61 2 6657 8251   Mobile: +61 0411 091 400        /"\
    Fax:   +61 2 6657 8251                                   \ /
                                                              X
                  ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.