List the contents of an object module
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.
- 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.
- 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.