|© 1998-2017 GSF Software LLC|
The LOADXREF utility program reads load libraries to extract information about load-modules and the CSECTs they contain. This information, which consists of reports and tables, can be used to answer many questions regarding the load-modules, as well as their contents and structure, very helpful in identifying NORES modules in an Enterprise COBOL for z/OS V5.1 migration as candidates for recompilation:
In many application re-engineering projects, where large program inventories have to be processed (such as conversions, year-2000 impact analysis, Language Environment implementation, etc), LOADXREF helps see clear through the maze of your load libraries.
LOADXREF runs on MVS/ESA, OS/390 and z/OS, and can process multiple load libraries in the same run. By default, LOADXREF processes entire libraries but include/exclude member-name lists can be supplied to limit the scope of the analysis to specified programs.
LOADXREF runs as a batch program in the MVS, OS/390 and z/OS environment, using the sample JCL provided below.
LOADXREF reads input load libraries using DDname LOADLIB, which may include up to 123 load libraries or extents. When LOADLIB consists of a concatenation of load libraries, programs are processed in member name alphanumeric sequence and duplicates are ignored. When PARM=1 is specified, programs are processed in library and member name sequence, including duplicates.
Program Libraries (PDSE) must be converted to PDS using the COPYMOD command of IEBCOPY before they can be processed by LOADXREF. As an alternative, a Program Library (PDSE) can be directly processed by the LINKMAP utility which provides a subset of LOADXREF's functions.
This report displays the link-edit map, which contains the following:
This report is in cross-reference format. Dates appear in the left column; the other columns contain the programs that were link-edited on the same date.
This optional report contains a list of unresolved external references found in each load-module.
The CSECTXRF, PGMDATA and COBOPTS tables contain data extracted from the LINKMAP report. These tables are sequential output data sets which contain raw data in tabular format and can be best used in a reporting program, SORT, etc.
This table can be used to determine where a particular CSECT is used and compare the different versions of a given CSECT found in several load-modules. Each record contains the following:
pos 1-8 name of the load-module pos 11-18 CSECT name pos 20-27 CSECT hash-code pos 29-34 compilation date (YYYY-MM-DD) pos 36-37 compiler's abbreviated code pos 39-42 reference flags (ERef) pos 44-53 compilation option string (COBOL)
This table can be used to compare programs on different MVS systems. Each PGMDATA record contains the following:
pos 1-4 System-ID of the system on which LOADXREF ran pos 6-13 name of the load-module pos 15-22 program hash-code pos 24-29 link-edit date (YYYY-MM-DD) pos 31-36 length in hex pos 38-43 entry-point address pos 45-48 RMODE pos 50-54 AMODE pos 55-70 link-edit options
This table can be used to determine what compilation options were used to compile a particular COBOL module. Currently, this file only includes the option bit string, as stored by the compiler in the object code. The meaning of the option string is described in the appropriate compiler's documentation. However, LOADXREF checks for the NORES, CMPR2, DATA(24) and NODYNAM options of recent COBOL compilers and displays them as such, based on the setting of the corresponding flag.
LOADXREF generates link-edit control statements on the LINKDECK DD for COBOL or PLI programs that need to be relink-edited for LE. This file is only produced when SCEELKED is present in the JCL. Sample output (PLI and OS/VS COBOL):
REPLACE PLISTART,PLIMAIN INCLUDE SYSLIB(AOFECDT$) SETOPT PARM(RENT,REUS) ENTRY PLISTART NAME AOFECDT$(R) REPLACE ILBOCOM0,ILBOSRV,ILBOMSG,ILBOBEG INCLUDE SYSLIB(COB1CICS) ENTRY COB1CICS NAME COB1CICS(R)
LOADXREF calculates program (load-module) and module (CSECT) hash codes which appear in the contents of certain output files. These hash codes are calculated on the text data of the load-modules and CSECTs only and help determine if a load-module or CSECT is identical to another load-module or CSECT. The algorithm for calculating hash code ignores certain dates which are contained in the code generated by certain compilers to ensure their values are independent of the compilation date.
The ERef value, which appears in certain LOADXREF reports, is a CSECT-related composite element which indicates the number of references to the corresponding module. For instance, a value of 0002 indicates that the corresponding CSECT is referenced (via VCONs) by two other modules in the same load-module. A value of 0000 indicates that the CSECT is not referenced by another module and could probably be deleted from the load-module via a relink operation. The ERef value is always displayed in hexadecimal.
The first two bits the ERef value are used for flags.
LOADXREF processes load-modules, extract information, and writes out a set of reports in which the extracted information is presented in various ways. Although LOADXREF does not offer options, customisation is possible as follows:
//* //LOADXREF EXEC PGM=LOADXREF,PARM='*,01' //* //STEPLIB DD DSN=<LOADXREF.Load.Library>,DISP=SHR //* //SYSPRINT DD SYSOUT=* CONTROL REPORT //* //LINKMAP DD SYSOUT=* LINK-EDIT MAPS //* //LINKDATE DD SYSOUT=* PROGRAM NAMES SORTED BY LINK-EDIT DATE //* //UNRESOLV DD SYSOUT=* LIST OF UNRESOLVED EXTERNAL REFERENCES //* //CSECTXRF DD SYSOUT=* CSECT/PROGRAM CROSS-REFERENCE //* //PGMDATA DD SYSOUT=* RECAP DATA BY PROGRAM //* //COBOPTS DD SYSOUT=* COBOL OPTIONS //* //LINKDECK DD SYSOUT=* link-edit control statements //* //SCEELKED DD DSN=CEE.SCEELKED,DISP=SHR //* //* Input Load Libraries (up to 123 Libraries/Extents) //* //LOADLIB DD DSN=(your load Library #1),DISP=SHR // DD DSN=(your load Library #2),DISP=SHR //* //SELDD DD * Member selection list (optional) KSR04T PAYR21F /*
LOADXREF only works in PDSs, not in PDSEs, in this case you would have to copy the Program Objects/modules to a PDS in order to extract the information you need using a JCL stream like the following sample:
//IBMUSERA JOB (9999),IEBGENER, // CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID, // MSGLEVEL=(1,1),REGION=8M //********************************************************************** //COPYTEMP EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=OLD,DSN=YOUR.PDSE.LIBRARY //SYSUT2 DD DSN=YOUR.TEMP.PDS,VOL=SER=VOLID,UNIT=SYSDA, // SPACE=(TRK,(1,1,1)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920), // VOL=SER=VOLID, // DISP=(NEW,CATLG) //SYSIN DD DUMMY //* //LOADXREF EXEC PGM=LOADXREF //STEPLIB DD DSN=<LOADXREF.Load.Library>,DISP=SHR //SYSPRINT DD SYSOUT=* CONTROL REPORT //LINKMAP DD SYSOUT=* LINK-EDIT MAPS //LINKDATE DD SYSOUT=* PROGRAM NAMES SORTED BY LINK-EDIT DATE //UNRESOLV DD SYSOUT=* LIST OF UNRESOLVED EXTERNAL REFERENCES //CSECTXRF DD SYSOUT=* CSECT/PROGRAM CROSS-REFERENCE //PGMDATA DD SYSOUT=* RECAP DATA BY PROGRAM //COBOPTS DD SYSOUT=* COBOL OPTIONS //LINKDECK DD SYSOUT=* LINK-EDIT CONTROL CARDS //SCEELKED DD DSN=CEE.SCEELKED,DISP=SHR //SELDD DD * MEMBER SELECTION LIST (OPTIONAL) MODULE1 MODULE2 //* INPUT LIBRARIES (UP TO 123 LIBRARIES/EXTENTS) //LOADLIB DD DISP=(SHR,DELETE,DELETE),DSN=YOUR.TEMP.PDS /*
Most compilers include their own "translator ID", or compiler signature, in the object code they generate. These signatures (e.g. 5740CB100 0204) are stored by the linkage-editor or binder into the IDR records of the load-module or program object.
LOADXREF converts each compiler signature to a 2-character code, referred to as the "abbreviated translator code". As not all compilers or assemblers provide a signature, LOADXREF can still recognize certain translators using other criteria when no signature is present for a given module (CSECT).
Code Translator name AE S/360 OS ASSEMBLER (E) AF S/360 OS ASSEMBLER (F) AG WATERLOO ASSEMBLER (G) AL S/360 OS ALGOL (F) A1 APL/360 A1 APL2 V1 A2 APL2 VERSION 2 BA VS BASIC C C FOR SYSTEM/370 (MVS) C C/370 COMPILER AND LIBRARY V2 C C/370 COMPILER V1 V2 C SAA AD/CYCLE C/370 V1 V2 C C/C++ OS/390 C C/C++ z/OS CA OS FULL ANS COBOL V3 CA OS FULL ANS COBOL V4 CA S/360 OS FULL ANS COBOL V1 V2 CE S/360 OS COBOL (E) C1 VS COBOL FOR OS/VS (R2M2) C1 VS COBOL FOR OS/VS (R2M3) C2 VS COBOL II C3 COBOL/370 and COBOL for MVS (5688-197) C3 COBOL for OS/390 (5648-A25) C3 Enterprise COBOL (5655-G53) E+ EASYTRIEVE PLUS (EZPDRIVR) F? FORTRAN IV (H EXTENDED PLUS) FC OS FORTRAN CODE AND GO COMPILER FE S/360 OS SYSTEM FORTRAN IV (E) FG OS FORTRAN IV G1 FH OS FORTRAN IV H EXTENDED F2 VS FORTRAN V2 (COMP/LIB) F2 VS FORTRAN V2 (COMP/LIB/DEBUG) F3 VS FORTRAN R3 HL HIGH-LEVEL ASSEMBLER H1 ASSEMBLER H V1 H2 ASSEMBLER H V2 PA VS PASCAL PF S/360 OS PL/1 (F) PG Visual Age PL/I PK OS PL/I CHECKOUT COMPILER PV PASCAL/VS PO OS PL/I OPTIMIZING COMPILER P1 PL/I FOR MVS AND VM V1 P2 OS PL/I V2 P3 Enterprise PL/I V3 RG RPG II RG S/360 OS RPG RX REXX/370 XF OS/VS ASSEMBLER (XF)
Search key-words: ibm mvs os/390 os390 z/os zos load-module analyse analyser analyze analyzer analysis analizer analiser identify identifying compile compiler tool translator data id cobol assembler pl/1 pl1 pl/i pli link-edit map csect list idr data esd cesd rld txt cross-reference crossreference xref crossref cross-ref determine module entry points extract display date load-library load-libraries listing load-module load-modules 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 search find compilation date time compiler signature product code codes idrdata load object module modules delink relink mainframe main-frame creation date created xref40