Sample JCL: Appendix E

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

A P P E N D I X E

Sample JCL
This appendix includes sample JCL. It includes these sections:
• Nonreentrant User Program: C/370 Compiler
Compile and link a nonreentrant user program using the C socket library, the RPC library and the
C/370 compiler.
• Reentrant User Program: C/370 Compiler
Compile and link a reentrant user program using the C socket library, the RPC library and the
C/370 compiler.
• Nonreentrant User Program: SAS/C Compiler
Compile and link a nonreentrant user program using the C socket library, the RPC library and the
SAS/C compiler.
• Reentrant User Program: SAS/C Compiler
Compile and link a reentrant user program using the C socket library, the RPC library and the
SAS/C compiler.

Note If you are link-editing with the BINDER (HEWLF096) under SMP/E, you may get the error
message IEW2480W. This message can be safely ignored. You can turn this message off by setting
option MSGLEVEL=4 in the PARM field of the linkedit (binder).

Sample JCL E-1


Nonreentrant User Program: C/370 Compiler

Nonreentrant User Program: C/370 Compiler


//RPCIBMC JOB
//*
//* SAMPLE JCL TO COMPILE, LINK, AND EXECUTE A NONREENTRANT
//* USER PROGRAM USING THE TCP/API C SOCKET LIBRARY, THE
//* TCP/API RPC/XDR LIBRARY, AND THE IBM C/370 C COMPILER.
//*
//* EDIT THE JOB JCL STATEMENT, VERIFY THE DATA SET NAME(S)
//* OF THE USER'S DATA SETS, AND VERIFY THAT THE DATA SET
//* NAMES REFERENCED BELOW MATCH THE NAMES THAT YOU SELECTED
//* FOR THE TCP/IP TARGET DATA SETS (DSN'S TO BE VERIFIED
//* ARE MARKED BELOW WITH "<=== VERIFY ..."). THIS JOB ASSUMES
//* THAT THE STANDARD IBM C/370 EDCCLG JCL PROCEDURE IS
//* AVAILABLE IN YOUR INSTALLATION'S PROCLIB(S).
//*
//CLGNRENT EXEC EDCCLG,
// INFILE='USER.C(CPROG)', <=== VERIFY DSNAME
// PARM='NORENT,DEF(IBMC)',
// GPARM='PROGRAM PARAMETERS' <=== VERIFY PARAMETERS
//*
//* INCLUDE THE TCP/API SOCKET INCLUDE (.H) DATA SET IN THE
//* COMPILER SYSLIB CONCATENATION. BOTH THE SOCKET AND RPC/XDR
//* INCLUDE FILES ARE FOUND IN THE SAME SYSLIB DATA SET.
//*
//COMPILE.SYSLIB DD DISP=SHR,DSN=TRGINDX.H <=== VERIFY DSNAME
// DD DISP=SHR,DSN=&VSCCHD&CVER&EDCHDRS
//* INCLUDE THE TCP/API SOCKET SUBROUTINE LIBRARY DATA SET IN
//* THE LINKAGE EDITOR SYSLIB CONCATENATION. BOTH THE SOCKET
//* AND RPC/XDR LOAD MODULES ARE INCLUDED IN THE SAME SYSLIB
//* DATA SET.
//*
//LKED.SYSLIB DD
// DD
// DD DISP=SHR,DSN=TRGINDX.CILIB <=== VERIFY DSNAME
//
//LKED.SYSIN DD DUMMY,DCB=(LRECL=80,RECFM=FB,BLKSIZE=3120)

E-2 Cisco IOS for S/390 RPC/XDR Programmer’s Reference


Reentrant User Program: C/370 Compiler
This JCL is for the C/370 version of the compiler.
If you are using the Ad/Cycle compiler, replace the following line (shown in bold in the JCL):
// DD DISP=SHR,DSN=&VSCCHD&CVER&EDCHDRS
with this line:
// DD DISP=SHR,DSN=&LNGPRFX..SEDCDHDR

