Peter,
nice idea- but... have a look:
Here is my definition that defines what data structures I want (and of
course these are processed)
in the ADEXIT. If you write a stand-alone program, I imagine it is
pretty much the same logic.
ASMADATA PRINT=NOGEN, *
AID=NO, *
AOPT=NO, Options File Information *
COMPUNIT=NO, Compilation Unit Start/End *
DCDS=YES, DC/DS DSECT (Type X'0034') *
DCX=YES, Duplication Extension DSECT(Type X'0035') *
ESD=YES, ESD DSECT (Type X'0020') *
JID=YES, Job Identification DSECT (Type X'0000') *
MACH=YES, Machine Instruction DSECT (Type X'0036') *
MXREF=NO, Macro and Copy Code Source Summary X'0060'*
MXREFX=NO, Macro/Copy XReference DSECT (Type X'0062')*
OPT=NO, Options DSECT (Type X'0010') *
OUTPUT=NO, Output File DSECT (Type X'000A') *
RLD=NO, RLD DSECT (Type X'0040') *
RXREF=NO, Register XREFe DSECT (Type X'0045') *
SOURCE=YES, Source Analysis DSECT (Type X'0030') *
SRCERR=YES, Source Error DSECT (Type X'0032') *
STATS=YES, Statistics DSECT (Type X'0090') *
SYM=YES, Symbol DSECT (Type X'0042') *
USER=NO, User Data Record DSECT (Type X'0070') *
USING=YES, Using Map DSECT (Type X'0080') *
XREF=NO Symbol XREF DSECT (Type X'0044')
for some (i.e.SRCERR) I only take the sheer presence to abort collection
of data (since a program with error during compile can not be debugged).
Others there is a more elaborated routine (i.e. DCDS)
I have no problem publishing initial or the handling routines of
specific record- but there are in no way a complete program for any
purpose. They will be snippets of a working program. They can be taken
as starting point for you own routine (i.e. the parser that Charles
suggested).
The program gets control from the HLASM for this
OPEN,CLOSE,WRITE, PROCESS
I have no clue (would have to RTFM) what PROCESS is- I handle it with
this message:
'we never process any records(wrong call)'
The others are obvious.
Almost all processing is done in the WRITE part- Once the record-type is
identified it is a simple transformation of the incoming structure into
what you need on the outside. My program to extract all data needed for
debugging which is
-the compile listing as the human sees it (=for stepping thru the code)
-defined structures (DS and DC/DSECT) (=for showing structures with
names+content)
The information I needed was sometimes spread over multiple
record-types, but no major hurdles.
The ADEXIT is little under 500 cards long
Hope this helps
Martin