Previous Topic: Sample JCLNext Topic: z/VSE


z/OS

The following sample JCL streams contain the steps required to make a host language source program with embedded SQL into the form of executable modules. The first example is for execution under the central version, and the second example is for execution in local mode.

The host language for the examples is COBOL 1. Change the specification of precompiler name, precompiler options, and compiler name according to the host language and version of your program.

Following the second example is a table that gives the meaning of variables used in the examples.

Central Version JCL

//*****************************************************************
//**                  PRECOMPILE COBOL PROGRAM                   **
//*****************************************************************
//precomp  EXEC PGM=IDMSDMLC,REGION=1024K,
//             PARM='optional precompiler parameters'
//STEPLIB  DD   DSN=idms.dba.loadlib,DISP=SHR
//         DD   DSN=idms.loadlib,DISP=SHR
//sysctl   DD   DSN=idms.sysctl,DISP=SHR
//dcmsg    DD   DSN=idms.sysmsg.ddldcmsg,DISP=SHR
//SYS001   DD   UNIT=disk,SPACE=(TRK,(10,10))
//SYS002   DD   UNIT=disk,SPACE=(TRK,(10,10))
//SYS003   DD   UNIT=disk,SPACE=(TRK,(10,10))
//SYSPCH   DD   DSN=&.&.source,DISP=(NEW,PASS),
//             UNIT=disk,SPACE=(TRK,(10,5),RLSE),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//SYSLST   DD   SYSOUT=A
//SYSIDMS  DD   *
DMCL=dmcl-name
DICTNAME=dictionary-name
Additional SYSIDMS parameters, as appropriate
/*
//SYSIPT   DD   *
Host language source statements with embedded SQL
/*
//*****************************************************************
//**                  CREATE ACCESS MODULE                       **
//*****************************************************************
//accmod   EXEC PGM=IDMSBCF,REGION=1024K
//STEPLIB  DD   DSN=idms.dba.loadlib,DISP=SHR
//         DD   DSN=idms.loadlib,DISP=SHR
//sysctl   DD   DSN=idms.sysctl,DISP=SHR
//dcmsg    DD   DSN=idms.sysmsg.ddldcmsg,DISP=SHR
//SYSLST   DD   SYSOUT=A
//SYSIDMS  DD   *
DMCL=dmcl-name
DICTNAME=dictionary-name
Additional SYSIDMS parameters, as appropriate
/*
//SYSIPT   DD   *
CREATE ACCESS MODULE statement ;
COMMIT WORK RELEASE ;
/*
//*****************************************************************
//**                  COMPILE COBOL PROGRAM                      **
//*****************************************************************
//compile   EXEC PGM=IKFCBL00,REGION=240K,
//             PARM='DECK,NOLOAD,NOLIB,BUF=500000,SIZE=150K'
//STEPLIB  DD   DSN=sys1.cobol.linklib,DISP=SHR
//SYSUT1   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSUT2   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSUT3   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSUT4   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSPUNCH DD   DSN=&.&.object,DISP=(NEW,PASS),
//             UNIT=disk,SPACE=(TRK,(10,5),RLSE),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//SYSPRINT DD   SYSOUT=A
//SYSIN    DD   DSN=&.&.source,DISP=(OLD,DELETE)
//*****************************************************************
//**                  LINK PROGRAM MODULE                        **
//*****************************************************************
//link     EXEC PGM=IEWL,REGION=300K,PARM='LET,LIST,XREF'
//SYSUT1   DD   UNIT=disk,SPACE=(TRK,(20,5))
//SYSLIB   DD   DSN=sys1.coblib,DISP=SHR
//loadlib  DD   DSN=idms.loadlib,DISP=SHR
//SYSLMOD  DD   DSN=user.loadlib,DISP=SHR
//SYSPRINT DD   SYSOUT=A
//SYSLIN   DD   DSN=&.&.object,DISP=(OLD,DELETE)
//         DD   *
 INCLUDE loadlib(IDMS)          ◄──────────── Non-CICS only
 INCLUDE loadlib(IDMSCINT)      ◄──────────── CICS only
 ENTRY   userentry
 NAME    userprog(R)
/*
//*

Local Mode JCL

//*****************************************************************
//**                  PRECOMPILE COBOL PROGRAM                   **
//*****************************************************************
//precomp  EXEC PGM=IDMSDMLC,REGION=1024K,
//             PARM='precompiler parameters'
//STEPLIB  DD   DSN=idms.dba.loadlib,DISP=SHR
//         DD   DSN=idms.loadlib,DISP=SHR
//dictb    DD   DSN=idms.appldict.ddldml,DISP=SHR
//dloddb   DD   DSN=idms.appldict.ddldclod,DISP=SHR
//sqldd    DD   DSN=idms.syssql.ddlcat,DISP=SHR
//sqlxdd   DD   DSN=idms.syssql.ddlcatx,DISP=SHR
//sqllod   DD   DSN=idms.syssql.ddlcatl,DISP=SHR
//dcmsg    DD   DSN=idms.sysmsg.ddldcmsg,DISP=SHR
//sysjrnl  DD   DSN=idms.tapejrnl,DISP=(NEW,CATLG,UNIT=tape
//SYS001   DD   UNIT=disk,SPACE=(TRK,(10,10))
//SYS002   DD   UNIT=disk,SPACE=(TRK,(10,10))
//SYS003   DD   UNIT=disk,SPACE=(TRK,(10,10))
//SYSPCH   DD   DSN=&.&.source,DISP=(NEW,PASS,DELETE),
//             UNIT=disk,SPACE=(TRK,(10,5),RLSE),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//SYSLST   DD   SYSOUT=A
//SYSIDMS  DD   *
DMCL=dmcl-name
DICTNAME=dictionary-name
Additional SYSIDMS parameters, as appropriate
/*
//SYSIPT   DD   *
Host language source statements with embedded SQL
/*
//*****************************************************************
//**                  CREATE ACCESS MODULE                       **
//*****************************************************************
//accmod   EXEC PGM=IDMSBCF,REGION=1024K
//STEPLIB  DD   DSN=idms.dba.loadlib,DISP=SHR
//         DD   DSN=idms.loadlib,DISP=SHR
//dictb    DD   DSN=idms.appldict.ddldml,DISP=SHR
//dloddb   DD   DSN=idms.appldict.ddldclod,DISP=SHR
//sqldd    DD   DSN=idms.syssql.ddlcat,DISP=SHR
//sqlxdd   DD   DSN=idms.syssql.ddlcatx,DISP=SHR
//sqllod   DD   DSN=idms.syssql.ddlcatl,DISP=SHR
//dcmsg    DD   DSN=idms.sysmsg.ddldcmsg,DISP=SHR
//sysjrnl  DD   DSN=idms.tapejrnl,DISP=(NEW,CATLG,UNIT=tape
//SYSLST   DD   SYSOUT=A
//SYSIDMS  DD   *
DMCL=dmcl-name
DICTNAME=dictionary-name
Additional SYSIDMS parameters, as appropriate
/*
//SYSIPT   DD   *
CREATE ACCESS MODULE statement ;
COMMIT WORK RELEASE ;
/*
//*****************************************************************
//**                  COMPILE COBOL PROGRAM                      **
//*****************************************************************
//compile  EXEC PGM=IKFCBL00,REGION=240K,
//             PARM='DECK,NOLOAD,NOLIB,BUF=500000,SIZE=150K'
//STEPLIB  DD   DSN=sys1.cobol.linklib,DISP=SHR
//SYSUT1   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSUT2   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSUT3   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSUT4   DD   UNIT=disk,SPACE=(TRK,(10,5))
//SYSPUNCH DD   DSN=&.&.object,DISP=(NEW,PASS,DELETE),
//             UNIT=disk,SPACE=(TRK,(10,5),RLSE),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//SYSPRINT DD   SYSOUT=A
//SYSIN    DD   DSN=&.&.source,DISP=(OLD,DELETE)
//*****************************************************************
//**                  LINK PROGRAM MODULE                        **
//*****************************************************************
//link     EXEC PGM=IEWL,REGION=300K,PARM='LET,LIST,XREF'
//SYSUT1   DD   UNIT=disk,SPACE=(TRK,(20,5))
//SYSLIB   DD   DSN=sys1.coblib,DISP=SHR
//loadlib  DD   DSN=idms.loadlib,DISP=SHR
//SYSLMOD  DD   DSN=user.loadlib,DISP=SHR
//SYSPRINT DD   SYSOUT=A
//SYSLIN   DD   DSN=&.&.object,DISP=(OLD,DELETE)
//         DD   *
 INCLUDE loadlib(IDMS)          ◄──────────── Non-CICS only
 INCLUDE loadlib(IDMSCINT)      ◄──────────── CICS only
 ENTRY   userentry
 NAME    userprog(R)
/*
//*

Note: The link of CICS application programs that use IDMSCINT must incorporate JCL to resolve external reference DFHEI1. The particular JCL depends on the nature and language of your application. For more information, see the appropriate IBM CICS application programming documentation.

Variable Definitions

Variable

Definition

accmod

Stepname for batch Command Facility execution of the CREATE ACCESS MODULE statement

compile

Stepname for the compile step

dcmsg

DDname of the system message area (DDLDCMSG)

dictb

DDname of the application dictionary definition area (DDLDML)

dictionary-name

Name of the dictionary containing the SQL definition areas

disk

Symbolic device name for workfiles

dloddb

DDname of the application dictionary definition load area (DDLDCLOD)

dmcl-name

Name of the DMCL

idms.appldict.ddldclod

Data set name of the application dictionary definition load area (DDLDCLOD)

idms.appldict.ddldml

Data set name of the application dictionary definition area (DDLDML)

idms.dba.loadlib

Data set name of the load library containing the DMCL and database name table load modules

idms.loadlib

Data set name of the load library containing the CA IDMS executable modules

idms.sysctl

Data set name of the SYSCTL file

idms.sysmsg.ddldcmsg

Data set name of the system message area (DDLDCMSG)

idms.syssql.ddlcat

Data set name of the SQL definition area (DDLCAT) of the application dictionary

idms.syssql.ddlcatl

Data set name of the SQL definition load area (DDLCATLOD) of the application dictionary

idms.syssql.ddlcatx

Data set name of the SQL definition index area (DDLCATX) of the application dictionary

idms.tapejrnl

Data set name of the tape journal file

loadlib

DDname of the load library containing the CA IDMS executable modules

precomp

Stepname for the precompile step

sqldd

DDname of the SQL definition area (DDLCAT) of the application dictionary

sqllod

DDname of the SQL definition load area (DDLCATLOD) of the application dictionary

sqlxdd

DDname of the SQL definition index area (DDLCATX) of the application dictionary

sysctl

DDname of the SYSCTL file

sysjrnl

DDname of the tape journal file

sys1.cobol.linklib

Data set name of the library containing the host language compiler module

sys1.coblib

Data set name of the library containing host language compiler subroutines

tape

Symbolic device name for tape journal file

userentry

Entry point for the user program

user.loadlib

Data set name of the load library containing executable modules for user programs

userprog

Name of the user program

&.&object.

Host language compiler output to be passed to the linkage editor

&.&source.

Precompiler output to be passed to the host language compiler