You can use cataloged procedures rather than supply all the JCL required for a job step. You can use JCL statements to override the statements of the cataloged procedure to tailor the information provided by the link-edit process.
For a description of the IBM-supplied cataloged procedures that include a link-edit step, see Table 1.
//LKED EXEC PGM=HEWL
//LKED EXEC PGM=HEWL,PARM='MAP'
ddname | Type | Function |
---|---|---|
SYSLIN | Input | Primary input to the link-edit process consists of a sequential data set, members from a PDS or PDSE, or an in-stream data set. The primary input must be composed of one or more separately compiled object modules or link-edit control statements. An executable program cannot be part of the primary input, although it can be introduced by the INCLUDE control statement (see Using the INCLUDE statement). |
SYSLMOD | Output | The data set where output (executable program) from the link-edit process is stored. |
SYSPRINT | Output | SYSPRINT defines the location for the listing that includes
reference tables for the executable program. Output from the link-edit
process:
|
SYSUT1 | Utility | A data set used by the linkage editor as a temporary workspace (the data set must be on a direct access device). This data set is not required for the binder. |
ddname | Type | Function |
---|---|---|
SYSLIB1 | Library | Secondary input to the linkage editor consists of object modules
or load modules that are included in the executable program from the
automatic call library. The
automatic call library contains load modules or object modules that
are used as secondary input to the linkage editor to resolve external
symbols left undefined after all the primary input has been processed.
The automatic call library can include:
SYSLIB is input to the linkage editor only if the CALL=NO link-edit option is not in effect (see Table 1, in z/OS MVS Program Management: User's Guide and Reference and z/OS MVS Program Management: Advanced Facilities , or in z/OS TSO/E Command Reference for more information). You can also identify secondary input to the linkage editor with the INCLUDE statement. A routine compiled with a Language Environment-conforming compiler cannot be executed until the appropriate Language Environment resident routines have been linked into the executable program. The Language Environment resident routines are contained in the SCEELKED library; the data set name could be CEE.SCEELKED. If you are unsure where SCEELKED has been installed at your location, contact your system administrator. This data set must be specified in the SYSLIB statement in your JCL. In
the following example, the SYSLIB DD statement is written so that Language Environment resident
library routines are included as secondary input into your executable
program:
|
User-specified2 | Input | You can use ddnames to get additional executable programs and object modules. |
Notes:
|
A typical sequence of job control statements for link-editing an object module (compiled NOXPLINK) into an executable program is shown in Figure 1. The NAME linkage editor control statement in the figure puts PROGRAM1 in USER.LOADLIB with the member name PROGRAM1.
//LKED EXEC PGM=HEWL,PARM='MAP'
//SYSPRINT DD SYSOUT=A
//SYSLMOD DD DSNAME=USER.LOADLIB,UNIT=SYSDA,
// DISP=(NEW,KEEP),SPACE=(CYL,(10,10,1))
//SYSLIB DD DSNAME=CEE.SCEELKED,DISP=SHR
//SYSLIN DD DSNAME=USER.OBJLIB(PROGRAM1),DISP=SHR
// DD DDNAME=SYSIN
//SYSIN DD *
NAME PROGRAM1(R)
/*
A similar sequence of job control statements for link-editing an XPLINK object module is shown in Figure 2.
//LKEDX EXEC PGM=IEWL,REGION=20M,
// PARM='AMODE=31,RENT,DYNAM=DLL,CASE=MIXED,MAP,LIST=NOIMP'
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DSNAME=USER.PDSELIB,UNIT=SYSALLDA,
// DISP=(NEW,KEEP),SPACE=(TRK,(7,7,1)),DSNTYPE=LIBRARY
//SYSLIB DD DSNAME=CEE.SCEEBND2,DISP=SHR
//SYSLIN DD DSNAME=USER.OBJLIB(PROGRAM1),DISP=SHR
// DD DSNAME=CEE.SCEELIB(CELHS003),DISP=SHR
// DD DSNAME=CEE.SCEELIB(CELHS001),DISP=SHR
//SYSDEFSD DD DUMMY
//SYSIN DD *
NAME PROGRAM1(R)
/*
The output from the binder is usually placed in a private program library.
The automatic call library that is used as input to the binder can be a Language Environment library (for example, SCEELKED/SCEELKEX for non-XPLINK applications, and SCEEBND2 for XPLINK applications), a compiler library, a private program library, or a subroutine library.
When an Enterprise PL/I for z/OS or PL/I for MVS & VM main procedure is link-edited with other object modules produced by the Enterprise PL/I for z/OS or the PL/I for MVS & VM compilers, the entry point of the resulting executable program is resolved to the external symbol CEESTART. This happens automatically because the CEESTART CSECT is generated first in the object module and is specified in the END statement of the object module. Runtime errors occur if the executable program entry point is forced to some other symbol by use of the linkage editor ENTRY control statement.
If an Enterprise PL/I for z/OS or PL/I for MVS & VM main procedure is link-edited with object modules produced by other language compilers or by assembler, and is the first module to receive control, the user must ensure that the entry point of the resulting executable program is resolved to the external symbol CEESTART. This happens automatically if the Enterprise PL/I for z/OS or PL/I for MVS & VM main procedure is first in the input to the linkage editor. Runtime errors occur if the executable program entry point is forced to some other symbol by use of the linkage editor ENTRY control statement.
ENTRY CEESTART