//RPCIBMCR JOB
//*
//* SAMPLE JCL TO COMPILE, LINK, AND EXECUTE A REENTRANT USER
//* PROGRAM USING THE TCP/API C SOCKET LIBRARY, THE TCP/API
//* RPC/XDR LIBRARY, AND THE IBM C/370 C COMPILER.
//*
//* EDIT THE JOB JCL STATEMENT, VERIFY THE DATA SET NAME(S)
//* OF THE USER'S DATA SETS, AND VERIFY THAT THE DATA SET
//* NAMES REFERENCED BELOW MATCH THE NAMES THAT YOU SELECTED
//* FOR THE TCP/IP TARGET DATA SETS (DSN'S TO BE VERIFIED ARE
//* MARKED BELOW WITH "<=== VERIFY ..."). THIS JOB ASSUMES THAT
//* THE STANDARD IBM C/370 EDCCPLG JCL PROCEDURE IS AVAILABLE
//* IN AVAILABLE IN YOUR INSTALLATION'S PROCLIB(S).
//*
//CLGRENT EXEC EDCCPLG,
// INFILE='USER.C(CPROG)', <=== VERIFY DSNAME
// CPARM='RENT,DEF(IBMC)',
// GPARM='PROGRAM PARAMETERS' <=== VERIFY PARAMETERS
//*
//* INCLUDE THE TCP/API SOCKET INCLUDE (.H) DATA SET IN THE
//* COMPILER SYSLIB CONCATENATION. BOTH THE SOCKET AND RPC/XDR
//* INCLUDE FILES ARE FOUND IN THE SAME SYSLIB DATA SET.
//*
//COMPILE.SYSLIB DD DISP=SHR,DSN=TRGINDX.H <=== VERIFY DSNAME
// DD DISP=SHR,DSN=&VSCCHD&CVER&EDCHDRS <=== VERIFY Ad/Cycle name
//*
//* INCLUDE THE TCP/API SOCKET SUBROUTINE OBJECT LIBRARY
//* DATA SET IN THE PREPROCESSOR SYSLIB CONCATENATION.
//* BOTH THE SOCKET AND RPC/XDR OBJECT MODULES ARE INCLUDED
//* IN THE SAME SYSLIB DATA SET.
//*
//PLKED.SYSLIB DD DISP=SHR,
// DSN=TRGINDX.CIROBJ <=== VERIFY DSNAME
//PLKED.SYSIN DD DSN=*.COMPILE.SYSLIN,DISP=(OLD,DELETE)
// DD *
INCLUDE SYSLIB(S0SKCF)
INCLUDE SYSLIB(S0INTR)
INCLUDE SYSLIB(RPCFDS)
ENTRY CEESTART
/*
//

Sample JCL E-3


Nonreentrant User Program: SAS/C Compiler

Nonreentrant User Program: SAS/C Compiler


//RPCSASC JOB
//*
//* SAMPLE JCL TO COMPILE, LINK, AND EXECUTE A NONREENTRANT
//* USER PROGRAM USING THE TCP/API C SOCKET LIBRARY, THE
//* TCP/API C RPC/XDR LIBRARY, AND THE SAS/C COMPILER. THIS
//* SAMPLE WORKS WITH SAS/C 4.50, 5.00, AND 5.01.
//*
//* EDIT THE JOB JCL STATEMENT, VERIFY THE DATA SET NAME(S)
//* OF THE USER'S DATA SETS, AND VERIFY THAT THE DATA SET
//* NAMES REFERENCED BELOW MATCH THE NAMES THAT YOU SELECTED
//* FOR THE TCP/IP TARGET DATA SETS (DSN'S TO BE VERIFIED
//* ARE MARKED BELOW WITH "<=== VERIFY ..."). THIS JOB ASSUMES
//* THAT THE STANDARD SAS SAS/C LC370CLG JCL PROCEDURE IS
//* AVAILABLE IN YOUR INSTALLATION'S PROCLIB(S).
//*
//CLNORENT EXEC LC370CLG,
// PARM.C='NORENT,DEF(SASC)',
// PARM.GO='PROGRAM PARAMETERS' <=== VERIFY PARAMETERS
//*
//* TCP/IP INCLUDE FILE DATA SET MUST PRECEDE SAS/C
//* DATA SET. BOTH THE SOCKET AND RPC/XDR INCLUDE FILES
//* ARE IN THE SAME DATA SET.
//*
//C.SYSLIB DD DISP=SHR,DSN=TRGINDX.H <=== VERIFY DSNAME
// DD DISP=SHR,DSN=&MACLIB
//C.SYSIN DD DISP=SHR,
// DSN=USER.C(CPROG) <=== VERIFY DSNAME
//*
//* TCP/IP OBJECT SYSLIB DATA SET MUST PRECEDE SAS/C
//* DATA SETS. BOTH THE SOCKET AND RPC/XDR LOAD
//* MODULES ARE IN THE SAME SYSLIB DATA SET.
//*
//LKED.SYSLIB DD DISP=SHR,
// DSN=TRGINDX.CSLIB <=== VERIFY DSNAME
// DD DISP=SHR,DSN=SASC.&ENV.LIB <=== VERIFY DSNAME
// DD DISP=SHR,DSN=&SYSLIB
// DD DISP=SHR,DSN=&CALLLIB
//LKED.SYSIN DD DUMMY,DCB=(LRECL=80,RECFM=FB,BLKSIZE=3120)

E-4 Cisco IOS for S/390 RPC/XDR Programmer’s Reference


Reentrant User Program: SAS/C Compiler
//RPCSASCR JOB
//*
//* SAMPLE JCL TO COMPILE, LINK, AND EXECUTE A REENTRANT C
//* PROGRAM USING THE TCP/API C SOCKET LIBRARY, THE TCP/IP
//* C RPC/XDR LIBRARY, AND THE SAS/C C COMPILER. THIS SAMPLE
//* WORKS WITH SAS/C 4.50, 5.00, AND 5.01.
//*
//* EDIT THE JOB JCL STATEMENT, VERIFY THE DATA SET NAME(S)
//* OF THE USER'S DATA SETS, AND VERIFY THAT THE DATA SET
//* NAMES REFERENCED BELOW MATCH THE NAMES THAT YOU SELECTED
//* FOR THE TCP/IP TARGET DATA SETS (DSN'S TO BE VERIFIED
//* ARE MARKED BELOW WITH "<=== VERIFY ..."). THIS JOB ASSUMES
//* THAT THE STANDARD SAS SAS/C LC370C AND LC370LRG JCL
//* PROCEDURES ARE AVAILABLE IN YOUR INSTALLATION'S PROCLIB(S).
//* STEP 1: COMPILE USER PROGRAM REENTRANTLY.
//*
//CCRENT EXEC LC370C,
// PARM.C='RENT,DEF(SASC)'
//*
//* TCP/IP INCLUDE FILE DATA SET MUST PRECEDE SAS/C
//* DATA SET. BOTH THE SOCKET AND RPC/XDR INCLUDE FILES
//* ARE IN THE SAME DATA SET.
//*
//C.SYSLIB DD DISP=SHR,DSN=TRGINDX.H <=== VERIFY DSNAME
// DD DISP=SHR,DSN=&MACLIB
//C.SYSIN DD DISP=SHR,
// DSN=USER.C(CPROG) <=== VERIFY DSNAME
//*
//* STEP 2: LINK USER PROGRAM USING SAS/C CLINK
//* PREPROCESSOR AND THEN EXECUTE.
//*
//LKRENT EXEC LC370LRG,PARM.LKED='LIST,MAP,RENT',
// PARM.GO='PROGRAM PARAMETERS' <=== VERIFY PARAMETERS
//*
//* TCP/IP OBJECT SYSLIB DATA SET MUST PRECEDE SAS/C
//* DATA SETS. BOTH THE SOCKET AND RPC/XDR LOAD MODULES
//* ARE IN THE SAME SYSLIB DATA SET.
//*
//* TCP/IP OBJECT SYSLIB DATA SET MUST PRECEDE SAS/C
//* DATA SETS. BOTH THE SOCKET AND RPC/XDR LOAD MODULES
//* ARE IN THE SAME SYSLIB DATA SET.
//*
//LKED.SYSLIB DD DISP=SHR,DSN=TRGINDX.CSROBJ <=== VERIFY DSNAME
// DD DDNAME=AR#&ALLRES
// DD DISP=SHR,DSN=SASC.&ENV.OBJ <=== VERIFY DSNAME
// DD DISP=SHR,DSN=&SYSLIB
// DD DISP=SHR,DSN=&CALLLIB
//LKED.SYSIN DD DISP=(OLD,DELETE),DSN=*.CCRENT.C.SYSLIN
// DD *
INCLUDE SYSLIB(S0SKCF)
INCLUDE SYSLIB(S0INTR)
INCLUDE SYSLIB(RPCFDS)
ENTRY MAIN
//

Sample JCL E-5


Reentrant User Program: SAS/C Compiler

E-6 Cisco IOS for S/390 RPC/XDR Programmer’s Reference

You might also like