You can use AMBLIST to format three types of object module:
- OBJ (traditional object module)
- XOBJ (extended object module, based on OBJ)
- GOFF (Generalized Object File Format).
You can list the following information from an object module:
- the head record (HDR) - which may contain information about the
character set and expected operating environment (GOFF only)
- external symbol dictionary entries (ESD or XSD)
- relocation dictionary entries (RLD)
- the text of the program - the instructions and data, as output
by the language translator (TXT)
- translator identification record (IDRL) - which contains the compiler
ID and compile date
- ADATA records (GOFF only)
- LEN records (GOFF only)
- and the END record.
To list object module contents, invoke AMBLIST with the LISTOBJ
control statement. For sample outputs, see LISTOBJ outputs.
In
Figure 1, AMBLIST is used to format
and list an object module included in the input stream.
Figure 1. Example:
Listing an object module //LSTOBJDK JOB MSGLEVEL=(1,1)
// EXEC PGM=AMBLIST,REGION=64K
//SYSPRINT DD SYSOUT=A
//OBJMOD DD *
object module
/*
//SYSIN DD *
LISTOBJ DDN=OBJMOD,
TITLE=('OBJECT MODULE LISTING FOR MYJOB',25)
/*
- OBJMOD DD Statement
- Defines the input data set, which follows immediately. In this
case, the input data set is an object module.
- SYSIN DD Statement
- Defines the data set containing AMBLIST control statements, which
follows immediately.
- LISTOBJ Control Statement
- Instructs AMBLIST to format the data set defined by the OBJMOD
DD statement. It also specifies a title for each page of output,
to be indented 25 characters from the left margin.
In Figure 2, AMBLIST is used to list
all object modules contained in the data set named OBJMOD, and three
specific object modules from another data set called OBJMODS.
Note: If you are using AMBLIST to list program objects, IBM® recommends that you specify REGION=12M or
higher.
Figure 2. Example:
Listing several object modules //OBJLIST JOB MSGLEVEL=(1,1)
//LISTSTEP EXEC PGM=AMBLIST,REGION=64K
//SYSPRINT DD SYSOUT=A
//OBJLIB DD DSN=OBJMODS,DISP=SHR
//OBJSDS DD DSN=OBJMOD,DISP=SHR
//SYSIN DD *
LISTOBJ DDN=OBJSDS,
TITLE=('OBJECT MODULE LISTING OF OBJSDS',20)
LISTOBJ DDN=OBJLIB,MEMBER=(OBJ1,OBJ2,OBJ3),
TITLE=('OBJECT MODULE LISTING OF OBJ1 OBJ2 OBJ3',20)
/*
- OBJLIB and OBJSDS DD Statements
- Define input data sets that contain object modules.
- SYSIN DD Statement
- Defines the data set in the input stream containing AMBLIST control
statements.
- LISTOBJ Control Statement #1
- Instructs AMBLIST to format the data set defined by the OBJSDS
DD statement, treating it as a single member. It also specifies a
title for each page of output, to be indented 20 characters from the
left margin.
- LISTOBJ Control Statement #2
- Instructs AMBLIST to format three members of the partitioned data
set (PDS or PDSE) defined by the OBJLIB DD statement. It also specifies
a title for each page of output, to be indented 20 characters from
the left margin.