7/27/2019 CICS_Trianing Class_07.ppsx
1/16
IBM MAINFRAMES
CICS Training Class-07
7/27/2019 CICS_Trianing Class_07.ppsx
2/16
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
!"!C SQL function
#ptions !$D%!"!C
7/27/2019 CICS_Trianing Class_07.ppsx
3/16
DB2 database access by CICS
DATABASE
CICS
&pplication
'rogram
#perating System
Terminal
DATASETS
DB2 Region
CICS attachment facility
7/27/2019 CICS_Trianing Class_07.ppsx
4/16
DB2 entries
DB2%CICS connection is defined with in (C) * (esource Control
)able+
)he information in (C) is used to control interaction between CICS
and DB2
Command for (C) entry
C!D& D!, DB2!*DB2-+ .*.(#/' $&0!+
C!D& I$S DB2!*DB2-+ .*.(#/' $&0!+
In this provide the plan name and transaction id
C!D& D!, DB2)*DB2)+ .*.(#/' $&0!+
C!D& I$S DB2)*DB2)+ .*.(#/' $&0!+
I$ )1IS '(#ID! )1! )&S&C)I#$ ID &$D entry id
7/27/2019 CICS_Trianing Class_07.ppsx
5/16
re!arati"nC#B#$-CICS-DB2!r"gra%
SOURCE PROGRAM
DB2
PRE COMPILATION
LINK EDIT
BIND PROCESS
CICS
TRANSLATION
COBOL
COMPILATION
LOAD MODULE
PLAN PACKAGE
DBRM MEMBER
7/27/2019 CICS_Trianing Class_07.ppsx
6/16
Inter&al and Tas'c"ntr"l
7/27/2019 CICS_Trianing Class_07.ppsx
7/16
AS(TIME
/sed to obtain current date and time
Synta34
EXEC CICS ASKTIME ABSTIME(DATAITEM)
END-EXEC
&BS)I0! return the time in pac5ed decimal format
Data item 'IC clause is 6*-7+ comp
7/27/2019 CICS_Trianing Class_07.ppsx
8/16
F#RMATTIME
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
7/27/2019 CICS_Trianing Class_07.ppsx
9/16
DE$A)
/S!D to delay the processing of the tas5
)he issuing tas5 is suspended for a specified interval or until the
specified time
Synta3
EXEC CICS DELAY
INTERVAL(HHMMSS) | TIME(HHMMSS)
END-EXEC
C#$D)I#$S 4 !"'!I(!D8 I$(!Q
7/27/2019 CICS_Trianing Class_07.ppsx
10/16
START
/sed to start a transaction at the specified terminal and at the
specified time o interval
Data can be passed to the new transaction
Synta3EXEC CICS START
[TRANSID(TRANSID)]
[TERMID(TERMID)]
[TIME(HHMMSS) | INTERVAL (HHMMSS)]END-EXEC
Conditions4 I$(!Q L!$.!((8 )!(0ID!((8
)(&$SID!((
7/27/2019 CICS_Trianing Class_07.ppsx
11/16
#t*er Inter&al C"%%ands
!AIT4 )o wait for an event to occur
RETRIVE4 /sed to retrieve the data passed by the start
CANCEL4 /sed to cancel the interval request
EN"4 )o gain e3clusive control over a resource
DN"4 )o free the e3clusive control from the resource gained
by enq
7/27/2019 CICS_Trianing Class_07.ppsx
12/16
CICS S+$IED TRANSACTI#NS
7/27/2019 CICS_Trianing Class_07.ppsx
13/16
CICS S,!!lied Transacti"ns $ist
CICS transactions have identification codes that start with 9C: and are 7
characters long
Sign off C!S,
Sign on C!S$
Command%level interpreter C!CI
!3ecution diagnostic facility C!D,
0aster terminal C!0)
(esource definition online *(D#+ C!D&
)emporary%storage browse C!B(
7/27/2019 CICS_Trianing Class_07.ppsx
14/16
CICS S,!!lied Transacti"ns
CESN4 )# SI.$ #$ )# )1! CICS S;S)!0
CESF)# SI.$ #,,
7/27/2019 CICS_Trianing Class_07.ppsx
15/16
CICS S,!!lied Transacti"ns
CEMT4
Display )he Status #f )he CICS > System 'rocess
<er )he Status #f )he CICS > System 'rocess
(emove )he Installed (esource Definitions
'erform ,ew ,unction (elated )o System
CEBR4 )o browse the contents of CICS temporary storage queues
*)SQ+
CEDFto test command level application program interactively
7/27/2019 CICS_Trianing Class_07.ppsx
16/16
T*an's )",