Running Your Assembler programs in CICS

After you write your program, you need to translate, assemble, and link-edit it before you can run it. The examples listed in this section show the steps necessary to do so. 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.

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

When you translate, assemble, and link-edit a program that uses the QMF callable interface, be aware of the following:

The following JCL shows an example of the CICS-supplied procedure DFHEBTAL. For instructions on how to use this procedure, see CICS for VSE/ESA System Definition Guide

Figure 30. JCL for running the CICS translator, assembler, and linkage editor
//sampasm   JOB
//          EXEC PROC=DFHEBTAL
//TRN.SYSIN DD  *
*ASM      XOPTS(CICS translator options .....)
          .
          Your program or copy of QMF sample DSQABFA
          .
/*
//* Provide Access to QMF Communications Macro DSQCOMM
//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(DFHEAI)
          INCLUDE CICSLOAD(DFHEAI0)
          INCLUDE QMFLOAD(DSQCIA)
          ORDER DFHEAI,DFHEAI0
          ENTRY sampasm
          MODE  AMODE(31) RMODE(ANY)
          NAME  sampasm(R)
/*

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

The following VSE job control is an example of installing an HLASM program into CICS running in VSE/ESA. This example is shipped with QMF and is located in the QMF sublibrary under the name of DSQ3CIAC.Z. See CICS for VSE/ESA System Definition Guide for more information.

If your installation is using HLASM, make sure that your system administrator has established a VSE library exit that handles the macro processing of E-Decks. This exit reads the DSQCOMMA. For a description of how to set up this exit, see VSE Guide to System Functions and IBM High-Level Assembler Programmer's Guide for OS/390, VM and VSE for detailed information.

Use the following HLASM compiler options to assemble the program:

'LIBMAC,USING(NOLIMIT,NOWARN),EXIT(LIBEXIT(EDECKXIT(ORDER=EA)))'

The LIBEXIT parameter includes CICS macro definitions created by the CICS translation process.

Figure 31. Job control for running assembler and linkage editor in VSE
// JOB DSQ3CIAC
*  --------------------------------------------------------------------
*  Install QMF Callable Interface (HLASM)
*  ---------------------------------------------------------------------
// SETPARM VOLID=volid      *-- update volid for syspch
// SETPARM START=rtrk       *-- update start track/block (syspch)
// SETPARM SIZE=ntrks       *-- update number of tracks/blocks (syspch)
*  ---------------------------------------------------------------------
// DLBL   IJSYSPH,'ASM.TRANSLATION',0
// EXTENT SYSPCH,,1,0,&START,&SIZE.       
ASSGN SYSPCH,DISK,VOL=&VOLID.,SHR   
*  Library search chain must contain the QMF, CICS and HLASM sublibrary
// LIBDEF *,SEARCH=(PRD2.PROD,PRD1.BASE,PRD2.CONFIG)
// LIBDEF PHASE,CATALOG=PRD2.PROD
*  --------------------------------------------------------------------
*  Step 1: Translate Callable Interface program
*  ---------------------------------------------------------------------
*  You may need to update or remove the SLI statement for your program.
*  ---------------------------------------------------------------------
// EXEC   DFHEAP1$
* $$ SLI MEM=DSQABFAC.Z,S=PRD2.PROD
/*
*  --------------------------------------------------------------------
*  Step 2: Assemble Callable Interface program
*  ---------------------------------------------------------------------
CLOSE SYSPCH,00D
// DLBL   IJSYSIN,'ASM.TRANSLATION',0
// EXTENT SYSIPT
ASSGN SYSIPT,DISK,VOL=&VOLID.,SHR   
// OPTION CATAL,DECK,SYM,ERRS
   PHASE DSQABFAC,*
         INCLUDE DFHEAI
         INCLUDE DFHEAI0
         INCLUDE DSQCIA
         INCLUDE DSQCLOD2
         INCLUDE DSQCMCVP
// EXEC ASMA90,SIZE=(ASMA90,50K),                                      C
               PARM='LIBMAC,USING(NOLIMIT,NOWARN),EXIT(LIBEXIT(EDECKXITC
               (ORDER=EA)))'
CLOSE SYSIPT,SYSRDR
/*
*  --------------------------------------------------------------------
*  Step 3: Link-edit Callable Interface program
*  ---------------------------------------------------------------------
// EXEC LNKEDT,PARM='AMODE=31,RMODE=ANY'
/*
/&
// JOB  RESET
ASSGN SYSIPT,SYSRDR    IF 1A93D, CLOSE SYSIPT,SYSRDR
ASSGN SYSPCH,00D       IF 1A93D, CLOSE SYSPCH,00D
/&
[ Previous Page | Next Page | Contents | Index ]