LINKMAP - Generate Link-Edit Maps for Load-Modules and Program Objects

                   

The LINKMAP TSO/E command reads existing load-modules and program objects and prints or displays their link-edit maps in the TSO/E or ISPF environment. LINKMAP runs in the batch and on-line environments on OS/390 and z/OS and supports Load-Libraries (PDS) as well as Program Libraries (PDSE).

Highlights

LINKMAP helps programmers, consultants and auditors quickly obtain an enhanced link-edit map in a format similar to the map produced by the DFSMS Binder. In addition, LINKMAP performs the following:

  1. Read the directory of the specified load-library (PDS) or program library (PDSE) and select members based on a list of names specified by the user. Member names can be fully-qualified, or contain wildcard characters, e.g. ABC* or %P*GH*.
  2. Generate a formatted display of the directory entry, including module size, date, attributes, and other linkage-editor options
  3. Generate a link-edit map in a format which is similar to that produced by the DFSMSdfp Binder when the load-module was link-edited or the program object was bound.
  4. Retrieve the AMODE, RMODE and IDR information and display it along with the corresponding CSECT. IDR information includes the translator code and compilation julian date.
  5. Write the LINKDATE report in cross-reference format. Dates appear in the left column; the other columns contain the names of the programs that were link-edited on the same date.
The LINKMAP product is available world-wide from GSF Software. For licensing information, please contact us
           

Command Syntax

LINKMAP is a TSO/E command and standard TSO/E rules for command syntax apply. Below is a list of options and parameters which can be specified. Please refer to the sample JCL for coding examples.

LINKMAP (defaults)
dsname Mandatory    
MEMBERS(member filters) n/a
EXCLUDEMEMBERS(member filters 2)   n/a
CSECTS(symbol filters) *
EXCLUDECSECTS(symbol filters 2) n/a
FROM(from-date) 19000101
TO(to-date) 20991231
VOLUME(volser) n/a
LastReferenceDate(KEEP|UPDATE) KEEP
SHR|OLD SHR
BASE(address)|TUCK BASE(0)
PUTLINE|BRIF|SYSPRINT(ddname) see note

Specifying Member Names

When no member name is specified in the LINKMAP command, all of the members of the specified load-library are processed. The entire load-library is also processed when MEMBERS(*) is specified. The user can press the ATTN key to terminate the processing.

The user can limit the processing by specifying which member (or members) should be processed, as follows:

CSECT-based Member Selection

LINKMAP checks the name of each CSECT (SD-type symbol) found in a member against the lists of symbols specified in the CSECTS and/or EXCLUDECSECTS operands, when specified. If CSECTS is not specified, CSECTS(*) is assumed. If one or more CSECTs in a member pass the test (i.e. match the CSECTS filters and do not match any of the EXCLUDECSECTS filters), the link-edit map is generated for the corresponding member.

Usage in the ISPF On-Line Environment

LINKMAP can be invoked in the ISPF on-line environment, for example via the TSO command, or by entering LINKMAP in the command window of an enhanced member list. LINKMAP can also be invoked by entering LINKMAP in the command window of a data set list, in which case LINKMAP processes the entire load-library.

When LINKMAP runs in the ISPF on-line environment, the default output mode is automatically set to BRIF unless the PUTLINE or SYSPRINT options are specified. When the BRIF output mode is used, the link-edit maps are displayed via the BROWSE Interface (BRIF). In the ISPF V5 environment, the V command can be used to switch from BROWSE to VIEW, thereby allowing the user to enter EDIT commands such as CREATE or CUT, or EDIT macros such as ROUTE.

When LINKMAP is invoked to produce several maps, it desynchronises the building of the maps from their displaying via the BRIF interface, allowing the user to see the first map as soon as it is produced. Additional maps are made visible as they are are produced, each time the user presses the Enter key or enters the DOWN command. Entering the END command terminates LINKMAP's processing.

The LINKMAP load-module is supplied with an ALIAS defined as LM. The LM command can be entered in ISPF panels which accept a TSO command, such as the panel displayed by the standard DSLIST. If the LM ALIAS conflicts with the name of another program, it can be deleted or renamed.

Sample JCL

LINKMAP runs as a TSO command on-line or in batch. The following sample job stream shows how to set up a TMP job step to execute several LINKMAP commands in a batch job.

 //LINKMAP3 JOB (acct#),'LINK MAP',CLASS=U,MSGCLASS=H
 //*
 //*      Generate Link-Edit Maps
 //*
 //LINKMAP EXEC PGM=IKJEFT01
 //STEPLIB  DD DSN=<LINKMAP Load Library>,DISP=SHR
 //SYSTSPRT DD SYSOUT=*
 //LINKDATE DD SYSOUT=* 		(optional)
 //SYSTSIN  DD *

  /* Process a single program */

 LINKMAP 'SYS1.LINKLIB(AMBLIST)'

  /* Process an entire library */

 LINKMAP 'SYS1.LINKLIB'
  or
 LINKMAP 'SYS1.LINKLIB' MEMBERS(*)

  /* Process selected programs */

 LINKMAP 'SYS1.LINKLIB' MEMBERS(ADRDSSU IEB* %MA* ) XMEM(IEBDG)

  /* Process programs which contain the specified CSECTs */

 LINKMAP 'APPL.LOADLIB' MEMBERS(PAY1* PAY2*) CSECT(SUB0* SUB1472) XCSECT(SUB011 SUB%2*)

  /* Process a single program in an uncataloged library */

 LINKMAP 'SYS1.LINKLIB(AMBLIST)' VOL(NEWRES)

 /* 

LMCOMP REXX exec

The LMCOMP REXX exec compares the link-edit maps of two different load-modules (or program objects) which reside in the same load-library or in two different load-libraries. LMCOMP runs LINKMAP to product link-edit maps for the two specified programs, then calls SUPERC to compare the two maps. LMCOMP then displays the SUPERC output using the ISPF BROWSE service. The data set and member names for two load-modules must be specified when LMCOMP is invoked.

Example : LMCOMP prod.lib.lmod(member1) test.pds.load(prog2)

LMCOMP is available from the support center.

LINKMAPH TSO HELP

The LINKMAPH member is a TSO HELP member which can be copied into the LINKMAP member of SYS1.HELP or of another PDS listed in the HELP section of the current IKJTSOxx member in PARMLIB. LINKMAPH is available from the support center.

Sample Output

Several sample output listings produced by LINKMAP are available on this Web site:

  1. Sample 1
  2. CBT Tape - File 183 Link-Edit Maps
  3. RPGII Maps

Search key-words: ibm mvs os/390 os390 z/os zos clist rexx os/vs load-module analyse analyser analyze analyzer analysis identify compile date compiler translator tool data id cobol assembler pl/1 pl1 pl/i pli link-edit map link-edit date dates linkdate lkeddate csect report list-idr data esd cesd rld txt cross-reference xref determine extract display date load-library load-libraries loadlib lib load-module length date load-modules lengths le language environment compilation options program library program object objects pds pdse pds/e binder linkage editor linkedit link edit lked properties attributes attr attrib rent reus amode a24 a31 aany amin rmode rany r24 use compilation date time signature record product code codes idrdata load object module modules generic wildcard wildcards wild-card wild-cards partially-qualified fully-qualified determine module entry points terminal utility batch delink relink amblist iehlist 5740-cb1 5740cb1 5740cb103 5752SC104 566528408 566529508 5695DF108 5695PMB01 mainframe main-frame search find inside creation date created lkedmap