ZZRELINK

ZZRELINK is a utility that can be used to examine selected load modules from a PDS (or an entire PDS) and either generate JCL to execute the link editor to re-link the modules or dynamically invoke the link editor to re-link them modules.

ZZRELINK is located in File #361 of the CBT tape and was written by Frank Johnston of Chambersburg, Pennsylvania.  The assembled load modules for the utilities on File #361 are contained in file #362, but since most of the contents of the CBT tape were assembled on much later operating systems than we are using under Hercules, I prefer to take the source and re-assemble it.

 

Installation

I have extracted the Assembler source from the CBT tape, inserted the macros inline, and added JCL to assemble it with IFOX00.  The resulting jobstream - zzrelink.jcl - is contained in the archive zzrelink.tgz [MD5: 31CCABC818B9A860D3F835051B502C9D].  Download the archive and extract the jobstream (WinZip on Windows/?? or tar on Linux).  Submit the jobstream to assemble and link the single load module for LISTPDS into SYS2.LINKLIB.  If you don't have SYS2.LINKLIB defined, you will need to modify the jobstream to specify a target load library.  Note:  The target link library must be authorized.

 

Executing ZZRELINK

The JCL to execute ZZRELINK is simple:

//RELINK  JOB 'JAY MOSELEY',CLASS=A,MSGLEVEL=(1,1)
//STEP1   EXEC PGM=ZZRELINK,REGION=256K
//SYSPRINT DD  SYSOUT=A
//LIBIN    DD  DSN=SYS1.LINKLIB,UNIT=3350,DISP=OLD,VOL=SER=MVSDLB
//LIBOUT   DD  DSN=SYS1.LINKLIB,UNIT=3330,DISP=OLD,VOL=SER=MVTRES
//SYSPUNCH DD  SYSOUT=B
//SYSIN    DD  *
  LINK INDD=LIBIN,OUTDD=LIBOUT
  SELECT MEMBER=(ICKDSF)
//

The LIBIN DD points to the load library which contains the load module(s) to be processed.  The LIBOUT DD points to the load library into which the module(s) are to be placed.  You may use any DD names you wish, LIBIN and LIBOUT are simply the ones I chose.  The control cards are read from the SYSIN DD.  The control cards are similar to those used for IEBCOPY:

LINK or L identifies the control card
INDD= or I= specifies the input library
OUTDD= or O= specifies the output library
SELECT or S identifies the control card
MEMBER= or M= specifies the member(s) to process

If the SYSPUNCH DD is included, the job stream required as input to the Linkage Editor will be punched.  If it is omitted, the Linkage Editor will be invoked to re-link the selected module(s).

The job stream punched will need to be examined before submitting.  Frequently the PARM contents will need some hand correcting.  The link-edit control statements will function as punched, but I usually prefer to clean up the alignment to make them more readible.


Caveats (from the notes included on the CBT file):

  1. Program will not correctly relink a page aligned program, so IEBCOPY is invoked to simply copy the program.
  2. When JCL is cut instead of the Linkage Editor being invoked (i.e. when a SYSPUNCH DD card is present), the EXEC parms are frequently wrong.
  3. Ignore RC=08 (ZZRTERM unresolved) in the final link edit step.

I would add that when JCL is produced, the program does not correctly produce UNIT=3350 statements for libraries residing on 3350 DASD.  From this behavior I would expect a similar problem with 3380 and 3390 DASD, although I have not tried referencing libraries on 3380/3390 DASD, so this is just an assumption.  If you allow ZZRELINK to invoke the Link Editor rather than producing JCL, the relink works correctly on 3350 DASD.


I hope that you have found my instructions useful.  If you have questions that I can answer to help expand upon my explanations and examples shown here, please don't hesitate to send them to me:


Return to Site Home Page 


This page was last updated on January 17, 2015 .