The associated data file can also be useful for assemblies that
have macro processing only (SYSGENs for example). The printing of
the generated assembler source is not printed in the listing, but
the information is available in the associated data file.
Figure 1 shows part of the listing
of an assembler program that only includes a macro instruction. The
statements generated by the macro instruction (statements 9 through
11) are not printed on the listing. If this program is assembled
with the ADATA option, the records produced in the associated data
file are in the sequence shown below.
Figure 1. Sample assembler program for macro-only
assembly Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2008/07/11 17.48
1 print nogen 00001000
2 macro 00002000
3 &NAME testhla &job 00003000
4 punch '//&job JOB' 00004000
5 punch '//STEP1 EXEC PGM=ABC' 00005000
6 punch '//DDNAME1 DD DSN=DSN.&job.,DISP=SHR' 00006000
7 mend 00007000
8 TESTHLA TESTJOB 00008000
12 END 00009000
- Type
- Description
- X'0002'
- ADATA Compilation Unit START record
- X'0001'
- ADATA Identification record
- X'0000'
- Job Identification record
- X'000A'
- Output File record
- X'0010'
- Options record
- X'0030'
- Source record for statement 1 print nogen
- X'0030'
- Source record for statement 2 macro
- X'0030'
- Source record for statement 3 &NAME testhla &job
- X'0030'
- Source record for statement 4 punch '//&job
JOB'
- X'0030'
- Source record for statement 5 punch '//STEP1
EXEC PGM=ABC'
- X'0030'
- Source record for statement 6 punch '//DDNAME1
DD DSN=DSN.&job.,DISP=SHR'
- X'0030'
- Source record for statement 7 mend
- X'0030'
- Source record for statement 8 TESTHLA TESTJOB
- X'0030'
- Source record for statement 9 punch '//TESTJOB
JOB'
- X'0030'
- Source record for statement 10 punch '//STEP1
EXEC PGM=ABC'
- X'0030'
- Source record for statement 11 punch '//DDNAME1
DD DSN=DSN.TESTJOB,DISP=SHR'
- X'0030'
- Source record for statement 12 END
- X'0060'
- Macro and Copy Code Source Summary record for macro TESTHLA
- X'0062'
- Macro and Copy Code Cross Reference record for macro TESTHLA
- X'0090'
- Assembly Statistics record
- X'0002'
- ADATA Compilation Unit END record The count value in this record
is 21.