Running your programs in CICS

After writing a program, you need to translate, compile, and link-edit it before you can run it. The examples in this section show the necessary steps. QMF does not ship the REXX EXEC, JCL, or CLIST in these examples, but you can copy them from here, altering them to suit your installation.

When you translate, compile, and link-edit a program that uses the QMF callable interface under CICS, consider the following:

Translating, compiling, and link-editing for CICS in MVS

The following example uses the CICS-supplied procedure DFHEBTDL. For instructions on how to use this procedure, see CICS for VSE/ESA System Definition Guide

Figure 38. JCL for running the CICS translator, C compiler, and linkage editor
//sampleC   JOB
//          EXEC PROC=DFHEBTDL
//TRN.SYSIN DD  *
#pragma   XOPTS(CICS translator options .....)
          .
          Your program or copy of QMF sample DSQABFC
          .
/*
//* Provide Access to QMF Communications Macro DSQCOMMC
//ASM.SYSLIB   DD DSN=QMF720.SDSQSAPE,DISP=SHR
//* Provide Access to QMF Interface Module
//LKED.QMFLOAD DD DSN=QMF720.SDSQLOAD,DISP=SHR
//LKED.SYSIN   DD *
          INCLUDE CICSLOAD(DFHELII)
          INCLUDE QMFLOAD(DSQCICX)
          ORDER DFHELII
          ENTRY sampleC
          MODE  AMODE(31) RMODE(ANY)
          NAME  sampleC(R)
/*

C/370 language programs must be link-edited with AMODE=31.

Translating, compiling, and link-editing for CICS in VSE

During the C/370 pre-link step, the IBM-supplied interface objects (DSQCICX.OBJ, DSQCLOD2.OBJ, and DSQCMCVP.OBJ) located in sublibrary PRD2.PROD (the QMF default install sublibrary) must be available in the LIBDEF * search chain.

During the link-edit step, the CICS assembler interface DFHEAI0 must be in the LIBDEF * search chain, as shown in Figure 39.

This sample job control is stored in PRD2.PROD as DSQ3CIC.Z.

Figure 39. Job control to run the CICS/VSE translator, C compiler, and linkage editor
// JOB DSQ3CIC    Sample job to Install QMF Callable Interface (C/370)
*  ---------------------------------------------------------------------
*  Install QMF Callable Interface Example (C/370)
*  ---------------------------------------------------------------------
// SETPARM VOLID=volid         *-- update volid for syspch
// SETPARM START=rtrk          *-- update start track/block
// SETPARM SIZE=ntrks          *-- update number of tracks/blocks
// SETPARM VOLID2=volid2       *-- update volid for work area
// SETPARM START2=rtrk         *-- update start track/block
// SETPARM SIZE2=ntrks         *-- update number of tracks/blocks
*  ---------------------------------------------------------------------
// DLBL   IJSYSPH,'c.translation',0
// EXTENT SYSPCH,,1,0,&START,&SIZE
ASSGN SYSPCH,DISK,VOL=&VOLID,SHR
*  Library search chain must contain the QMF, CICS and C/370 sublibrary
// LIBDEF *,SEARCH=(PRD2.PROD,PRD1.BASE,PRD2.CONFIG)
// LIBDEF PHASE,CATALOG=PRD2.PROD
*  --------------------------------------------------------------------
*  Step 1: Translate callable interface program (C/370)
*  ---------------------------------------------------------------------
*  You may need to update or remove the SLI statement for your program.
*  ---------------------------------------------------------------------
// EXEC   DFHEDP1$,SIZE=256K
..*  $$ SLI MEM=DSQABFC.Z,S=PRD2.QMFD
/*
CLOSE SYSPCH,00D
*  ---------------------------------------------------------------------
*  Step 2: Compile callable interface program (C/370)
*  ---------------------------------------------------------------------
// DLBL   IJSYSIN,'c.translation',0
// EXTENT SYSIPT
ASSGN SYSIPT,DISK,VOL=&VOLID,SHR
// DLBL   IJSYSPH,'compiler.output',0
// EXTENT SYSPCH,,1,0,&START2,&SIZE2
ASSGN SYSPCH,DISK,VOL=&VOLID2,SHR
// OPTION DECK
// EXEC EDCCOMP,SIZE=EDCCOMP,PARM='RENT'
CLOSE SYSIPT,SYSRDR
CLOSE SYSPCH,00D
*  ---------------------------------------------------------------------
*  Step 3: Pre-link callable interface program (C/370)
*  ---------------------------------------------------------------------
// DLBL   IJSYSIN,'compiler.output',0
// EXTENT SYSIPT
ASSGN SYSIPT,DISK,VOL=&VOLID2,SHR
// OPTION CATAL,NODECK
   PHASE DSQABFC,*
         INCLUDE DFHELII
         INCLUDE DFHEAI0
// EXEC EDCPRLK,SIZE=EDCPRLK
CLOSE SYSIPT,SYSRDR
/*
*  ---------------------------------------------------------------------
*  Step 4: Link-edit callable interface program (C/370)
*  ---------------------------------------------------------------------
// EXEC LNKEDT,PARM='AMODE=24,RMODE=24'
/*
/&
// JOB  RESET
ASSGN SYSIPT,SYSRDR    IF 1A93D, CLOSE SYSIPT,SYSRDR
ASSGN SYSPCH,00D       IF 1A93D, CLOSE SYSPCH,00D
/&
[ Previous Page | Next Page | Contents | Index ]