You are on page 1of 16

IBM MAINFRAMES

CICS Training Class-06

www.mainframes-online-training.weebly.com Polsani Anil Kumar


CICS – DB2

 CICS provides interface to DB2


 DB2 requires CICS attachment facility to connect itself to CICS
 CICS program can issue commands for DB2 with SQL in order to
access DB2 data base.

EXEC SQL function


Options
END-EXEC.
DB2 database access by CICS

Operating System

CICS
DB2 Region
Application
Program

CICS attachment facility


Terminal

DATASETS

DATABASE
DB2 entries

 DB2-CICS connection is defined with in RCT ( Resource Control


Table).
 The information in RCT is used to control interaction between CICS
and DB2
 Command for RCT entry
 CEDA DEF DB2E(DB21) G(GROUP NAME)
 CEDA INS DB2E(DB21) G(GROUP NAME)
 In this provide the plan name and transaction id.

 CEDA DEF DB2T(DB2T) G(GROUP NAME)


 CEDA INS DB2T(DB2T) G(GROUP NAME)
 IN THIS PROVIDE THE TASACTION ID AND entry id
Preparation COBOL-CICS-DB2 program

SOURCE PROGRAM

CICS DB2
DBRM MEMBER
TRANSLATION PRE COMPILATION

COBOL
COMPILATION
BIND PROCESS

LINK EDIT

PLAN PACKAGE
LOAD MODULE
Interval and Task control

www.mainframes-online-training.weebly.com Polsani Anil Kumar


ASKTIME

 Used to obtain current date and time


 Syntax:

EXEC CICS ASKTIME ABSTIME(DATAITEM)


END-EXEC.

 ABSTIME return the time in packed decimal format


 Data item PIC clause is 9(14) comp-3.
FORMATTIME

Used to format the time as needed

EXEC CICS FORMATTIME ABSTIME(DATA-ITEM)


[YYDDD(DATA-ITEM)]
[YYMMDD(DATA-ITEM)]
[ MMDDYYYY(DATA-ITEM) ]
[ DATESEP(‘/’) ]
[ TIME(DATA-ITEM)  ]
[ TIMESEP(‘:’)]
END-EXEC

Conditions : INVREQ
DELAY

 USED to delay the processing of the task


 The issuing task is suspended for a specified interval or until the
specified time

 Syntax
EXEC CICS DELAY
INTERVAL(HHMMSS) | TIME(HHMMSS)
END-EXEC.

 CONDTIONS : EXPEIRED, INVREQ


START

 Used to start a transaction at the specified terminal and at the


specified time o interval
 Data can be passed to the new transaction
 Syntax
EXEC CICS START
[TRANSID(TRANSID)]
[TERMID(TERMID)]
[TIME(HHMMSS) | INTERVAL (HHMMSS)]
END-EXEC.

 Conditions: INVREQ. LENGERR, TERMIDERR,


TRANSIDERR
Other Interval Commands

 WAIT: To wait for an event to occur


 RETRIVE: Used to retrieve the data passed by the start
 CANCEL : Used to cancel the interval request.
 ENQ: To gain exclusive control over a resource
 DNQ: To free the exclusive control from the resource gained
by enq
CICS SUPPLIED TRANSACTIONS

www.mainframes-online-training.weebly.com Polsani Anil Kumar


CICS Supplied Transactions List

 CICS transactions have identification codes that start with “C” and are 4
characters long

 Sign off CESF


 Sign on CESN
 Command-level interpreter CECI
 Execution diagnostic facility CEDF
 Master terminal CEMT
 Resource definition online (RDO) CEDA
 Temporary-storage browse CEBR
CICS Supplied Transactions

 CESN : TO SIGN ON TO THE CICS SYSTEM


 CESF TO SIGN OFF WHICH BREAKS the connection between user
and CICS
 If sign on is done for twice at the terminal. The previous operator will
be signed off
 CECI TO build and test the effect of CICS command
 CECI ASSIGN is used to get the current user-id and terminal-id.
CICS Supplied Transactions

 CEMT :
 Display The Status Of The CICS & System Process
 Alter The Status Of The CICS & System Process
 Remove The Installed Resource Definitions
 Perform Few Function Related To System

 CEBR : To browse the contents of CICS temporary storage queues


(TSQ)
 CEDF to test command level application program interactively
Thanks You

Polsani Anil Kumar

www.mainframes-online-training.weebly.com Polsani Anil Kumar

You might also like