Search

Saturday, January 12, 2013

Triggering CICS transaction from batch - PART1


Basics on Triggering transaction from batch

In CICS, we can trigger transaction from batch. Before triggering there is some settings which should be present for CICS to accept the commands from batch, there is console definition which should defined in the terminal table and these are provided in the IBM supplied resource group DFH$CNSL. Please check if that is set else contact admin group of CICS to have that set up.

MODIFY command is used to trigger the transaction from a batch job and it abbreviated to F.
Example: 
Following JCL executes the transaction TXN1 in the CICS region CICREN1
//CICSBTH1 JOB …
//STEP001 EXEC ...

// ………..
//STEP002 EXEC PGM=IEFBR14
// COMMAND 'F CICREN1,TXN1'
//*
Note
i) The MVS command is directly executed without waiting for the completion of the STEP001.
ii) The above command triggers the transaction TXN1 in the region CICREN1.
iii) The command must be placed between quotes.

To avoid the execution of the command before the completion of STEP001, launch the MVS command in separate job.
Example:
//BTCH1 JOB ......
//STEP001 EXEC ......
// --------
//STEP002  EXEC PGM=PGM1
//SYSPRINT DD SYSOUT=*
//SYSUT1     DD DATA,DLM=@@
//CICSBTH1 JOB ……
//STEP1  EXEC PGM=IEFBR14
// COMMAND 'F CICREN1,TXN1'
@@
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY
//*

In the above job, STEP002 submits the batch interface job (CICSBTH1) to internal reader upon the completion of the step STEP001. Thus the transaction TXN1 is triggered only after the completion of STEP001.

No comments:

Post a Comment