Mike Slinn

Listing CSECTs using ABMLIST

Published 2024-04-11.
Time to read: 2 minutes.

This page is part of the mainframe collection.

This article discusses how I used AMBLIST to list CSECT definitions and references in the load modules that I uploaded as described in Receving files on an IBM mainframe

Running AMBLIST

Although AMBLIST has several functions, I was only able to find code examples that demonstrated how to run AMBLIST with one operational function directive at a time. Although it is possible that separate invocations might required to perform each function, multiple types of control statements could probably be specified in the same run.

AMBLIST will not do anything if no control statements are specified.

About ABMLIST

Function: Listing Object Module Contents

The AMBLIST manual says that the following can be obtained from an object module:

  1. Head record (HDR) - which may contain information about the character set and expected operating environment (GOFF only)
  2. External symbol dictionary entries (ESD or XSD)
  3. Relocation dictionary entries (RLD)
  4. Program text - the instructions and data, as output by the language translator (TXT)
  5. Translator identification record (IDRL) - which contains the compiler ID and compile date
  6. ADATA records (GOFF only)
  7. LEN records (GOFF only)
  8. END record

The following JCL is a modification of IBM’s example for using AMBLIST with the LISTOBJ control statement to list several program objects:

//OBJLIST       JOB    'M. SLINN',MSGCLASS=D,
//            MSGLEVEL=(1,1),NOTIFY=&SYSUID,REGION=0M
//LISTSTEP      EXEC   PGM=AMBLIST,REGION=12M
//SYSPRINT      DD     SYSOUT=A
//OBJLIB        DD     DSN=MIKES01.CICSADP.LOADLIB,DISP=SHR
//OBJSDS        DD     DSN=MIKES01.CICSADP.LOADLIB,DISP=SHR
//SYSIN         DD     *
    LISTOBJ         DDN=OBJSDS,
        TITLE=('ALL MODULES LISTED FROM CICSADP',5)
    LISTOBJ         DDN=OBJLIB,MEMBER=(NACCBRWS,NACCCRUD,NACCERRH),
        TITLE=('MODULE LISTING: NACCBRWS NACCCRUD NACCERRH',4)
    LISTOBJ      DDN=OBJLIB,MEMBER=(NACCTREC,NACTSET,NACWBRWS,NACWCRUD),
        TITLE=('MODULE LISTING: NACCTREC NACTSET NACWBRWS NACWCRUD',4)
    LISTOBJ         DDN=OBJLIB,MEMBER=(NACWERRH,NACWLITS,NACWLOCK,NACWTREC),
        TITLE=('MODULE LISTING: NACWERRH NACWLITS NACWLOCK NACWTREC',4)
/*
  • The OBJLIB and OBJSDS DD statements define the input data sets containing object modules.
  • 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 4 characters from the left margin.
  • LISTOBJ Control Statements #2-4
    Instructs AMBLIST to format several 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 4 characters from the left margin.

Function: Mapping CSECTs in a Load Module or Program Object

The following JCL is a modification of IBM’s example for using AMBLIST with the LISTOBJ control statement to list several program objects:

AMBLIST LISTOBJ JCL
//OBJLIST       JOB (A833B1NK),'M. SLINN',MSGCLASS=D,
//            MSGLEVEL=(1,1),NOTIFY=&SYSUID,REGION=0M
//LISTSTEP      EXEC   PGM=AMBLIST,REGION=12M
//SYSPRINT      DD     SYSOUT=A
//OBJSDS        DD     DSN=MIKES01.CICSADP.LOADLIB,DISP=SHR
//SYSIN         DD     *
    LISTLOAD OUTPUT=MODLIST,DDN=LOADLIB,
        MEMBER=NACCBRWS,
        TITLE=('LOAD MODULE LISTING OF NACCBRWS',20)
    LISTLOAD OUTPUT=XREF,DDN=LOADLIB,
        MEMBER=(NACCBRWS,NACCCRUD,NACCERRH,NACCTREC,NACTSET,NACWBRWS,NACWCRUD,NACWERRH,NACWLITS,NACWLOCK,NACWTREC),
        TITLE=('XREF LISTINGS OF NACCBRWS NACCCRUD NACCERRH NACCTREC NACTSET NACWBRWS NACWCRUD NACWERRH NACWLITS NACWLOCK NACWTREC',20)
    LISTLOAD TITLE=('XREF&LD MOD LSTNG-ALL MOD IN LINKLIB',20)
/*
  • SYSPRINT DD defines the message data set.
  • SYSIN DD defines the data set (in the input stream) that contains AMBLIST control statements.
  • The SYSLIB DD statement defines an input data set that contains the load modules or program objects to be formatted.
  • The OBJLIB and OBJSDS DD statements define the input data sets containing object modules.
  • LISTLOAD control statement lists the organization of CSECTs within the load module or program object.

Reading AMBLIST Output

The IBM documentation describes how to read AMBLIST output.

Follow-up

The IBM documentation says:

You can list all modules in the fixed link pack area, the modified link pack area, and the pageable link pack area.

To map link pack area modules, invoke AMBLIST with the LISTLPA control statement. For sample output, see LISTLPA output.

You can also produce a map and cross-reference listing of a nucleus.

To map the contents of the DAT-on nucleus, invoke AMBLIST with the LISTLOAD MEMBER=IEANUCxx control statement.

This might be worth following up.



* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.