Previous Topic: z/OSNext Topic: Usage


z/VSE

The following sample JCL stream contains the steps required to make a host language source program with embedded SQL into form of executable modules. Complete JCL for central version execution is presented, followed by modifications for local mode execution.

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

Following the sample JCL is a table that gives the meaning of variables used in the examples along with a set of usage notes.

Central Version JCL

*****************************************************************
**                  PRECOMPILE COBOL PROGRAM                   **
*****************************************************************
// EXEC PROC=IDMSLBLS
// DLBL     idmspch,temp.dmlc,0
// EXTENT   SYS020,nnnnnn,,,ssss,llll
// ASSGN    SYS020,DISK,VOL=nnnnnn,SHR
// EXEC     IDMSDMLC
Optional precompiler parameters
/*
DMCL=dmcl-name
DICTNAME=dictionary-name
Additional SYSIDMS parameters, as appropriate
/*
Host language source statements with embedded SQL
/*
*****************************************************************
**                  CREATE ACCESS MODULE                       **
*****************************************************************
// EXEC     IDMSBCF
DMCL=dmcl-name
DICTNAME=dictionary-name
Additional SYSIDMS parameters, as appropriate
/*
CREATE ACCESS MODULE statement ;
COMMIT WORK RELEASE ;
/*
*****************************************************************
**                  COMPILE COBOL PROGRAM                      **
*****************************************************************
// DLBL     IJSYSIN,temp.dmlc,0
// EXTENT   SYSIPT,nnnnnn
// ASSGN    SYSIPT,DISK,VOL=nnnnnn,SHR
// OPTION   CATAL,NODECK,NOSYM
// PHASE    userprog,*
// EXEC     FCOBOL
*****************************************************************
**                  LINK PROGRAM MODULE                        **
*****************************************************************
// CLOSE    SYSIPT,SYSRDR
INCLUDE IDMS                    ◄──────────── Non-CICS only
INCLUDE IDMSCINT                ◄──────────── CICS only
ENTRY(userentry)
// EXEC     LNKEDT
/*

Variable Definitions

Variable

Definition

dictionary-name

Name of the dictionary containing the SQL definitions

dmcl-name

Name of the DMCL

f

File number of the tape journal file

idmspch

Host language compiler output to be passed to the linkage editor

idms.tapejrnl

File ID of the tape journal file

llll

Number of tracks (CKD) or blocks (FBA) of disk extent

nnnnnn

Volume serial identifier of appropriate disk volume

ssss

Starting track (CKD) or block (FBA) of disk extent

sysjrnl

Filename of the tape journal file

temp.dmlc

File ID of the precompiler output

userentry

Entry point for the user program

userprog

Name of the user program

Local Mode JCL

To execute in local mode, add these statements to the precompile step:

// TLBL     sysjrnl,'idms.tapejrnl',nnnnnn,,f
// ASSGN    SYS009,TAPE,VOL=nnnnnn

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. See the appropriate IBM CICS application programming documentation for details.