If you have a set of IMODs that you use regularly (for instance, a reporting program run in a production environment), you can convert them into a stand‑alone, executable load module. This eliminates using SRVBATCH and its PARM and control information.
The load module can be executed like any other load module. There are no required runtime libraries or data sets, except those required by the IMODs themselves. The contents of the EXEC card PARM field are passed to the entry IMOD as the argument string. The contents of the SYSIN data set, if one is provided, can be read by PULL and PARSE PULL REXX instructions in the absence of other stack contents.
To package IMODs as a load module
The IMODs work correctly.
The IMODs are converted to object decks and placed in PDS members.
Note: For information about the PACKAGE batch maintenance command, see the Reference Guide.
The executable load module is created.
Example: Create a Reporting Program
You want to create a program called REPORT by packaging all IMODs that are prefixed REPORT_ in an ISET called USER, and the IMODs DATA7 and VERIFY in the ISET called SYSTEM. You want program execution to start with the IMOD REPORT_BEGIN. During execution, the program requires the use of ADDRESS IDCAMS and ADDRESS COMMAND.
//STEP1 EXEC PGM=SRVMAINT,REGION=4M //STEPLIB DD DSN=CAI.CAW0LOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //USER DD DSN=CAI.IMOD.USER,DISP=SHR //SYSTEM DD DSN=CAI.IMOD.SYSTEM,DISP=SHR //PDS DD DSN=CAI.PDS.TEMP,DISP=(OLD,PASS) //SYSIN DD * NAME_LIST &LIST1 INCLUDE USER /REPORT_&/ NAME_LIST &LIST2 INCLUDE NAME VERIFY INCLUDE NAME DATA7 PACKAGE IMOD &LIST1 FROM USER TO PDS PACKAGE IMOD &LIST2 FROM SYSTEM TO PDS PACKAGE PARM ADDRESS IDCAMS IDCAMS 15 PACKAGE PARM ADDRESS COMMAND GSVXAPIE 15 DETACH TYPE 0 PACKAGE COMPLETE ENTRY REPORT_BEGIN TO PDS /* //LKED EXEC PGM=IEWL,PARM='LIST,MAP,RENT',REGION=4M,COND=(0,NE) //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) //SYSLMOD DD DSN=user.linklib,DISP=SHR //SYSLIB DD DSN=CAI.PDS.TEMP,DISP=OLD //BASE DD DSN=CAI.CAW0LOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSLIN DD * ORDER SRVBASE(P) INCLUDE SYSLMOD(SRVBASE) INCLUDE SYSLIB(IMODLIST) INCLUDE SYSLIB(IMODPARM) ENTRY SRVBASE SETCODE AC(1) NAME REPORT(R)
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |