29646761 Cics Mainframes
-
Upload
rohit-jaiswal -
Category
Documents
-
view
216 -
download
1
Transcript of 29646761 Cics Mainframes
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 1/331
CICS(Customer Information Control System)
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 2/331
Table of Contents
• Introduction to CICS
• Basic Mapping Support
• Program Control
• File Processing
• Error Handling
• Queues
• Interval and Task Control
• Recover and Restart• Program preparation
• CICS Supplied Transactions
• Case Stud
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 3/331
Introduction to CICS
• Customer In!ormation Control Sstem "CICS developed in late
#$%&s as a 'B('C control sstem
• CICS provides an inter!ace )et*een t+e ,perating Sstem and
application programs• Macro -evel CICS " initial version .ssem)ler macro to re/uest
CICS services
• Command -evel CICS " +ig+ level lang0version " commands to
re/uest CICS services " Single command can replace series o!
macros
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 4/331
Batch & Online : Differences
BATCH SST!"10 Input data is prepared and
given in se/uence 2!ile3
40 Processing se/uence ispredicta)le and +encerestarting t+e process in caseo! !ailure is eas0
50 Programs and !iles can6t )es+ared
70 Programs are sc+eduledt+roug+ 8o)s
%0 ,(P printed on paper or inse/uential o! 9S.M or Inde:ed!iles
;0 Response time< Could )e
sc+eduled to )e Hours or das
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 5/331
CICS & O#eratin$ System
OOpeperratingating SystemSystem
CICSCICS
Files &
Database
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 6/331
DB%DC System
Terminals
Central System
CICS SstemEnvironment = .PI routines>and .pplication
Programs
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 7/331
C IC S S y s t e m Seric e s
• 'ata"Communication Functions
• 'ata"Handling Functions
• .pplication Program Services
• Sstem Services
• Monitoring Functions
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 8/331
Tas' & Transaction
• Tas' <" . )asic unit o! *ork *+ic+ is sc+eduled ) t+e
operating sstem or CICS
E: "Read !rom and *rite to t+e terminal
• Transaction <" .n entit *+ic+ initiates e:ecution o! a task0 InCICS> transaction is identi!ied ) t+e transaction identi!ier2Trans"id3
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 9/331
A##lication ro$rammin$
C onc e# ts
• Pseudo"Conversational
• Multitasking
• Multit+reading
• Quasi"Reentranc
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 10/331
Terminal ConersationConersational < . mode o! dialogue )et*een program andterminal )ased on a com)ination o! sending message andreceiving message *it+in t+e same task
Since +uman response is slo*er t+an t+e CP? speed> a
signi!icant amount o! resource *ill )e *asted 8ust *aiting
seudoConersational0 . mode o! dialogue )et*een programand terminal *+ic+ appears to t+e operator as a continuousconversation )ut *+ic+ is actuall carried ) a series o! tasks
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 11/331
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 12/331
Terminal Conersation
! * a m#lePR,CE'?RE 'I9ISI,@0
<FIRST"PR,CESS0
EAEC CICS RECEI9E """" TSD#>#1457
E@'"EAEC0< process
EAEC CICS SE@' """"" EMP2#14573 'etails
E@'"EAEC0
" " " " " " Program aits For Response " " " " "
SEC,@' PR,CESS0EAEC CICS RECEI9E """"" ?ser Enters 'ata
E@'"EAEC0
< process
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 13/331
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 14/331
s e udo C o n er s a ti o n!*am # le
Transaction TSD#
Program PR,G#
PR,CE'?RE 'I9ISI,@0
<EAEC CICS RECEI9EE@'"EAEC0
<EAEC CICS SE@'
E@'"EAEC0
EAEC CICS RET?R@
TR.@SI' 2TSD163
E@'"EAEC0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 15/331
C IC S C om#onents• Control ro$rams (or "ana$ement "odules)
Programs t+at inter!ace )et*een ,S and app0 pgm
Handle t+e general !unctions t+at are crucial to operation o!
CICS• Control Tables
'e!ine t+e CICS environment
Functionall associated *it+ t+e management module
• Control Bloc's (or Areas)Contain sstem tpe in!ormation0 Eg0 Task Control .rea
contains in!ormation a)out t+e task
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 16/331
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 17/331
" a n $e m e nt $ m s & Ctrl Ta b lesro$rams
Program Control PCP
File control FCP
Terminal Control TCP
Task Control DCP
Temporar Storage TSP
Transient 'ata T'P
Storage Control SCP
Interval Control ICPournal Control CP
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 18/331
C IC S ro$ra m C on s ide r a tions
Considerations:
• Must eventuall return control to CICS
• Can6t modi! procedure division instructions )ecause CICS
programs ma )e s+ared ) man tasks
• Can modi! *orking storage since a uni/ue cop o! *orkingstorage is created !or eac+ task
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 19/331
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 20/331
C IC S ro$ra m + es trictions
+estrictions:
• @o C,@FIG0 SECTI,@> I(, SECTI,@ to )e speci!ied in t+e
E@9IR,@ME@T 'I9ISI,@0
• FI-E SECTI,@> ,PE@> C-,SE> and non"CICS RE.' = RITE
statements are not permitted )ecause !ile management is +andled
) CICS0
• C,B,- commands suc+ as .CCEPT> 'ISP-.J> EAHIBIT>
TR.CE> ST,P R?@> G,B.CD are avoided0 2ST,P R?@ =G,B.CD are sometimes included in order to eliminate compiler
diagnostic )ut never e:ecuted3
16
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 21/331
Sam#le CICS ro$ram
ID!,TI-ICATIO, DI.ISIO,/
PR,GR.M"I'0 S.MP-E0
!,.I+O,"!,T DI.ISIO,0
DATA DI.ISIO,/0O+1I,2STO+A2! S!CTIO,/
&# S"I@P?T0
&7 S"TR.@SI' PIC A2530
&7 FI--ER PIC A2#30
&7 S"I@"EMP"C' PIC A253 9.-?E .--A60
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 22/331
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 23/331
Sam#le ro$ram (Contd//)
&# S",?TP?T0
&7 FI--ER PIC A2#%3 9.-?E EMP C,'E < 0
&7 S",?T"EMP"C' PIC A2530
&# S"-E@GTH PIC S$253 C,MP0
3I,1A2! S!CTIO,/C.@ Include 'FHC,MM.RE. i! data needs to )e communicated)et*een t*o transactions or multiple iterations o! t+e same
transaction0
+OC!D4+! DI.ISIO,/
555"AI,3I,!/PERF,RM #&&"REC9"I@P?T0
PERF,RM 1&&"SE@'",?TP?T0
EAEC CICS RET?R@ E@'"EAEC0
18
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 24/331
S a m#le ro$ra m (Contd//)655+!C.I,4T/
M,9E $ T, S"-E@GTH0
EAEC CICS RECEI9EI@T, 2S"I@P?T3 -E@GTH 2S"-E@GTH3
E@'"EAEC0M,9E S"I@"EMP"C,'E T, S",?T"EMP"C,'E
755S!,DO4T4T/EAEC CICS SE@'
FR,M 2S",?TP?T3 -E@GTH 21&3
ER.SEE@'"EAEC0
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 25/331
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 26/331
C IC S Tr a nslat o r
T+e CICS translator converts CICS commands into t+e C,B,-
code so t+at it could )e compiled ) a Standard Co)ol compiler
CICS program with CICS
Commands
CICS Translator
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 27/331
Tr a nslat o r
• +en ou compile a CICS(9S program t+e translator *ill
automaticall add man lines o! code to our program> *+ic+ can
)e seen in t+e compiled listing
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 28/331
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 29/331
Basic "a##in$ Su##ort
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 30/331
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 31/331
T o #ics in B " S
• Introduction to BMS
• Map and Mapset
• P+sical and Sm)olic Map
• Map 'e!inition Macros
• Screen Manipulation(Handling
• Screen 'esign Considerations
• Inter!acing *it+ Terminal using a Map
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 32/331
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 33/331
Introduction to B"S
Introductory conce#ts
In online sstems> !ormatted screens are used0 In order to
displa !ormatted screen> a terminal 2e0g0 41;K3 must
receive a series o! data stream called ,ati&e "ode Data
Stream (,"DS) )ased on t+e +ard*are protocolL t+is
@M'S is a mi:ture o! Buffer Control Characters (BCCs)
and te:t data0 @M'S is designed !or a particular terminal
and is t+us )ot+ device dependent and !ormat dependent0
So i! @M'S is used> re"coding is re/uired *+enever t+ere is
c+ange in t+e terminal device or screen !ormat0 To removet+is device and !ormat dependenc !rom application
program> CICS provides a !acilit called Basic "a##in$
Su##ort 2BMS30
24
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 34/331
rimar y - u n c tions of B " S• Removal o! device dependent codes !rom .pplication Program
• Removal o! constant in!ormation !rom .pplication program2Headers> Titles0003
• Construct @M'S " @ative Mode 'ata Stream
• Te:t +andling
• Terminal Paging = Message routing
• Contents o! t+e screen de!ined t+ru6 BMS is called Map0
• Map is a program *ritten in assem)l language0
• BMS macros are availa)le !or Map coding0
T+e BMS Macros are coded in t+e !orm o! Maps> and Mapsets tode!ine t+e screen attri)utes> screen !ield positions> and !ieldc+aracteristics0
25
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 35/331
"a# and "a#set
• Representation o! one screen !ormat is called Map 2screen
panel30
• ,ne or more maps> link edited toget+er> makes up a Mapset
2load module30
• Mapset must +ave a entr in PPT as given )elo*<
'FHPPT TJPEE@TRJ>M.PSETname,r 'FHPPT TJPEE@TRJ>PR,GR.Mname
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 36/331
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 37/331
" a # and " a # se t (Contd//)Mapset name +as t*o parts0
Generic name #" ; c+ars0 ?sed in .pp0 Program0
Su!!i: # c+ar 0 To identi! t+e device tpe
Multimap Panel
'namicall constructing a screen panel *it+ multiple maps at
t+e e:ecution time
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 38/331
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 39/331
"a# and "a#set (Contd//)
T+e concepts o! map and mapset can )e utilied in t*otpe o! cases as given )elo*<
Case 1: . mapset consist o! a single map0 For e0g0
M.PSET# M.P@?M#
Case 2 : . mapset consists o! several maps0 For e0g0
M.PSET1 M.P@?M#
M.P@?M1
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 40/331
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 41/331
Ty#es of "AS
T+ere are 1 tpes o! M.PS
• hysical "a#
P+sical Map is a map used ) CICS 2CSECT3
Ensure device independence in t+e application program
BMS macro coding N .ssem)lN -ink edit N -oad module N
-,.'-IB N To )e used ) CICS
• Symbolic "a#
Ensure device and !ormat independence in t+e application programSm)olic Map is a map used ) .pplication Program 2'SECT3
BMS macro coding N .ssem)l N Sm)olic map de!inition N
C,PJ-IB N Copied 2C,PJ3 into CICS application program0
29
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 42/331
! *a m#le 8 S y m b olic " a#&# EMPRECI0
&1 FI--ER PIC A2#130
&1 [email protected] PIC S$253 C,MP0&1 [email protected] PIC A0
&1 FI--ER RE'EFI@ES [email protected]&4 EMP@. . PIC A0
&1 [email protected] PIC A21#30
&# EMPREC, RE'EFI@ES EMPRECI0
&1 FI--ER PIC A2#130&1 FI--ER PIC A2&430
&1 EMP@., PIC A21#30
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 43/331
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 44/331
P+sical = Sm)olic Map " -ogic Flo*
Physical MAP
Linkage editor
Load module (MVS)
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 45/331
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 46/331
hy s ic a l " a #hysical "a#/
T+e BMS macros are assem)led and link"edited into CICS loadli)rar to create t+e p+sical map0 T+e mapset like an ot+er CICSprogram is stored in CICS runtime li)rar t+e PPT2Program
Processing Ta)le30 .t t+e program e:ecution time t+e p+sicalmap is )eing used ) CICS to load t+e screen image0
In case o! input operations> t+e p+sical map de!ines t+ema:imum lengt+> t+e starting position !or eac+ !ield to )e read and
allo*s BMS to interpret an input @M'S0
In case o! output operations> t+e p+sical map de!ines t+e startingposition> lengt+> !ield c+aracteristics and t+e de!ault data !or eac+!ield and allo*s BMS to construct an output @M'S0
32
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 47/331
S y mb o li c " a #T+e sm)olic map is coded using t+e BMS macro> assem)led
separatel and catalogued into a cop li)rar0 T+e sm)olic mapserves as a 'SECT !or re!erencing t+e Terminal Input(,utput .rea
2TI,.30 T+e program issues a C,B,- C,PJ statement to include it
in t+e program0
T+e sm)olic maps represents t+e actual data structure o! t+e !ields
de!ined in t+e p+sical map> and is used ) t+e application program
to send and receive in!ormation !rom t+e terminal> in t+e CICS
SE@'"M.P = RECEI9E M.P commands0
T+e sm)olic map can )e used ) t+e CICS application programs to
dnamicall to alter t+e !ield attri)utes> modi! screen cursor
position> and +ig+lig+t > protect > unprotect speci!ic !ields on t+escreen0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 48/331
" a # definition " a cros
2eneral -ormatColumn @um)er
6 69 7setname operation operands contd0
!*am#leEMPM.P 'FHMS' TJPEM.P> A
M,'EI@,?T> A-.@GC,B,-> AST,R.GE.?T,> A
TI,.PFAJES .@J C,MME@TS
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 49/331
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 50/331
" a # definition " a cr o s (Contd//)!*#la n ations:
S!T,A"! : @ame o! t+e mapset0 ?sed in CICS command
to read or *rite one o! t+e maps in t+e mapset0 Itis t+e load module name0
O!+ATIO, : Macro identi!ier 0 Mapset(Map(Field de!inition0
O(!+A,DS : ,ptional ke *ords 2parameters3
separated ) comma0
CO,TD : Current line can )e continued ) leaving
t+is column non")lank 2usuall A3 andt+e ne:t line +ave to )e started in
#%t+ column0
Comments : 6 in column # makes t+e line comment0
35
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 51/331
" a # definition " a cr o s (Contd//)I,ITIA3 .A34!S : .l*as surround initial values
) single /uote marks
!sca#e Chars : and =
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 52/331
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 53/331
Order of " a cr o s
'FHMS' TJPE'SECT Mapset
'FHM'I Map
'FHM'F . !ield
'FHM'F . !ield<
'FHM'I Map
'FHM'F . !ield
'FHM'F . !ield
<
'FHMS' [email protected] Mapset
E@'
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 54/331
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 55/331
D-H"SD "acro
T+e 'FHMS' macro is used to de!ine a mapset 2TJPEM.P3and its c+aracteristics or to end a mapset [email protected] ,nl one mapset is allo*ed in one assem)lrun0 .ll t+e maps in a map set get assem)led toget+er> andt+eOre loaded toget+er at e:ecution time0
!*am#le:TSTMSET 'FHMS' TJPE=SJSP.RM> A
M,'EI@,?T> A-.@GC,B,->
AST,R.GE.?T,> ATI,.PFAJES>
AC@T-2FREEDB>FRSET>PRI@T3
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 56/331
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 57/331
D-H"SD "acro (Contd//)
O#tions
T!; To de!ine t+e map tpe
'SECT For sm)olic map
M.P For p+sical map
=SJSP.RM For special assem)l procedure
[email protected] To indicate t+e end o! a mapsetcoding
"OD!; To indicate input(output operations
I@ For an input map onl
,?T For an output map onl
I@,?T For maps involving )ot+ input and
output0 3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 58/331
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 59/331
D-H"SD "acro (Contd//)
STO+A2! C
.?T, To ac/uire a separate sm)olic map area !or eac+ mapset
B.SE To +ave t+e same storage )ase !or t+e sm)olic
maps o! !rom more t+an one mapset
TIOA-<;
JES To reserve t+e pre!i: space 2#1 )tes3 !or BMS
commands to access TI,. properl0 Re/uired!or t+e CICS command level0
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 60/331
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 61/331
D-H"SD "acro (Contd//)
C,T3; To de!ine t+e device controlre/uests
FREEDB To unlock t+e ke)oard
FRSET To reset M'T to ero status
.-.RM To set an alarm at screen displa timePRI@T To indicate t+e mapset to )e sent to t+eprinter
T!+";ty#e T+is ensures device independence>re/uired i! ot+er t+an 41;& terminal is )eing
used
S4--I<;nn To speci! t+e user provided su!!i: num)er0T+is must correspond to t+e TCT
parameter0
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 62/331
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 63/331
D-H"DI "acro
'e!ines a map and its c+aracteristics
!*am#le
EMPM.P 'FHM'I SIE2ll>cc3> A-I@Enn> A
C,-?M@mm> A?STIFJ-EFT(RIGHT
O#tions
SI=!;(ll>cc) To de!ine t+e sie o! t+e map ) t+e line sie 2ll3and t+e column sie 2cc30 ?se!ul *+en t+e screen
contains03I,! Indicates t+e starting line num)er o! t+e map0
CO34", Indicates t+e starting column num)er o! t+e map0
?4STI- To speci! t+e entire map 2map !ields3 is to )e le!t or
rig+t 8usti!ied0
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 64/331
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 65/331
D-H"D- "acro
T+e 'FHM'F macro is used to de!ine a !ield in a map and its
c+aracteristics0 T+is is t+e position on t+e screen *+ere t+e !ield
s+ould appear0 ItOs t+e position relative to t+e )eginning o! t+e
map0 Field starts *it+ its attri)ute )te> so i! P,S2#>#3 is coded>
t+en t+e attri)ute )te !or t+at !ield is on line # in column #> andt+e actual data starts in column 10 T+e lengt+ o! t+e !ield 2not
counting t+e attri)ute )te3 is speci!ied0 -iterals can )e speci!ied
*it+in /uotesL t+ese c+aracter data is !or an output !ield0 It is
used to de!ine la)els and titles !or t+e screen and keep t+em
independent o! t+e program0
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 66/331
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 67/331
Sam#le Screen layout
T+e a)ove de!ines t+e screen laout as given )elo*<
ITEM @?MBER <=nnnnnnnn
+ere
&6 Is t+e .ttri)ute c+aracter
n6 Is unprotected numeric @ Is Cursor
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 68/331
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 69/331
D-H"D-"acro -or The Aboe 3ayout
Define a field and its characteristics
!*am#le
'FHM'F P,S2ll>cc3> A
[email protected] @o0 <6> A .TTRB.SDIP> A
-E@GTH#5
C?ST@, 'FHM'F P,S2ll>cc3>
A
.TTRB2?@PR,T>@?M>FSET>IC3> A
?STIFJRIGHT> A
PICI@$2K36> A
PIC,?T$2K36> A
-E@GTHK
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 70/331
Attribute character
-unction:
T+e attri)ute c+aracter is an invisi)le #")te c+aracter> *+ic+precedes a screen !ield and determines t+e c+aracteristics o! a!ield0
AS1I .utoskip0 'ata cannot )e entered in t+is !ield0 T+e cursor skips to t+e ne:t !ield0
+OT Protected !ield0 'ata cannot )e entered into t+is !ield0 I! data is entered> it *ill cause t+e input"in+i)it status0
4,+OT ?nprotected !ield0 'ata can )e entered and t+is is used!or all input !ields0
,4" @umeric !ield0 ,nl num)ers 2& to $3 and special c+aracters20 and "3 are allo*ed0
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 71/331
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 72/331
Attribute character (Contd//)
B+T Brig+t displa o! a !ield 2+ig+lig+t30
,O+" @ormal displa0
D+1 'ark displa0
IC Insert cursor 0 T+e cursor *ill )e positioned in t+is !ield0 Incase> IC is speci!ied more t+an once> t+e cursor is placed int+e last !ield0
-S!T Field set0 M'T is set on so t+at t+e !ield data is to )e sent!rom t+e terminal to t+e +ost computer regardless o!
*+et+er t+e !ield is actuall modi!ied ) t+e user0
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 73/331
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 74/331
"odified Data Ta$
-unction:
Modi!ied 'ata Tag 2M'T3 is a one )it o! t+e attri)utec+aracter 0 I! it is o!! 2&3> it indicates t+at t+e terminaloperator +as not modi!ied t+e !ield0 I! it is on 2#3> it
indicates t+at t+e operator +as modi!ied t+is !ield0 ,nl*+en M'T is on> t+e data o! t+e !ield *ill )e sent ) t+eterminal +ard*are to t+e +ost computer 0 .n e!!ectiveuse o! M'T drasticall reduces t+e amount o! datatra!!ic in t+e communication line and t+us improvesper!ormance0
Three ays of settin$ and resettin$ the "DT/
#0 Terminal user modi!ies a !ield on t+e screen> it isautomaticall set to # 2on3 ) t+e terminal +ard*are0
48
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 75/331
"odified Data Ta$ (Contd// )
10 I! C@T-FRSET is speci!ied in t+e 'FHMS' or 'FHM'Imacro> *+en t+e mapset or t+e map is sent to t+e terminal>M'T *ill )e reset to & 2o!!3 i0e0 not modi!ied !or all t+e
!ields o! t+e mapset or t+e map0
40 I! FSET is speci!ied in t+e .TTRB parameter o! t+e'FHM'F macro !or a !ield> *+en t+e map is sent to t+eterminal> M'T *ill )e set to #0 2on i0e0 modi!ied3 !or t+e !ieldregardless o! *+et+er t+e !ield +as )een modi!ied ) t+eterminal user0
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 76/331
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 77/331
S'i##er Techniue
• ?nla)elled #")te !ield *it+ t+e autos'i# attri)ute
• D-H"D- OS(ll>cc)>ATT+B;AS1I>3!,2TH;6
• To skip t+e cursor to t+e ne:t unprotected !ield a!ter oneunprotected !ield0
• Screen -aout <
&*****& &**
*+ere
Skipper !ield
= .ttri)ute )te
A ?nprotected !ield
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 78/331
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 79/331
Sto##er Techniue
• ?nla)elled #")te !ield *it+ t+e #rotect attri)ute
• D-H"D- OS(ll>cc)>ATT+B;+OT>3!,2TH;6
• To stop t+e cursor in order to prevent erroneous !ield over!lo* )
terminal user0
• Screen -aout <
&*****&&
*+ere
Stopper !ield
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 80/331
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 81/331
-ormat Of the Symbolic "a#
Format of Symbolic Map
• ,nce t+e sm)olic map is assem)led and is placed in
t+e C,PJ li)rar> t+e C,B,- C,PJ statement can )e
used to include it in t+e application program0
• T+e sm)olic map starts *it+ t+e &# level de!inition o!
t+e map name speci!ied in t+e 'FHM'I macro *it+ t+e
su!!i: I6 !or t+e input map and t+e su!!i: ,6 !or t+e
output map0
• @e:t is t+e de!inition o! FI--ER PIC A2#13> *+ic+ is t+e
TI,. pre!i: created ) t+e TI,.PFAJES o! t+e 'FHMS'
macroL t+is is re/uired ) t+e BMS under t+e CICS
command level0 5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 82/331
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 83/331
-ormat Of the Symbolic "a#(Contd//)
For eac+ !ield name 2# to ; c+aracters3 speci!ied in t+e
'FHM'F macro> BMS creates t+ree !ields !or inputs and
t+ree !ields !or outputs> ) placing one c+aracter su!!i: to
t+e original !ield name0 T+e meaning o! t+ese !ields are
given )elo*<
• ,ame E 3< T+e +al!"*ord )inar 2PIC S$253 C,MP3
!ield0 For t+e input !ield> t+e actual num)er o!
c+aracters tped in t+e !ield *ill )e placed ) t+e BMS
*+en t+e map is received0 For t+e output !ield> t+is isused !or t+e dnamic cursor positioning0
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 84/331
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 85/331
-ormat Of the Symbolic "a#(Contd//)
• ,ame E -< Flag Bte0 For t+e input !ield> it *ill )eA6K&6 i! t+e !ield +as )een modi!ied )ut no data issent 2i0e0 t+e !ield +as )een cleared30 ,t+er*ise t+is!ield is A6&&60
• ,ame E A< T+e .ttri)ute )te !or )ot+ input andoutput !ields0
• ,ame E I< T+e input data !ield0 A6&&6 *ill )e
placed i! no data is entered0 @ote t+at space A65&6is data0 T+e application program s+ould di!!erentiateA6&&6 !rom space 2A65&630
• ,ame E O< T+e output data !ield0
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 86/331
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 87/331
! * a m#le Of S y mbolic " a #
&# EMPRECI0
&1 FI--ER PIC A2#130
&1 [email protected] PIC S$253 C,MP0
&1 [email protected] PIC A0
&1 FI--ER RE'EFI@ES [email protected]
&4 EMP@. . PIC A0
&1 [email protected] PIC A21#30
&# EMPREC, RE'EFI@ES EMPRECI0&1 FI--ER PIC A2#130
&1 FI--ER PIC A2&430
&1 EMP@., PIC A21#30
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 88/331
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 89/331
Cursor ositionin$ Techniues
CICS provides multiple *as o! to speci! *+ere toposition t+e cursor on t+e screen0 T+e cursor positioningis important to prompt an user o! an entr +e +as tomake> or to point to an error *+ic+ +as occurred duringediting t+e user entries0
• Static #ositionin$ 2.c+ieved t+ru Map de!inition .TTRIBIC30
!*am#le : 'FHM'F
P,S27>K3>ATT+B;(?@PR,T>FSET>IC3>-E@GTH#&
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 90/331
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 91/331
Cursor ositionin$ Techniues(Contd//)
• Dynamic%Symbolic ositionin$0
T+e cursor is placed dnamicall t+roug+ anapplication program ) moving "# to t+esm)olic map !ield"lengt+ !ield 2i0e0 !ieldname U-3 !or t+e !ield *+ere t+e cursor is to )e placed0T+e SE@' M.P command must )e issued *it+t+e C?RS,R option 2*it+out value30 .lso> t+emapset s+ould )e coded *it+ M,'EI@,?T int+e 'FHMS' macro0 T+is approac+ is veruse!ul *+en t+e cursor is to )e placed at t+e!ield *+ere data entr error +as )een detected) t+e data edit routine0
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 92/331
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 93/331
Cursor ositionin$ Techniues(Contd//)
!*am#le Of Dynamic Cursor ositionin$/
0O+1I,2)STO+A2! S!CTIO,0
<
C,PJ M.PSET#
&# M.PSET#I
&7 FI--ER PIC A2%30
&7 FIE-'#- PIC A2730
&7 FIE-'#F PIC A0&7 FIE-'#I PIC A0
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 94/331
8
C i i i T h i
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 95/331
Cursor ositionin$ Techniues(Contd//)
(+OC!D4+! DI.ISIO,/
< M,9E V# T, FIE-'-0
EAEC CICS SE@' M.P2M.P#63
M.PSET2M.PSET#63
C?RS,RER.SE
E@'"EAEC0
T+e cursor *ill )e placed at FIE-'# !ield o! t+e mapduring e:ecution0
5
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 96/331
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 97/331
Cursor ositionin$ Techniues(Contd//)
Dynamic%+elatie ositionin$ (a##lication #ro$ram)
T+e cursor is placed dnamicall t+roug+ an application programusing t+e C?RS,R2data"value3 option in t+e SE@' M.P
command *it+ t+e value o! t+e relative position 2starting !romero3 o! t+e terminal0 .t t+e completion o! t+e SE@' M.Pcommand> t+e map *ill )e displaed *it+ t+e cursor placed att+e speci!ied position> overriding t+e static cursor positionde!ined at t+e map de!inition time0
6
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 98/331
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 99/331
Cursor ositionin$ Techniues(Contd//)
!*am#le EAEC CICS SE@'
M.P2M.P#63
M.PSET2M.PSET#63
C?RS,R2#&&3
ER.SEE@'"EAEC0
T+e cursor *ill )e placed at FIE-'# !ield o! t+e map M.P#during e:ecution0
6
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 100/331
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 101/331
Interfacin$ ith a Terminalu s in$ a " a #
T+e BMS maps are used in t+e application programs !or
t+e actual terminal input(output operation0 T+ese
operations are per!ormed ) a set o! CICS commands
!or BMS0
T+e !ollo*ing are t+e three basic functionsper!ormed ) CICS commands<
"a# Sendin$ function V using t+e data in t+e sm)olic map>
BMS prepares t+e output @M'S> t+e corresponding p+sical
map> and sends to t+e terminal0
"a# +eceiin$ -unction V using t+e input @'MS !rom t+e
terminal> BMS prepares data in t+e sm)olic map t+roug+ t+e
corresponding p+sical map0
Te*t Handlin$ -unction V BMS prepares te:t *it+out using a
map and sends to t+e terminal06
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 102/331
2
I t f i ith T i l
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 103/331
Interfacin$ ith a Terminalu s in$ a " a# (Contd.. )
-lo of Information from F75 Terminal and the A##lication ro$ram/
A##licationro$ram
Send "a#Command
A##licationro$ram
+eceie "a#Command
I t f i ith T i l
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 104/331
Interfacin$ ith a Terminalu s in$ a " a# (Contd.. )
T+e !ollo*ing are t+e availa)le commands<
• RECEI9E M.P < To receive a map • SE@' M.P < To send a map • SE@' C,@TR,- < To send a control !unction to t+e
terminal
• SE@' TEAT < To send a te:t • SE@' P.GE < To send t+e accumulated te:t or
maps as a logical message
6
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 105/331
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 106/331
+ ec e i e " a# C o mm a nd
+!C!I.! "A Command is used to receive input !rom a terminal0 .t t+e completion o! t+e command> t+e sm)olic map *ill containvalid data !rom t+e terminal in t+e !ollo*ing t+ree !ields as per eac+!ield de!ined ) t+e 'FHM'F macro<
Field name U - < T+e lengt+ !ield> *+ic+ contains t+e actualnum)er o! c+aracters> tped in t+e screen!ield0
Field name U F < T+e Flag Bte *+ic+ is normall A6&&60 It *ill)e A6K&6 i! t+e !ield +as )een modi!ied )ut
cleared0
Field name U I < T+e actual input data !ield0 A6&&6 *ill )e placedi! no data is entered0
65
+ i " C d
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 107/331
+eceie "a# Command(Contd//)
Synta*: EAEC CICS +!C!I.!
W SET2P,I@TER3XI@T,2'[email protected] Y
W -E@GTH2MSG"-E@3Y
W H.@'-E X @,H.@'-E Y
W RESP23 Y
E@'"EAEC0
• Conditions: I@9REQ> M.PF.I-
6
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 108/331
6
+ i " C d
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 109/331
+eceie "a# Command(Contd//)
"A speci!ied t+e name o! t+e M.P de!ined t+ru 'FHM'I
command > *+ic+ descri)es t+e screen details0
"AS!T speci!ied t+e name o! t+e M.PSET de!ined t+ru 'FHMS'
command *+ic+ includes t+e M.P0
I,TO is used to speci! t+e area in t+e *orking storage section to
*+ic+ t+e data !rom t+e terminal is to )e placed0
S!T is used *+en t+e address pointer is to )e set to t+e address o!
t+e sm)olic map 2) CICS3 so t+at t+e application program can
directl re!er to t+e record *it+out moving t+e record content into t+e
*orking storage area de!ined in t+e program0
67
+ i " C d
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 110/331
+eceie "a# Command(Contd//)
+!S *ill )e used ) CICS to place a response code at acompletion o! t+e command0
HA,D3! is used to trans!er control to t+e procedure la)elspeci!ied i! t+e e:ceptional condition speci!ied occurs0
,OHA,D3! *ill cause no action to )e taken !or an e:ceptionalcondition occurring during e:ecution o! t+e CICS command0
Conditions : I,."S= > I,.+!G+ > 3!,2!++> "A-AI3
M.PF.I- is set *+en t+e data )eing mapped +as a lengt+o! ero0 It occurs *+en t+e !ollo*ing kes are pressed inresponse to t+e RECEI9E M.P command< C-E.R or .ttention Des = E@TER or PF kes *it+out enteringdata0
6
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 111/331
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 112/331
S!,D "A Command
T+e SE@' M.P command is used to send !ormatted output toa terminal0 Be!ore issuing t+is command> t+e applicationprogram must prepare t+e data in t+e sm)olic map o! t+emap to )e sent> *+ic+ +as t+e !ollo*ing t+ree !ields per eac+!ield de!ined ) t+e 'FHM'F macro<
,ame E 3< T+e lengt+ !ield> !or *+ic+ t+e applicationprogram need not prepare e:cept *+en used !or t+e dnamiccursor positioning0
,ame E A< T+e .ttri)ute )te !or output !ields0 .pplication program *ill use it !or dnamic cursor positioning0
,ame E O< T+e actual output data !ield> *+ere t+eapplication program places t+e data0
69
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 113/331
S ! , D " A C om m a n d (Contd//)
EAEC CICS S!,D "A(2M.P#3
M.PSET2M.PSET#3 Y
WFR,M2'[email protected] Y> W'.T.,@-JY XM.P,@-JY>
W C?RS,R29.-?E3 Y>W FREEDB Y > W ER.SE Y > W FRSET Y >
W H.@'-E X @,H.@'-E Y >
W RESP 2'[email protected] Y
E@'"EAEC0
• Conditions < I@9REQ>-E@GERR
7
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 114/331
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 115/331
S ! , D " A C om m a n d (Contd//)
"A speci!ied t+e name o! t+e M.P de!ined t+ru 'FHM'I command
> *+ic+ descri)es t+e screen details0
"AS!T speci!ied t+e name o! t+e M.PSET de!ined t+ru 'FHMS'
command *+ic+ includes t+e M.P0
"AO,3 is used *+en no data !rom our program is to )e merged
into t+e map0
DATAO,3 is used *+en onl t+e data !rom t+e program is to )e
sent to t+e screen0 T+e constants in t+e map are not sent0
71
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 116/331
S ! , D " A C om m a n d (Contd//)
-+O" is used to speci! t+e area in t+e *orking storage section
!rom *+ic+ t+e data is to )e sent to t+e terminal0
7
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 117/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 118/331
A ID 1! S
First time *+en a transaction is initiated t+e application programt+ro*s t+e screen image on t+e terminal t+ru SE@' M.P command0,nce t+e screen appears> t+e .I' 2.ttention Identi!ier 3 Des are)eing used to send t+e in!ormation )ack !rom t+e terminal to CICS toapplication program0 CICS application program needs to trap t+e
attention identi!ier kes and process various !unctions related to t+e .I' kes0
Salient oints
• - 'eys> A 'eys> !,T!+ & C3!A+ 'ey
• !IBAID in t+e CICS E:ecutive Inter!ace Block contains> recentlused .I' ke0
73
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 119/331
A ID 1 ! S (Contd//)
• D-HAID V CICS Sstem cop)ook *+ic+ stores t+e values o!t+e EIB.I' !ield !or t+e various .I' kes0 Flo* < ?ser +its
.I' ke V Control goes to CICS V To .pplication program0EIB.I' contains in!ormation a)out t+e last .I' ke pressed0Program compares EIB.I' to t+e 'FH.I' !ield andper!orms processing logic as per t+e .I' ke pressed0
• HA,D3! AID esta)lis+ t+e routines t+at are to )e invoked*+en t+e aid is detected ) a RECEI9E M.P command0
Synta* : EAEC CICS H.@'-E .I'
,ption 2la)el3
E@'"EAEC
Conditions : I,.+!G
7
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 120/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 121/331
Screen Desi$n Considerations
-unctional Screen Desi$n • Screen laout s+ould )e similar to source *+ere terminal
users enter data0
• Screen id s+ould )e placed at t+e top rig+t corner o! a
screen0 T+is +elps at pro)lem determination time0
• Screen title and !ield descriptions s+ould )e sel!"e:planator0Instructions s+ould )e concise0
7
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 122/331
Screen Desi$n Considerations
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 123/331
Screen Desi$n Considerations(Contd//)
• -arge !ields can )e )roken into a num)er o! small !ields0 E0g0t+e !ield contact in!ormation can )e split into contactnum)ers> email ids and postal address0
• In case o! repeated !ields or group o! !ields> se/uencenum)ers +elps0
• Error messages s+ould )e provided0 Pre!era)l t+e last !e*lines can )e used !or t+e error messages0
7
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 124/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 125/331
S c r ee n D esi$n C on s iderations
4ser-riendly Screen Desi$n
• Screens s+ould )e simple and !riendl0
• 'e!ault values in !ields +elps in reducing kestrokes ) t+eusers0 .lso> in case t+e user !orgets to enter a !ield data>
de!aults values are assigned according to t+e !ield0• Calculations s+ould )e done ) program and not ) users0
• T+e cursors s+ould )e placed in t+e appropriate !ields0
• Hig+lig+t t+e error !ield0 ?sing a di!!erent colour or )linkingt+e error !ield can ac+ieve t+is0 T+is ena)les users to identi!
t+e erroneous !ield easil0
7
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 126/331
Screen Desi$n Considerations
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 127/331
Screen Desi$n Considerations( C o n t d// )
• .larm sound can )e used !or error entries0
• Provide suita)le +elp messages !or erroneous entries0 T+e+elp message s+ould )e instructive and kind and s+ould not)e rude0
• Provide +elp on !ields and t+eir meanings0 ?sing an attentionke !or a +elp menu> *+ic+ +as details on eac+ !ield> makesa screen user"!riendl0
Artistic Screen Desi$n
• . simple screen laout is al*as pre!erred0• Proper use o! indentations> spaces> and lines makes ascreen look good0
7
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 128/331
Screen Desi$n Considerations
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 129/331
Screen Desi$n Considerations( C o n t d// )
• Colour can +elp in improving t+e screen designL +o*ever t+ecolour used s+ould )e in accordance *it+ t+e norms andstandards !ollo*ed0
Considerations for Human !rrors
• Important and use!ul !ields can )e placed at t+e top part o!t+e screen0
• Related !ields can )e grouped toget+er0
• Protected !ields s+ould )e skipped automaticall0 T+is
reduces manual skipping and is pre!erred0• Skipper(Stopper tec+ni/ues can )e used at appropriateplaces0
7
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 130/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 131/331
!*ercise 6
E:ercise " #
8
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 132/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 133/331
CICS -ile rocessin$Techniues
8
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 134/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 135/331
CICS .S -I3! +OC!SSI,2
File +andling in CICS is ac+ieved t+ru a set o! !ile +andlingcommands0 It is essential to kno* t+e various !ile +andlingcommands !or application programming0
File Speci!ic !unctions to )e per!ormed are t+e !ollo*ing0
• 'e!ining a speci!ic !ile to t+e CICS sstem0
• Reading a !ile se/uentiall
• Reading a De Se/uenced !ile randoml
• Reading a !ile se/uentiall starting !rom a speci!ic point0
• Reading and ?pdating a record• 'eleting a Record0
• Handle an errors t+at occur during !ile processing
8
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 136/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 137/331
CICS .S -I3! +OC!SSI,2
iles do not need to e!clusi"ely
de#ined in Application
programs$ The #iles do not need
to opened and closed in a CICS
application program % &e#ore &eing used in the program$
Application programs do not need
The ' Section% and the Input utput
Section$ Application program directly*e#er to #ilenames in +,+C CICS
Command$
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 138/331
CICS
C-L
+,+C CICS *+A'
'ATAS+T (.IL+ I'+/TII+*)
I/T (*+C*' /AM+)
*I'0L' (record0key)+/'0+,+C$
+,+C CICS 1*IT+
'ATAS+T (.ile identi#ier2)
*M (*ecord0/ame)
*I'0L' (*ecord0 key)
+/'0+,+C$
8
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 139/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 140/331
.SA"
'i!!erent tpes o! 9S.M 'atasets used in CICS are <
• ES'S Entr Se/uenced 'ataset• DS'S De Se/uenced 'ataset
• RR'S Relative Record 'ataset
8
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 141/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 142/331
Serices roided By CICS
• Basic ,perations re/uired !or a !ile are
.dding a Record0
Modi!ing an E:isting Record0
'eleting an E:isting Record0
Bro*sing ,ne or Selected or .ll Records0
• In .ddition> CICS Provides
E:clusive Control0 2Record -evel -ocking30
'ata Independence0
ournaling0
,pening and closing Files0
8
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 143/331
f
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 144/331
Definin$ -iles
• In CICS> !iles cannot )e created0 Files can )e created usingI'C.MS ?tilit0
• Re"inde:ing> Creating ne* inde:es> etc0 s+ould )e done usingI'C.MS ,nl0
8
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 145/331
D fi i A -il i CICS
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 146/331
Definin$ A -ile in CICS
• Files s+ould )e de!ined in FCT 2File Control Ta)le30
• FCT *ill contain all t+e In!ormation a)out a !ile 2like datasetname> access met+ods> permissi)le !ile service re/uest> etc03
• 'e!ining !iles can )e done eit+er ) CE'. Transaction or'FHFCT Macro0
8
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 147/331
S t f D-H-CT "
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 148/331
Synta* of D-H-CT "acro
'FHFCT TJPEFI-E>.CCMETH9S.M>
'[email protected]@.ME>
SER9RQ2.''>BR,SE>'E-ETE>RE.'>?P'.TE3>
[email protected]'>,PE@E'3
8
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 149/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 150/331
-ile Handlin$ in ro$rams
• Files s+ould not )e de!ined in t+e Program0
• Program s+ould not open or close a File0
• Records can )e *ritten in an order 0 . num)er o! records can )e
added at a time0
• Records can )e inserted> updated or deleted0
9
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 151/331
I t t 1 0 d
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 152/331
Im#ortant 1ey0ords
• Dataset%-ile <" @ame in t+e FCT0
• Into%-rom (0S+ec) <" orking"Storage .rea de!ined in t+e
program *+ere t+e CICS Puts(Gets t+e 'ata0
• +ID-3D <" Contains t+e Record De0
• +!S <" Contains t+e return code o! t+e e:ecuted
command0
• 3!,2TH <" -engt+ o! t+e Record to )e Retrieved or ritten0
9
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 153/331
+ d +!AD
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 154/331
+andom +!AD
EAEC CICS +!AD File2!ilename3
WSET23 X Into23Y
RId!ld2Rec"De3
E@'"EAEC0
Condition: 'IS.B-E'> @,T,PE@> @,TF@'> -E@GERR>
'?PDEJ> I,ERR0
9
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 155/331
! l f + d + d
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 156/331
!*am#le for +andom +ead
EAEC CICS RE.'
File2 [email protected] O3
Into2S"[email protected]"REC3
-engt+2S"[email protected]"-E@3RId!ld2O;#47$7&%&1O3 XRId!ld2S"[email protected]"DEJ3
E@'"EAEC0
9
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 157/331
Seuential +ead
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 158/331
Seuential +ead
• Se/uential Read is done ) Bro*se ,per0
• Esta)lis+ t+e pointer to t+e First Record to )e Read ?singStartBr0
• @e:t and Previous Records can )e Read as re/uired ?singRead@e:t and ReadPrev0
• End t+e Bro*se ,peration at last0
• Bro*se can )e re"positioned0
• 'uring Bro*se ,peration> Records cannot )e ?pdated0
9
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 159/331
S t f STA+TB+
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 160/331
Synta* for STA+TB+
EAEC CICS STA+TB+
FI-E2!ilename3
RI'F-'2data"area3E@'"EAEC0
Condition < 'IS.B-E'> I,ERR> @,TF@'> @,T,PE@0
9
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 161/331
+eadin$ the +ecord afterSTA+TB+
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 162/331
STA+TB+
• Se/uentiall t+e @e:t or Previous Record can )e read ) a
RE.'@EAT or RE.'PRE90
• T+e !irst RE.'@EAT or RE.'PRE9 *ill read t+e Record
*+ere t+e ST.RTBR +as positioned t+e File Pointer0
9
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 163/331
Synta* of +!AD,e*t%+!ADre
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 164/331
Synta* of +!AD,e*t%+!ADre
EAEC CICS +!AD,e*t +!ADre
FI-E2name3
I@T,2data"area3XSET2ptr"re!3
RI'F-'2data"area3
E@'"EAEC0
Condition < '?PDEJ> E@'FI-E> I,ERR> -E@GERR> @,TF@'0
9
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 165/331
!,DB+ose
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 166/331
!,DB+ose
• E@'BRo*se terminates a Previousl issued ST.RTBR0
• S,TA< <
EAEC CICS !,DB+
FI-E2!ilename3
E@'"EAEC0
Condition: I@9REQ
9
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 167/331
+!S!TB+
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 168/331
+!S!TB+
• Its e!!ect is t+e same as E@'BR and t+en giving anot+er
ST.RTBR0
• Synta* <
EAEC CICS +!S!TB+FI-E2!ilename3
RI'F-'2data"area3
E@'"EAEC0
Condition< I,ERR> @,TF@'0
9
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 169/331
0+IT! Command
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 170/331
0+IT! Command
• .dds a ne* record into t+e File0
• For ES'S> RI'F-' is not used )ut a!ter *rite e:ecution> RB.
value is returned and Record *ill )e *ritten at t+e end o! t+eFile0
• For DS'S> RI'F-' s+ould )e t+e Record De0 T+e record *ill)e *ritten depending on t+e De0
• M.SSI@SERTion must )e done in ascending order o! t+e
De0
10
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 171/331
Synta* for 0+IT!
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 172/331
Synta* for 0+IT!
EAEC CICS RITE
FI-E2!ilename3
FR,M2data"area3
RI'F-'2data"area3
E@'"EAEC0
Condition: 'IS.B-E'> '?PREC> I,ERR> -E@GERR>
@,SP.CE> @,T,PE@0
10
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 173/331
+!0+IT! Command
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 174/331
+!0+IT! Command
• ?pdates a Record *+ic+ is Previousl Read *it+ ?P'.TE
,ption0
• RERITE automaticall ?@-,CDs t+e Record a!ter
e:ecution0
10
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 175/331
Synta* for +!0+IT!
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 176/331
Synta* for +!0+IT!
EAEC CICS RERITE
FI-E2!ilename3
FR,M2data"area3
E@'"EAEC0
Condition< '?PREC> I,ERR> -E@GERR> @,SP.CE0
10
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 177/331
D!3!T! Command
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 178/331
D!3!T! Command
• 'eletes a Record !rom a dataset0
• Record can )e deleted in t*o *as>
#0 RI'F-' *it+ t+e !ull ke in it
10 T+e record read *it+ RE.' *it+ ?P'.TE *ill )edeleted0
• Multiple Records 'elete is possi)le using Generic ,ption0
10
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 179/331
Synta* of D!3!T!
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 180/331
y
EAEC CICS 'E-ETE
FI-E2!ilename3
RI'F-'2data"area3 ,ptional
E@'"EAEC0
Condition: 'IS.B-E'> '?PDEJ> I,ERR> @,TF@'>
@,T,PE@0
10
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 181/331
4,3OC1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 182/331
4,3OC1
• To Release t+e Record *+ic+ +as )een locked ) RE.' *it+
?P'.TE Command0
• Synta* <
EAEC CICS ?@-,CDFI-E2!ilename3
<
Wot+er optionsY
E@'"EAEC0
Condition< 'IS.B-E'> I,ERR> @,T,PE@0
10
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 183/331
2eneral !*ce#tions
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 184/331
#
• T+e !ollo*ing e:ceptions usuall *ill occur !or A33 CICS !ile+andling commands0
FI-E@,TF,?@'>
@,T.?TH>SJSI'ERR>
I@9REQ
10
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 185/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 186/331
CICS !rror Handlin$rocedures
10
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 187/331
!rror Handlin$ in CICS
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 188/331
o a d $ C CS
ossible !rrors:
• Conditions t+at arenOt normal !rom CICSOs point o! vie* )ut
t+at are e:pected in t+e program0
• Conditions caused ) user errors and input data errors0
• Conditions caused ) omissions or errors in t+e application
code0
• Errors caused ) mismatc+es )et*een applications and
CICS ta)les> generation parameters and C-
• Errors related to +ard*are or ot+er sstem conditions )eond
t+e control o! an application program0
10
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 189/331
!rror Handlin$ methods
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 190/331
$
+en t+e error 2e:ceptional conditions3 occur> t+e program can
do an o! t+e !ollo*ing
• Take no action = let t+e program continue " Control returns to
t+e ne:t inst0 !ollo*ing t+e command t+at +as !ailed to e:ecute0
. return code is set in EIBRESP and EIBRC,'E0 T+is state
occurs cause o! NO H.@'-E (RESP(IG@,RE conditions
• Pass control to a speci!ied la)el " Control goes to a la)el in t+e
program de!ined earlier ) a H.@'-E C,@'ITI,@ command0
• Rel on t+e sstem de!ault action " Sstem *ill terminate orsuspend t+e task depends on t+e e:ceptional condition occurred
11
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 191/331
!rror Handlin$ methods(Contd//)
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 192/331
( )
• H.@'-E C,@'ITI,@ conditionW2la)el3Y000 OconditionO speci!iest+e name o! t+e condition> and Ola)elO speci!ies t+e location*it+in t+e program to )e )ranc+ed
• Remains active *+ile t+e program is e:ecuting or until itencounters IG@,RE(anot+er H.@'-E condition0
• Synta* <EAEC CICS HA,D3! CO,DITIO,
ERR,R2ERRH.@'-3-E@GERR2-E@GRT@3
E@'"EAEC
T+is e:ample +andles '?PREC condition separatel> all t+eot+er Errors toget+er 0 -E@GERR *ill )e +andled ) sstem
11
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 193/331
HA,D3! Condition
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 194/331
!*am#le of Handle condition<
EAEC CICS HA,D3! CO,DITIO,
@,TF@'2REC,R'"@,T"F,?@'3
E@'"EAEC
This condition catches the /T/' condition and trans#ers control to the
*+C0/T0 3/' paragraph in the program$ The error handling logic can &e
coded in the *+C0/T0/' paragraph$
11
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 195/331
A lt e r n atie t o H a n d le co n dition
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 196/331
• @,H.@'-E to speci! no action to )e taken !or an condition orattention identi!ier 2.I'3
• RESP2:::3 Z:::Z is a user"de!ined !ull *ord )inar data area0 ,nreturn !rom t+e command> it contains a return code0 -ater> it can)e tested ) means o! 'FHRESP as !ollo*s>
I! :::'FHRESP2@,SP.CE3 000 or
I! :::'FHRESP2@,RM.-3 000
11
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 197/331
I2,O+! C o ndition
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 198/331
• IG@,RE C,@'ITI,@ condition 000
• condition6 speci!ies t+e name o! t+e condition t+at is to )e
ignored2 no action *ill )e taken3
• Synta* <EAEC CICS I2,O+! CO,DITIO,
ITEMERR
-E@GERR
E@'"EAEC
• T+is command *ill not take an actions i! t+e given t*o error
occurs and *ill pass t+e control to t+e ne:t instruction
11
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 199/331
Sam#le #ro$ram to use Handlecondition
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 200/331
Here is an e:ample o! t+e CICS" C,B,- code *it+ proper +andling o! errors
rocedure Diision/EAEC CICS HA,D3! CO,DITIO,
@,T"F@'2REC"@,T"F,?@'3
E@' EAEC0
<
EAEC CICS RE.'
'.T.SET2S.MP-E3
RI'F-'2EMP"@,3I@T, 2EMP"REC3
E@'"EAEC
<
G, T, -.ST"P.RT
Sam#le #ro$ram to use Handlecondition (Contd//)
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 201/331
+!C,OT-O4,D
M,9E @,T",@"FI-E6 T, @.ME, 2 SJMB,-IC M.P
P.R.METER3
3ASTA+T/EAEC CICS SE@'
M.P 2TC&BM4#63
M.PSET2TC&BM4&63
FR,M 2TC&BM4#&63'.T.",@-J
E@'"EAEC
11
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 202/331
4SH & O
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 203/331
• To suspend all current H.@'-E C,@'ITI,@> IG@,REC,@'ITI,@> H.@'-E .I' and H.@'-E .BE@' commands0
• ?sed !or eg0 *+ile calling su)"pgms 2C.--30
• +ile receiving t+e control> a su)"program can suspend Handle
commands o! t+e called program using PUSH HAN!".
• +ile returning t+e control> it can restore t+e Handle commandusing P#P HAN!".
11
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 204/331
Synta* of ush & o#
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 205/331
• Synta* of ush <
EAEC CICS ush
Handle
E@'"EAEC0
• Synta* of o# <
EAEC CICS o#Handle
E@'"EAEC0
11
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 206/331
!<!C Interface Bloc' (!IB)
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 207/331
• CICS provides some sstem"related in!ormation to eac+ task asEAEC Inter!ace Block 2EIB3
• ?ni/ue to t+e CICS command level
!IBAID .ttention" Id 2# Bte3
!IBCA3!, -engt+ o! 'FHC,MM.RE. 2S$253 comp3
!IBDAT! 'ate *+en t+is task started 2S$2;3 comp"43
!IB-, Function Code o! t+e last command 2 1Btes3
!IB+COD! Response Code o! t+e last command 2%Btes3
!IBTAS1, Task num)er o! t+is task 2S$2;3 comp"43
!IBTI"! Time *+en t+is task started 2S$2;3 comp"43
!IBT+"ID Terminal"Id 2# to 5 c+ars3
!IBT+,ID Transaction"Id 2# to 5 c+ars311
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 208/331
rocessin$ ro$ram Table T
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 209/331
'FHPPT TJPEE@TRJ
PR,GR.M XM.PSET name
WPGM-.@G . S M XC,B,-XP-IY
WRES @,XFIAXJESY
<< ot+er options
<
Eg0
'FHPPT TJPEE@TRJ>PR,GR.MTEST>PGM-.@GC,B,-
12
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 210/331
CT !ntry
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 211/331
'FHPCT TJPEE@TRJ
TR.@SI' name
PR,GR.Mname
T.SDREQp!%
REST.RTes(no 2 TR.@SEC # to %53RS-DEJ # to 15 resource level ke
SCTJDEJ # to %5 securit ke
<
<
ot+er options
12
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 212/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 213/331
+O2+A" CO,T+O3
12
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 214/331
ro$ram Control Commands
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 215/331
• -I@D
• ACT-
• RET?R@• -,.'
• RE-E.SE
12
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 216/331
3I,1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 217/331
• ?sed to pass control !rom one application program to anot+er
• T+e calling program e:pects control to )e returned to it
• 'ata can )e passed to t+e called program using C,MM.RE.
• I! t+e called program is not alread in main storage it is loaded
12
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 218/331
3I,1 Synta*
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 219/331
EAEC CICS 3I,1
PR,GR.M2name3
WC,MM.RE.2data"area3
W-E@GTH2data"value3YY
E@'"EAEC0
Conditions < PGMI'ERR> @,T.?TH> -E@GERR
12
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 220/331
< C T3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 221/331
• To trans!er control !rom one application program to anot+er in
t+e same logical level
• T+e program !rom *+ic+ control is trans!erred is released
• 'ata can )e passed to t+e called program using C,MM.RE.
• I! t+e called program is not alread in main storage it is loaded
12
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 222/331
<CT3 Synta*
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 223/331
EAEC CICS <CT3PR,GR.M2name3
WC,MM.RE.2data"area3
W-E@GTH2data"value3YY
E@'"EAEC0
Conditions < PGMI'ERR> @,T.?TH> -E@GERR
12
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 224/331
+ ! T4 + ,
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 225/331
• To return control !rom one application program to anot+er at a
+ig+er logical level or to CICS
• 'ata can )e passed using C,MM.RE. *+en returning to CICS
to t+e ne:t task
12
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 226/331
+ ! T4 + , Sy n t a *
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 227/331
EAEC CICS +!T4+,WTR.@SI'2name3
WC,MM.RE.2data"area3
W-E@GTH2data"value3YYY
E@'"EAEC0
Conditions < I@9REQ> -E@GERR
12
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 228/331
CICS
P*4 A
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 229/331
LI/5 *+T3*/
P*)4 -
,CTL
Application ProgramLogic Levels
3O A D
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 230/331
• To load program(ta)le(map !rom t+e CICS 'FHRP- concatenationli)rar into t+e main storage
• ?sing load reduces sstem over+ead
• Synta* <
EAEC CICS -oad
Program2name3
WSET 2pointer"re!3Y
W-E@GTH 2data"area3Y
E@'"EAEC0
Condition < @,T.?TH> PGMI'ER
13
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 231/331
+ ! 3 ! A S !
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 232/331
• To RE-E.SE a loaded program(ta)le(map
• Synta* <
EAEC CICS RE-E.SE
PR,GR.M2name3
E@'"EAEC0
Conditions < PGMI'ERR> @,T.?TH> I@9REQ
13
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 233/331
C O " " A + ! A
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 234/331
• 'ata passed to called program using C,MM.RE. in -I@D andACT-
• Calling program " orking Storage de!inition
• Called program " -inkage section de!inition under
'FHC,MM.RE.
• Called program can alter data and t+is *ill automaticall
availa)le in calling program a!ter t+e RET?R@ command
2 need not use C,MM.RE. option in t+e return !or t+is
purpose 3
• EIBC.-E@ is set *+en C,MM.RE. is passed
13
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 235/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 236/331
Communication 0ithDatabases
13
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 237/331
C IC S D B7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 238/331
• CICS provides inter!ace to 'B10• 'B1 re/uires CICS .ttac+ment Facilit to connect itsel! to
CICS
• CICS programs can issue commands !or SQ- services in order
to access t+e 'B1 data)ase0
EAEC SQ- !unction
WoptionsY
E@'"EAEC
13
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 239/331
perating system
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 240/331
'-6 *+4I/
CICS Attachment acility
'-6
'ata&ase
DB2 Database access by CICS136
+ CT ! n try
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 241/331
• T+e CICS"to"'B1 connection is de!ined ) creating andassem)ling t+e resource control ta)le 2RCT3
• T+e in!ormation in RCT is used to control t+e interactions
)et*een CICS = 'B1 resources
• 'B1 attac+ment !acilit provides a macro 2'S@CRCT3 to
generate t+e RCT0
• T+e RCT must )e link"edited into a li)rar t+at is accessi)le to
M9S
13
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 242/331
DB7 recom#iler
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 243/331
Source Program 2EAEC SQ-000
X EAEC CICS0003
'B1 Precompiler
X
CICS command translator X
Compile B C,B,-
X
-inkedit ) -inkage editor X
-oad Module
13
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 244/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 245/331
G4!4!S
13
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 246/331
Tr a n s ient da t a C o ntr o l
P id li ti it+ i ! ilit
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 247/331
• Provides application programmer *it+ a /ueuing !acilit• 'ata can )e stored(/ueued !or su)se/uent internal or e:ternal
processing
• Stored data can )e routed to sm)olic destinations
• T'Qs re/uire a 'CT entr
• Identi!ied ) 'estination id " # to 5 )tes
14
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 248/331
T D Gs
I t titi d i ti it+i t+ CICS ) t
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 249/331
• Intra#artitioned " association *it+in t+e same CICS su)sstemTpical uses are
" .TI 2.utomatic Task Initiation3 associated *it+ trigger level
" Message s*itc+ing
" Broadcasting etc
• !*tra#artitioned " association e:ternal to t+e CICS su)sstem> Can
associate *it+ an se/uential device " Tape> '.S'> Printer etc
Tpical uses are
" -ogging data> statistics> transaction error messages
" Create !iles !or su)se/uent processing ) @on"CICS ( Batc+
programs0
141
T D Gs
O ti
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 250/331
• O#erations
rite data to a transient data /ueue 2RITEQ T'3
Read data !rom a transient data /ueue 2RE.'Q T'3
'elete an intra partition transient data /ueue 2'E-ETEQ T'30
14
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 251/331
0+IT!G TD
S t
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 252/331
• Synta* <EAEC CICS 0+IT!G TD
Q?E?E2name3
FR,M2data"area3
W-E@GTH2data"value3YWSJSI'2sstemname3Y
E@'"EAEC0
Conditions< 'IS.B-E'> I@9REQ> I,ERR> ISCI@9REQ>-E@GERR> @,SP.CE> @,T.?TH> @,T,PE@> QI'ERR>SJSI'ERR
14
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 253/331
+ ! A DG TD
Reads t+e /ueue destructivel 'ata record not availa)le in t+e
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 254/331
• Reads t+e /ueue destructivel " 'ata record not availa)le in t+e/ueue a!ter t+e read0
• Synta* <
EAEC CICS +!ADG TD
Q?E?E2name3
[I@T,2data"area3 X SET2ptr"re!3 \
W-E@GTH2data"value3Y
W@,S?SPE@'Y
E@'"EAEC0
Conditions < 'IS.B-E'> I,ERR> I@9REQ> ISCI@9REQ>
-E@GERR> @,T.?TH> @,T,PE@> QB?SJ> QI'ERR> QER,>SJSI'ERR
14
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 255/331
D! 3 ! T ! G TD
'eletes all entries in t+e /ueue
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 256/331
• 'eletes all entries in t+e /ueue• Synta* <
EAEC CICS 'E-ETEQ T'
Q?E?E2name3
E@'"EAEC0
Conditions< I@9REQ> ISCI@9REQ> @,T.?TH>
QI'ERR> SJSI'ERR
14
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 257/331
D esti na tion Contr o l T ab le
• 'CT is to register t+e in!ormation o! all T'Qs
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 258/331
• 'CT is to register t+e in!ormation o! all T'Qs• 'estination Control Program 2'CP3 uses 'CT to identi! all
T'Qs and per!orm all I(, operations0
• 'FH'CT is a macro to de!ine intra = e:tra partition T'Qs
TJPEI@TR.(EATR.
• RE?SE option speci!ied along *it+ intra partition T'Q tells
*+et+er t+e space used ) T'Q record *ill )e removed =
reused a!ter it +as )een read0
14
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 259/331
A u tomatic T as' I n itiation
• Facilit t+roug+ *+ic+ a CICS transaction can )e initiated
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 260/331
• Facilit t+roug+ *+ic+ a CICS transaction can )e initiatedautomaticall
'FH'CT TJPEI@TR.
'ESTI'MSGS
TR.@SI'MS#
TRIG-E97&&
+en t+e num)er o! T'Q records reac+es 7&&> t+e
transaction MS# *ill )e initiated automaticall
• .pplications
Message s*itc+ing = Report printing
14
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 261/331
T e m # orar y S tora$ e C ontrol
• Provides application programmer t+e a)ilit to store and retrieve
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 262/331
• Provides application programmer t+e a)ilit to store and retrievedata in a TSQ
• .pplication can use t+e TSQ like a scratc+ pad
• TSQs are
" Created and deleted dnamicall
" @o CICS ta)le entr re/uired i! recover not re/uired
" Identi!ied ) Queue id " # to K )tes
" Tpicall a com)ination o! termid(tranid(operid
• Eac+ record in TSQ identi!ied ) relative position> called t+e item
num)er
14
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 263/331
TSGs
O#erations
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 264/331
O#erationsrite and ?pdate data
Read data " Se/uential and random
'elete t+e /ueue
Access .cross transactions
V .cross terminals
Stora$e
Main " @on"recovera)le
.u:iliar " Recovera)le
TST entr re/uired> 9S.M !ile 'FHTEMP
14
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 265/331
TSGs Ty#ical uses
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 266/331
• 'ata passing among transactions
• Terminal Paging
• Report printing
15
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 267/331
0+IT!G TS
Synta* <
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 268/331
Synta* <EAEC CICS 0+IT!G TS
Q?E?E2name3
FR,M2data"area3
W-E@GTH2data"value3Y
W@?MITEMS2data"area3 X
ITEM2data"area3 WRERITEY Y
WM.I@X. ? AI-I . RJ Y
W@,S?SPE@'Y
E@'"EAEC0
Conditions < ITEMERR> -E@GERR> QI'ERR> @,SP.CE> @,T.?TH>
SJSI'ERR> I,ERR> I@9REQ> ISCI@9REQ
+ ! A DG TS
• Synta* <
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 269/331
Synta* <EAEC CICS +!ADG TS
Q?E?E2name3
[I@T,2data"area3 X SET2ptr"re!3 \
-E@GTH2data"value3W@?MITEMS2data"area3Y
WITEM2data"area3 X @EAT Y
E@'"EAEC0
Conditions < ITEMERR> -E@GERR> QI'ERR> @,T.?TH>SJSI'ERR> I,ERR> I@9REQ> ISCI@9REQ
15
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 270/331
D ! 3 ! T ! G TS
• 'eletes all entries in t+e /ueue
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 271/331
'eletes all entries in t+e /ueue• Synta* <
EAEC CICS D!3!T!G TS
Q?E?E2name3
E@'"EAEC0
Conditions< I@9REQ> ISCI@9REQ> @,T.?TH> QI'ERR>
SJSI'ERR
15
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 272/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 273/331
I,T!+.A3 & TAS1CO,T+O3
15
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 274/331
A S 1 TI " !
• ?sed to o)tain current date and time
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 275/331
• Synta* <
EAEC CICS AS1TI"!ABSTI"!(dataarea)J
E@'"EAEC0
• EIB'.TE and EIBTIME updated *it+ current date and time
• .BSTIME returns value o! time in packed decimal !ormat
15
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 276/331
-O+"ATTI"!
Synta* <EAEC CICS -O+"ATTI"! ABSTI"!(d t f)
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 277/331
yEAEC CICS -O+"ATTI"! ABSTI"!(dataref)
WJJ'''2data"area3Y
WJJMM''2data"area3Y000 etc0
W'.TE2data"area3 W'.TEF,RMW2data"area3YYY
W'.TESEPW2data"value3YY
W'.J,FM,@TH2data"area3Y
WM,@TH,FJE.R2data"area3Y
WJE.R2data"area3Y00000
WTIME2data"area3 WTIMESEPW2data"value3YYY
E@'"EAEC0
Condition: I@9REQ
D! 3 A
• ?sed to 'E-.J t+e processing o! a task! !
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 278/331
p g• T+e issuing task is suspended !or a speci!ied interval or ?ntil t+e
speci!ied time
• Synta* <
EAEC CICS D!3A
[email protected]++mmss3 X TIME2++mmss3
E@'"EAEC
Conditions: EAPIRE'> I@9REQ
15
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 279/331
ST A + T
• ?sed to start a transaction at t+e speci!ied terminal and at t+especi!ied time or interval
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 280/331
speci!ied time or interval
• 'ata can )e passed to t+e ne* transaction
• Synta* <
EAEC CICS STA+T
TR.@SI'2transid3
WTERMI'2termid3
TIME2++mmss3 X [email protected]++mmss3 Y
E@'"EAEC
Conditions < I@9REQ> -E@GERR>TERMI'ERR> TR.@SI'ERR
158
Other Interal Control Commands
• OST " to re/uest noti!ication *+en t+e speci!ied time +ase:pired
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 281/331
e:pired0
• 0AIT !.!,T " to *ait !or an event to occur0
• +!T+I!.! " ?sed to retrieve t+e data passed ) t+e ST.RT
• CA,C!3 "?sed to cancel t+e Interval Control re/uests0 eg0'E-.J>P,ST and ST.RT identi!ied ) REQI'0
• S4S!,D ?sed to suspend a task
• !,G to gain e:clusive control over a resource
• D,G to !ree t+e e:clusive control !rom t+e resource gained )
E@Q
15
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 282/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 283/331
+ecoery & +estart
16
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 284/331
T h e , e ed f o r + e co ery% +e st a rt
• T+e possi)le !ailures t+at can occur outside t+e CICS sstem areCommunication !ailures 2in online sstems3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 285/331
Communication !ailures 2in online sstems3
'ata set or data)ase !ailures
.pplication or sstem program !ailures
Processor !ailures = Po*er suppl !ailures0
• Recover(Restart !acilities are re/uired to minimie or i! possi)le>
eliminate t+e damage done to t+e online sstem> in case o! t+e
a)ove !ailures to maintain t+e sstem = data integrit0
16
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 286/331
+ ! CO. ! +
• .n attempt to come )ack to *+ere t+e CICS sstem or t+etransaction *as *+en t+e !ailure occurred
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 287/331
transaction *as *+en t+e !ailure occurred
• +ecoerable +esources
9S.M !iles
Intrapartition T'Q
TSQ in t+e au:iliar storage
'.T. ta)les
Resource de!initions = Sstem de!inition !iles
16
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 288/331
+ ! ST A +T
• To resume t+e operation o! t+e CICS sstem or t+e transaction *+en
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 289/331
• To resume t+e operation o! t+e CICS sstem or t+e transaction *+en
t+e recover is completed
163
-acilities for + e c o e r y %+ es t a rt
-acilities for CICS +ecoery%+estart
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 290/331
• 'namic Transaction Backout
• .utomatic Transaction Restart
• Resource Recover ?sing Sstem -og
• Resource Recover ?sing ournal
• Sstem Restart
• E:tended Recover Facilit 2ARF3
16
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 291/331
D y na mi c Tr a ns acti o n Ba c' o u t( D T B )
• +en t+e transaction !ails> )acking out t+e c+anges made )
t+e transaction *+ile t+e rest o! t+e CICS sstem continues
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 292/331
normall is called 'TB
• CICS automaticall *rites t+e )e!ore image6 in!ormation o! t+e
record into t+e dynamic lo$ !or t+e duration o! one -? >t+e*ork )et*een t+e t*o consecutive SJ@C points
• +en an .BE@' occurs> CICS automaticall recovers all
recovera)le resources using t+e in!o0 in dnamic log 2Set
'TBJES in PCT3
16
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 293/331
3 4 0 & S, C #oint
• T+e period )et*een t+e start o! a particular set o! c+anges andt+e point at *+ic+ t+e are complete is called a logical unit o!
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 294/331
p p g
*ork " -?
• T+e end o! a logical unit o! *ork is indicated to CICS ) asnc+roniation point 2snc pt30
• Intermediate SJ@C pt0 can )e done )• Synta* <
EAEC CICS S,COI,T
WR,--B.CDY
E@'"EAEC
16
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 295/331
3 4 0s & S ,C #ts
X" " " " " " " " " " " " -? " " " " " " " " " XTask .X"""""""""""""""""""""""""""""""""""""""""""""X
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 296/331
Task .X X
S,T E,T"SP
X" " " -?" " X" " " -?" " X" " "-?" " X
Task BX""""""""""""""""N"""""""""""""""N""""""""""""""X
S,T SP SP E,T"SP
+en t+e !ailure occurs> c+anges made *it+in t+e a)ending
-? *ill )e )acked out0
16
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 297/331
A u tomati c Tr a ns ac tion +e s t a rt
• CICS capa)ilit to automaticall restart a transaction a!ter allresources are recovered t+roug+ 'TB
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 298/331
g
• I! t+e transaction re/uires automatic restart !acilit> set
REST.RTJES in PCT
• Care s+ould )e taken in order to restart t+e task at t+e point
*+ere 'TB completes in t+e case o! intermediate SJ@C point
16
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 299/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 300/331
ro$ram re#aration
16
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 301/331
Introduction
• Preparing a Program to run in CICS Environment0• 'e!ining t+e Program in t+e CICS Region0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 302/331
g g g
• E:ecuting t+e Program0
17
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 303/331
preparation
S3*C+
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 304/331
'-6
P*+CMPIL+*
CICS
CMPIL+*
C-L
CMPIL+*
LI/5
+'IT
17
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 305/331
re#arin$ a ro$ram
CICS re/uires t+e !ollo*ing steps to prepare a program
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 306/331
• Translating t+e Program0
• .ssem)le or Compile t+e Translator ,utput0 =
• -ink t+e Program0
17
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 307/331
Tr a n s lation
• Translates t+e EAEC CICS6 Statements into t+e Statementsour -anguage 2C,B,-3 Compiler can ?nderstand0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 308/331
• T+e Translator gives t*o outputs> a Program -isting as
SJSPRI@T and a Translated Source in SJSP?@CH0
• T+e SJSP?@CH is given as t+e input to t+e Program Compiler0
• I! an Cop Books are used in t+e Program> t+ere s+ould not )ean CICS Statements in t+e Cop Book0
17
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 309/331
Com#ilin$ or 3in'in$
• .s t+e CICS Commands +ave )een translated> t+e compilation
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 310/331
o! t+e CICS program is t+e same as language program0
• Hence> t+e compiler options can )e speci!ied as re/uired0
17
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 311/331
Definin$ the ro$ram
• T+e .pplication s+ould )e de!ined and installed into t+e PPT0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 312/331
• T+is can )e done eit+er ) using CE'. trans or 'FHPPT0
17
5
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 313/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 314/331
CICS Su##lied Transactions
17
6
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 315/331
C ! S,% C !S- Tr a n s ac tions
• To sign on to CICS sstem• CES@ W?SERI'useridY W>PSpass*ordY
W @EPS dYW -.@G?.GE lY
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 316/331
W>@EPSne*pass*ordYW>-.@G?.GElY
• ?serid = pass*ord values can )e !rom #"K c+ars0
• In R.CF> t+e ?serid given in CES@ is veri!ied0
• @EPS to c+ange t+e pass*ord and -.@G?.GE to c+oosenational language
• Sign o!! ) CESF *+ic+ )reaks t+e connection )et*een t+e userand CICS
• I! t+e Sign on is done t*ice !or t+e same userid at t+e terminal>t+e previous operator *ill )e signed o!!
17
7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 317/331
C!CI Command 3eel Inter#reter
• To )uild and test t+e e!!ect o! EAEC CICS commands
• CECI .SSIG@ is used to get t+e current userid>ssid> terminal id>
li ti id t
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 318/331
application id etc00
• Be!ore using t+e maps in programs> it can )e tested using CECI
to c+eck +o* it appears on t+e screen0
• CECI gives t+e complete command snta: o! t+e speci!iedcommand0
• CECI RE.'Q T' Q?E?E2TEST-& *ill read t+e current
record o! t+e given T'Q
17
8
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 319/331
C ! " T " a ster TerminalTr a n s a c tion
CEMT provides t+e !ollo*ing services
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 320/331
• 'isplas t+e status o! CICS = sstem resources
• .lter t+e status o! CICS = sstem resources
• Remove t+e installed resource de!initions
• Per!orm !e* !unctions t+at are not related to resources
17
9
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 321/331
C!D-!*ecution Dia$nostic-a c ility
• To test command level application programs interactivel• CE'F Wtermid(ssid(sessionidY W>,@(>,FFY
T id + id i!i ! + i l +i + + i
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 322/331
• Termid " t+e identi!ier o! t+e terminal on *+ic+ t+e transaction to
)e tested is )eing run
• Sessionid " To test(monitor a transaction attac+ed across an
MR,(ISC session• Ssid " To test a transaction across an .PPC session
18
0
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 323/331
C! D - (Contd//)
T+e points at *+ic+ E'F interrupts e:ecution o! t+e program andsends a displa to t+e terminal
• .t transaction initialiation> a!ter EIB +as )een initialied and
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 324/331
.t transaction initialiation> a!ter EIB +as )een initialied and)e!ore t+e app0 pgm given control
• Start o! e:ecution o! eac+ CICS command 2auguementvalues can )e c+anged at t+is point3
• End o! e:ecution o! eac+ CICS command and )e!ore t+eHandle condition mec+anism is invoked 2response codevalues can )e c+anged3
• .t program termination = at normal task termination
• +en an .BE@' occurs = at a)normal task termination0
• EIB values can )e c+anged00= CEBR can )e invoked
18
1
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 325/331
C!B+Tem#orary Stora$eB ro s e
• To )ro*se t+e contents o! CICS temporar storage /ueues
2TSQ3
• CEBR ) de!ault *ill s+o* t+e /ueue associated *it+ t+e current
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 326/331
• CEBR ) de!ault *ill s+o* t+e /ueue associated *it+ t+e current
terminal CEBR-& *+ic+ can )e overridden to vie* an ot+er
/ueue
• TERM to )ro*se TSQ !or anot+er terminal• Q?E?E to make t+e named /ueue> current
• P?T to cop t+e current /ueue contents into T'Q
• GET to !etc+ T'Q !or )ro*sing
• P?RGE erases t+e contents o! t+e current /ueue
18
2
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 327/331
!*ercise 7
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 328/331
E:ercise " 1
18
3
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 329/331
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 330/331
T+ank Jou18
4
8/22/2019 29646761 Cics Mainframes
http://slidepdf.com/reader/full/29646761-cics-mainframes 331/331