cics mainframe document
TRANSCRIPT
-
8/13/2019 CICS mainframe document
1/145
Customer Information Control System (CICS)
Version 2.0
10thOct. 2000
1
-
8/13/2019 CICS mainframe document
2/145
Customer Information Control System (CICS)
Table Of Contents
Introduction To CICS ................................................................................................................... ..61. Batch and Online systems .........................................................................................................................................6
2. Brief History of CICS ...............................................................................................................................................8
3. CICS System Concept ............................................................................................................................................1!. "eatures Of CICS ........................................................................................................................................... ........13
System Components .....................................................................................................................1!#. Terminal Control $ro%ram &ana%ement &odule 'TC$( ............................................................................... ........ .1#6. Tas) Control $ro%ram &ana%ement &odule '*C$( ...............................................................................................16
+. $ro%ram Control $ro%ram &ana%ement &odule '$C$( ............................................................................. ......... ...168. "ile Control $ro%ram &ana%ement &odule '"C$( .................................................................................................1+,. Stora%e Control $ro%ram &ana%ement &odule 'SC$( .......................................................................................... .1+1. Ta-les .................................................................................................................................................................... .1+
11. Control Bloc)s ........................................................................................................................................................18
ata Communication Operation In CICS .................................................................... ..... ..... ..... ..1,12. Basic &appin% Support 'B&S( ..................................................................................................................... ........ .1,13. $hysical &ap and Sym-olic &ap ..................................................................................................................... ......2
1!. &ap and &apset .................................................................................................................................................. ...21
1#. Components Of / Screen ..................................................................................................................................... ..2216. &ap efinition &acros ............................................................................................................................... ........ ...2!1+. "H&S &acro ....................................................................................................................................................26
18. "H&I &acro .....................................................................................................................................................2+1,. "H&" &acro ....................................................................................................................................................282. "ormat of Sym-olic &ap ........................................................................................................................................3
Characteristics Of CICS ........................................................................................................... .....3221. &ultithreadin% ....................................................................................................................................................... .3222. 0uasieentrancy ............................................................................................................................................... ....3223. $seudoConersational $ro%rammin% .....................................................................................................................332!. Transaction rien ............................................................................................................................................... ..3!
Command 4eel $ro%rammin% ......................................................................................... ..... ..... ..362#. CICS $ro%ram eelopment .............................................................................................................................. ....3626. CICS Command "ormat 5 /pplication eelopment ith COBO4 ........................................................ ......... ....36
2+. Command 4an%ua%e Translator ..............................................................................................................................3+28. COBO47CICS $ro%ram Structure ...........................................................................................................................382,. $assin% the data usin% CO&&// .....................................................................................................................3,
CICS CO$9 BOO*S ........................................................................................................... ........!13. :ec Interface Bloc) 'IB( In 4in)a%e Section ......................................................................................................!1
31. Standard /ttri-ute Byte 4ist...................................................................................................................................!232. Installation efined &essa%e "ile .............................................................................................................. ........ ....!3
33. /ttention Identifier '/I( .......................................................................................................................................!!
/pplication $ro%ram House)eepin% ...................................................................... ..... ..... ..... ..... ...!#3!. :ceptional Conditions ...........................................................................................................................................!#3#. H/;4 CO;ITIO; Command ............................................................................................................... ........!6
36. I &/$ Command '"ormatted ata Transfer( ..........................................................................................#+!3. ata >alidity Chec)in% ................................................................................................................................... .......#8!!. S; &/$ Command ' "ormatted ata Transfer( ......................................................................................... ......#,!#. CI> Command '?nformatted ata Transfer( ................................................................................... ........ ....62
!6. S; T@T Command '?nformatted ata Transfer( ...........................................................................................6!
Interal Control Operations ......................................................................................... ..... ..... ..... ..6#
2
-
8/13/2019 CICS mainframe document
3/145
Customer Information Control System (CICS)
!+. /S*TI& Command .............................................................................................................................................6#!8. "O&/TTI& Command ............................................................................................................................. .......66
$ro%ram Control Operations ........................................................................................................6+!,. /pplication $ro%ram 4eels ................................................................................................................................. ..6+#. T?; Command ................................................................................................................................... ........ ...68#1. 4I;* and @CT4 Command ...................................................................................................................................68
"ile Control Operations 'andom /ccess( ....................................................................................+2#2. Special Serices Of "ile Control .............................................................................................................................+2#3. / Command ?sin% "ull *ey ................................................................................................................. ........ .+3#!. / Command ith IC 4O/ Statement ............................................................................................................................1238,. /SS Command .................................................................................................................................. ........12!
,. Stora%e Control .....................................................................................................................................................12#,1. $ro%ram Control ...................................................................................................................................................12+
CICS Transactions ......................................................................................................................131,2. CSS; ....................................................................................................................................................................131
,3. CB ............................................................................................................................................................... ....131,!. CCI .....................................................................................................................................................................131
,#. C&T ...................................................................................................................................................................132
3
-
8/13/2019 CICS mainframe document
4/145
Customer Information Control System (CICS)
,6. CSS" .............................................................................................................................................................. ......132
/ppendi:/ ................................................................................................................................133,+. /ssi%nment 1 ........................................................................................................................................................133,8. /ssi%nment 2 ........................................................................................................................................................13!,,. /ssi%nment 3 ........................................................................................................................................................13#1. /ssi%nment ! ........................................................................................................................................................13#
11. /ssi%nment # ........................................................................................................................................................13612. /ssi%nment 6 ........................................................................................................................................................13+
/ppendi:B .......................................................................................................................... ......13813. Sample COBO4CICS $ro%ram .......................................................................................................................... .138
/ppendi:C .......................................................................................................................... ......1!21!. Bi-lio%raphy .........................................................................................................................................................1!2
/ppendi: ................................................................................................................................1!31#. Ta-le Of "i%ures ...................................................................................................................................................1!3
!
-
8/13/2019 CICS mainframe document
5/145
Customer Information Control System (CICS)
ayise Schedule
Day 1
Chapter1Introduction To CICS
Chapter2 System Components
Day 2
Chapter3 ata Communication Operation in CICS
Chapter! Characteristics of CICS
Day 3
Chapter# Command 4eel $ro%rammin%
Chapter6 CICS CO$9 BOO*S
Day
Chapter+ /pplication $ro%ram House)eepin%Chapter8 B&S $ro%rammin% Considerations
Day !
Chapter, Terminal Control OperationsChapter1 Interal Control Operations
Chapter11 $ro%ram Control Operations
Day "
Chapter12 "ile Control Operations 'andom /ccess(
Day #Chapter13 "ile Control Operations 'Se=. /ccess(
Day $
Chapter1! Temporary Stora%e Control
Chapter1# Transient ata Control
Chapter16 Interal Control 5 Tas) Control
Day %
Chapter1+ Tests 5 e-u%%in%
Chapter18 ecoery 5 estartChapter1, /pplication $ro%ram House)eepin% contd
Chapter2 CICS Transactions
#
-
8/13/2019 CICS mainframe document
6/145
Customer Information Control System (CICS)
Chapter 1
Intro&uction To CICS
'atch an& Online systems
Characteristics of batch an& online systems
There are to types of computer application systems. One is the -atch application systemand the other is the online application system. The -atch system has a system
enironment here Do-s run one -y one in a conentional ayE hereas the online system
has the system enironment here many transactions run concurrently.
Batch System Online System
ata Collection Offline Online
Input Se=uential in -atch andomE concurrent
Fo- Schedule /t specific interal Instantaneous
esources ;ot shara-le Shara-le
esponse Time ;ot critical Critical
Output $rinted reportsE output filesE?ser must ait for -atch
Do-s to produce reports
To terminalE ?pdated filesEsystem lo%E Instant feed-ac)
Security Simple Comple:
ecoery Simple Comple:
Information ;ot alays current /lays current
?pdation In -atch Immediate
Table 1.1: Batch System Vs Online System
&anta*es of the Online system
These daysE the online system is so common that irtually eery lar%e mainframe
installation has at least on online application system. This is -ecause the online systemhas adanta%es oer the -atch systems.
?ptodate file 'information( can -e shared amon% many users simultaneously and
instantly.
ata alidation and editin% can -e done at the data entry time
6
-
8/13/2019 CICS mainframe document
7/145
Customer Information Control System (CICS)
&anta*es of the 'atch System
On the other handE in spite of the eerincreasin% popularity of the online systemE the
-atch system has not died outE and it still contri-utes to the lar%e portion of dataprocessin% re=uirements. This is -ecause the -atch system has adanta%e oer the online
system. Some of the adanta%es of the -atch system are as follos
Certain information does not hae to -e updated or displayed on a realtime -ase.
?sers can ait until the ne:t dayE the end of a ee)E or the end of a month. In thiscaseE the -atch system is sufficient for the purpose.
If massie file updates or len%thy calculations are inoledE the -atch system
should -e used -ecause the online processin% in these areas tends to -e ery costlyin terms of resource consumption.
Interactie +ro*rams
"our types of pro%rams are common to all interactie systems. They are1. ataentry pro%rams
2. In=uiry pro%rams
3. "ilemaintenance pro%rams!. &enu pro%rams
Data,entry +ro*rams
The most critical pro%rams in most interactie systems are dataentry pro%rams. These
pro%rams accept input data from operator and use it to update the files after alidatin% thedata entered. / typical dataentry pro%ram re=uires three steps
1. The operator enters data for one transaction
2. The pro%ram updates any related master files
3. The pro%ram rites the transaction to a transaction file
In-uiry +ro*rams
/n in=uiry pro%ram is desi%ned to proide a response to a users in=uiry. / in=uirypro%ram re=uires three steps
1. The operator enters the )ey of the record to -e displayed
2. The pro%ram retriees the appropriate record from the master file
3. The pro%ram displays the record at the terminal
ile,maintenance +ro*rams
/ filemaintenance pro%ram can update a file -y addin%E chan%in%E or deletin% records. /
filemaintenance pro%ram re=uires fie steps
1. The operator enters the record )ey2. The pro%ram reads the appropriate record
+
-
8/13/2019 CICS mainframe document
8/145
Customer Information Control System (CICS)
3. The pro%ram displays the record at terminal!. The operator enters any re=uired chan%es to the record
#. The pro%ram rerites the record to the master file
/enu +ro*rams
/ menu pro%ram allos an operator to select the function he ishes to perform. / menu
pro%ram re=uires three steps1. The pro%ram sends a list of processin% selections to the terminal
2. The operator chooses one of the selections
3. Control is passed to the appropriate pro%ram
Interactie system consi&erations
Shared files /n interactie system must proide for shared files -y coordinatin% al file
updates so to users arent alloed to update the same record at the same time.
esponse time esponse time is another special consideration for interactie system.
&any factors affect response time the num-er of users on the systemE siGe of the C$?.Speed of dis) driesE ho system parameters are setE speed of communication linesE and
ho application pro%rams are ritten.
Security The main security techni=ue used in todays interactie system is lo%onprocedure
ecoery /ll interactie systems must proide for recoery in the eent of a system
failure.
'rief istory of CICS
The adanta%es of the online system ere first reco%niGed in the late 1,#s and early1,6s -y such -usinesses as the airline and -an)in% industriesE hich pioneered the
deelopment of the lar%escale online systems. Since thenE online systems hae -ecome
e:plosiely popular amon% all industries.
rior to CICS
?ntil the late 1,6sE all online systems ere deeloped on a custommade -asis for each
application for each installation. HoeerE deelopin% an online system is a comple:proDect inolin% the operatin% system 'OS(E telecommunication access methodsE data
access methodsE and applications pro%rams.
8
-
8/13/2019 CICS mainframe document
9/145
Customer Information Control System (CICS)
ThereforeE instead of deelopin% an online system from scratch each timeE thedata-ase7data communication 'B7C( control system as deeloped in order to proide
the control functions of the online system enironment. ?nder a B7C control system E
an application pro%ram can concentrate on the application processin%E -ein% free from
considerations of OSE hardareE etc.E hich are not really the interest of the applicationpro%rams. eelopin% an online application system under the B7C control system as a
result -ecame si%nificantly easier and faster.
arly CICS (/acro eel)
The Customer Information Control System 'CICS( as deeloped -y IB& in the late
1,6s as a B7C control system. The initial ersion as the macro leel CICSE under
hichE as the name macro su%%estsE the application pro%rams used the assem-lermacro type CICS macros for re=uestin% CICS serices. ?nder the CICS macro leelE
application deelopment -ecame si%nificantly easier. HoeerE it as still cum-ersome
or) hich re=uired special s)ills.
CICS Comman& eel
Oer timeE CICS as constantly up%raded and functionally enhanced. One si%nificant
up%rade as from macro leel to the command leel. CICS commands are hi%hleel
lan%ua%e ersion of CICS macrosE in a sense that one CICS command achiees a CICSserice hich ould hae -een achieed -y a series of CICS macros. ThereforeE under
CICS command leelE application deelopment -ecame much easier than under the CICS
macro leel.
Current CICS amily
There are currently fie CICS products aaila-leE each of hich is deeloped for
particular operatin% system. These products are as follos
ro&uct O+eratin* System
CICS7&>S >ersion 2 elease 1 &>S7@/E &>S7S/
CICS7OS7>S >ersion 1 elease + &>SE &>S7@/
CICS7OS7>S >ersion 1 elease + >S
CICS7>& elease 2 >&7S$
CICS OS72 OS72
"unctionallyE all of these CICS products are compati-le ith each otherE ith certain
e:ceptions caused -y the differences amon% the correspondin% operatin% systems.
,
-
8/13/2019 CICS mainframe document
10/145
Customer Information Control System (CICS)
CICS4/VS
CICS7&>S ersion 2 elease 1 is the current ersion of the mainstream CICS productEreplacin% its older ersionE CICS7Os7>S >ersion 1 elease +. It runs under the &>S7@/
operatin% system and proides comprehensie serices as a %eneral purpose B7Ccontrol system in the irtual enironment.
CICS System Conce+t
Ob5ectie
The primary o-Dectie of CICS is to proide the control and serices functions of the
B7C system as a pac)a%e. That ayE CICS users can deelop their on customiGed
B7C system -y concentratin% on the application deelopment -ased on their onneedsE freed from detailed considerations for the operatin% system and computer
hardareE includin% communication terminals.
CICS itself is not a B7C system unless applications accompany itE -ecause CICSproides only the control enironment for the B7C system. This is hy CICS is
cate%oriGed as a B7C control system.
CICS System Com+onents
CICS positions itself -eteen the operatin% system and application pro%rams. The
essential role of CICS isE thereforeE to interface -eteen application pro%rams and the
operatin% system as the B7C control system. CICS consists of fie maDor systemcomponentsE each of hich proides the arious specialiGed CICS serices as follos
ataCommunication "unctions
ata Handlin% "unctions
/pplication $ro%ram Serices
System Serices &onitorin% "unctions
1
-
8/13/2019 CICS mainframe document
11/145
Customer Information Control System (CICS)
Data,Communication unctions
The Component of datacommunication functions proides an interface -eteen CICSand terminals or other systems. The folloin% CICS serices are offered
To interface to telecommunication access methodsE such as >T/&E TC/&E
BT/&.
To free application pro%rams from terminal hardare throu%h &asic &appin%
Support 'B&S(E hich proides
eice independence
"ormat independence
To proide &ultie%ion Operation '&O(E throu%h hich more than one CICS
re%ion in a system can communicate.
To proide Intersystem communication 'ISC(E throu%h hich a CICS re%ion of a
system can communicate ith other CICS re%ions in other systems or other non
CICS systems.
Data,an&lin* unctions
The component of datahandlin% functions proides an interface -eteen CICS and data.The folloin% CICS serices are offered
To interface ith data access methodsE such as >S/& and B/&.
To interface ith data-ase access methodsE such as B2E S047SE and 47I.
To maintain data inte%rity -y
Control of simultaneous record updates
$rotection of data as tas) /B;s
$rotection of data at system 'CICS or OS( failures
++lication ro*ram Serices
The component of application pro%ram serices proides an interface -eteen CICS and
application pro%rams. The folloin% CICS serices are offered
To interface ith COBO4E $47IE /ssem-ler pro%rams
Command leel translator
:ecution dia%nostic facility '"(
Command interpretater 'CCI(
Screen definition facility 'S"( Trace and dump facilities
System Serices
The component of system serices proides an interface -eteen CICS and the operatin%
system. The folloin% CICS serices are offered
$ro%ram controlE such as load and release of application pro%rams
11
-
8/13/2019 CICS mainframe document
12/145
Customer Information Control System (CICS)
Stora%e controlE such as ac=uirin% and freein% of stora%e
Tas) controlE such as tas) schedulin% -ased on the tas) priority
/onitorin* unctions
The component of monitorin% functions monitors arious eents ithin CICS andproides a series of statistics to -e used for system tunin%.
Other Systems
Operatin% System '&>S7@/(
ata-ase ata /ccess Telecommunication /ccess ðod ðod /ccess ðod
'47IE B2( '>S/&E '>T/&E TC/&E
ata B/&( BT/&(Stora%e
CICS7&>S Terminals
System Serices
atahandlin% &onitorin% ataComm.
"unctions "unctions "unctions
/pplication
$ro%ram Serices
CICS /pplication pro%rams 'COBO4E $47IE /ssem-ler(
12
-
8/13/2019 CICS mainframe document
13/145
Customer Information Control System (CICS)
Fig. 1.1: CICS System Components
eatures Of CICS
1.D'4DC
CICS ma)es data communication much easier -y supplyin% all the -asic componentsneeded to handle data communication. This allos system desi%ner and pro%rammers to
concentrate on deelopin% application pro%rams ithout hain% to concern ith the
details of data transmissionE -uffer handlin% or the properties of indiidual terminal
deices.
2. /ulti+ro*rammin*
/s far as the operatin% system is concernedE CICS is an application pro%ram that is it runs
as a Do- in one of the systems partition or re%ionE hich is a irtual address space.Therefore CICS ta)es part in multipro%rammin% enironment of the operatin% system.
CICS is a lon%er runnin% Do- therefore it remains up durin% the day time collectin% on
line transactions and at ni%ht -atch Do-s are e:ecuted for master file updation etc.
3. /ultitas6in*
&ultitas)in% means that the operatin% system 'OS( allos more than one tas) to -ee:ecuted concurrentlyE re%ardless of hether the tas)s use the same pro%ram or differentpro%rams. ThereforeE this is not a uni=ue concept of CICS. ButE CICS mana%es
multitas)in% of CICS tas) ithin its on re%ion. That is CICS proides a multitas)in%
enironment here more than one CICS tas) run concurrently.
. Sche&ulin*
Ahen user re=uests a transactionE normally -y lo%%in% on and )eyin% in a transaction
codeE CICS chec)s the status of the user and the terminal. This ensures the alidity ofuserE terminal and transactionid. Then tas) control creates a tas) for the transaction.
CICS tries to %ie the -est response times to the most important or ur%ent or). ?suallyE
seeral tas)s are competin% for resourcesE so a transactionE an operatorE and a terminal areeach assi%ned a priority related to the importance of the function they carry out. CICS
sums these priorities to %ie the oerall priority of the tas) and uses this priority to decide
the order in hich to process competin% tas)s. Since transactions are not normally
13
-
8/13/2019 CICS mainframe document
14/145
Customer Information Control System (CICS)
processed throu%h to completion in a sin%leE uninterrupted optionE CICS ma)es suchdecisions eery time a tas) returns control to CICS.
Chapter 2
System Com+onents
The CICS7&>S system consists of
&ana%ement &odules
Ta-les Control Bloc)s
&ana%ement modules are the CICS7&>S pro%rams that interface -eteen the operatin%
system and the application pro%rams. ach mana%ement module performs a particularfunction. "or e:ampleE hen an application pro%ram issues a re=uest to read recordE the
"ile Control $ro%ram mana%ement module processes the re=uest. Input7output re=uests
are made to CICS7&>SE instead of the operatin% system as they are in -atch processin%enironment. CICS ta)es oer the difficult part of I7O operationsE leain% only the
e:ecution lo%ic to the application pro%ram.
Ta-les define the CICS7&>S systems enironment. The ta-les are functionally
associated ith the mana%ement modules. "or e:ample all file definitions are in the "ile
Control Ta-le. So definition may -e shared -y all application pro%rams and tas)s. "orthis reasonE the files are not defined in the application pro%ram as they are in a -atch
pro%ram. The Terminal Control Ta-le defines each terminal in the netor)J thus the
application pro%ram need not -e concerned ith the physical attri-utes of ariousterminals in the system. ;ot all mana%ement modules hae associated ta-les.
Control Bloc)s contain system type information. Ahen a transaction is initiated a control
-loc) called a Tas) Control /rea contain information pertinent to the tas). "or e:ampleTas) Control area contain pointers to the application pro%ram and to the terminals entryin the Terminal Control Ta-le.
1!
-
8/13/2019 CICS mainframe document
15/145
Customer Information Control System (CICS)
Terminal Control ro*ram /ana*ement /o&ule (TC)
Terminal Control $ro%ram 'TC$( is the mana%ement module that proides
communications interface to the application pro%ram. The application pro%rams ino)eTC$ hich then controls communication in the netor).
The Terminal Control $ro%ram performs the folloin% functions
e=uests terminal to send their transactions
Transfers data -eteen the application pro%ram and the terminal. /ll data
transfers are re=uested -y the application pro%ram -ut are e:ecuted -y TC$.
Handles hardare communications re=uirements. TC$ is responsi-le for theactual transmission of a messa%e oer communication lines.
Searches the Terminal Control Ta-le 'TCT(. ach terminal in the netor) is
identified -y a uni=ue entry in the Terminal Control Ta-le. The entry is calledTerminal Control Ta-le Terminal ntry 'TCTT(. Ahen data is ready to -e sent
to the terminalE a fla% is set O; in the terminals TCTT. TC$ searches the TCT
periodically and causes the data to -e sent to the respectie terminals.
e=uests initiation of a ne tas).
/ll functions carried out -y TC$ are transparent to application pro%ram.
$ro%rammer simply needs to code CI> and S; commands.
Fig.2.1: Terminal Control Program Management Mo!le
1#
/pplication pro%ram
CICSTerminalControl
Host
Operatin%
System
TC /ccess ðods
'TC/&E BT/&E
>T/&(
Terminal eices
Terminal Control re=uests
-
8/13/2019 CICS mainframe document
16/145
Customer Information Control System (CICS)
Tas6 Control ro*ram /ana*ement /o&ule (7C)
Tas) control )eeps control of the status of all CICS tas)s. &any of them ill -e
processed concurrently and tas) control allocates processor time amon% them. This is
called multitas)in%.
Ahen an operator re=uests a transactionE normally -y lo%%in% on and )eyin% in atransaction codeE CICS chec)s the status of the operator and the terminal. This ensures
that the operator in )non to the system and that the transaction is alid for that user and
the terminal. Tas) Control then creates a tas) for that transaction.
Transaction re=uest can -e made either -y enterin% transactionid at the terminal or -y
another CICS transaction.
/ transaction is processed up to an instruction inolin% input from a file or a terminalE
for instance. Then hile the transaction aits for its inputE another aitin% tas)s -e%insor resumes e:ecution.
ro*ram Control ro*ram /ana*ement /o&ule (C)
$ro%ram Control pro%ram '$C$( is the CICS7&>S mana%ement module responsi-le for
locatin% application pro%rams and if necessary load them into stora%e for e:ecution. It isalso responsi-le for transferrin% control to them and returnin% control -ac) to CICS hen
the application pro%ram hae completed e:ecution. $C$ also facilitates one application
pro%ram transferrin% control to another application pro%ram ia 4I;* and @CT4commands.
The alidity of transactionid supplied -y the user is chec)ed from the $ro%ram ControlTa-le -y $ro%ram Control $ro%ram mana%ement module.
In carryin% out its pro%ram control functionsE $C$ ma)es use of a ta-le called the
$rocessin% $ro%ram Ta-le '$$T(. There is an entry in the ta-le for each applicationpro%ram alon% ith its nameE host lan%ua%e and address.
/t the time a tas) re=uires a %ien application pro%ramE that pro%ram may or may not -ein stora%e. There are three reasons hy a pro%ram may already -e in stora%e at the time it
is needed -y a tas).
It is a resident pro%ramJ that isE it as loaded into stora%e hen CICS asinitiated
/nother tas) is usin% the pro%ram
/nother tas) used the pro%ram and stora%e area as not needed for somethin%else the pro%ram remains in stora%e.
16
-
8/13/2019 CICS mainframe document
17/145
Customer Information Control System (CICS)
$C$ )nos if there are any tas)s currently usin% the same pro%ramE from the alue of?S CO?;T in $$T. If ?S CO?;T is GeroE the stora%e area is made aaila-le
for other purpose.
ile Control ro*ram /ana*ement /o&ule (C)
The "ile Control $ro%ram '"C$( facilitates the accessin% of files on a direct access -asis.
"C$ proides command to /E AITE AIT and 4T records. It uses the
standard access methods proided -y IB&. It mana%es concurrent operations -ypreentin% simultaneous updatin% of a %ien record.
In carryin% out its file control functionsE "C$ ma)es use of a ta-le called the "ile ControlTa-le '"CT(. "CT includes an entry for each file that is to -e used durin% the operation of
CICS. ach entry in the "CT contains all the descriptie information for the file that it
representsE there-y freein% the application pro%rammer from definin% the physicalor%aniGation and other file attri-utes. The application pro%rammer simply refers to the
sym-olic name that identifies the file entry in the "CT.
Stora*e Control ro*ram /ana*ement /o&ule (SC)
Stora%e Control ac=uiresE controlsE and frees dynamic stora%e durin% e:ecution of a tas).
&aintains full control oer the irtual stora%e. Controls re=uests for main stora%e.
Tables
The ta-les define the resources that CICS controls. "or e:ampleE Terminal Control ta-le
'TCT( defines the terminals in the netor). "ile Control Ta-le descri-es the data files the
CICS application pro%rams access.
Ta-les also define the operatin% enironment. "or e:ampleE limits may -e defined for the
num-er of transactions CICS handles concurrently in System InitialiGation Ta-le 'SIT(.
The ta-les are -rou%ht into stora%e hen CICS is initialiGed. Aheneer an application
pro%ram re=uires access to a resourceE CICS chec)s the appropriate ta-le to %et theinformation necessary to process the re=uest.
There are si:teen ta-les used to descri-e the CIC enironment. $CTE $$TE SITE TCT are
re=uired. Others are optional.
1+
-
8/13/2019 CICS mainframe document
18/145
Customer Information Control System (CICS)
System Initiali8ation Table
The System InitialiGation ta-le 'SIT( contains parameters used -y the systeminitialiGation process. In particularE the SIT identifies '-y suffi: character( the ersion of
the CICS system control pro%rams and CICS ta-les that you hae specified and that areto -e loaded.
ro*ram Control Table
The pro%ram control ta-le '$CT( contains the control information to -e used -y CICS fir
identifyin% and initialiGin% a transaction. This ta-le is re=uired -y CICS to erify
incomin% re=uests to start transactions and to supply information a-out the transaction.
rocessin* ro*ram Table
The processin% pro%ram ta-le '$$T( defines the pro%rams and mapsets.
Terminal Control Table
The terminal control ta-le 'TCT( descri-es a confi%uration of terminalsElo%ical units and
other CICS systems.
ile Control Table
The file control ta-le '"CT( descri-es files that are processed -y file control mana%ement
module The CICS system definition 'CS( file is defined in the "CTE in addition to your
on files. The files defined in the "CT can -e >S/& or B/&.
Control 'loc6s
In e:ecutionE CICS is dynamic. To )eep trac) of hat is %oin% on in the system CICS
uses seeral different control -loc)s. &ost of these control -loc)s are dynamicallymana%ed. They are created hen needed and disposed of hen no lon%er needed.
$rimarily CICS mana%ement modules access the Control -loc)s. They proide arious)inds of information. "or e:ampleE a control -loc) called Tas) Control /rea 'TC/(
18
-
8/13/2019 CICS mainframe document
19/145
Customer Information Control System (CICS)
represents each transaction. Information a-out current tas) is stored in to control -loc)named :ecute Interface Bloc) 'IB(.
Chapter 3
Data Communication O+eration In CICS
Three methods are aaila-le to the CICS application pro%rammer for communicatin%
ith the terminals and lo%ical units in the su-systems of the netor) that forms part ofthe CICS system. The methods dealt ith are
Basic mappin% support 'B&S(
Terminal Control
Batch ata Interchan%e 'BI(
Basic mappin% support proides commands and options that can -e used to format data ina standard manner. B&S conerts data streams proided -y the application pro%ram toconform to the re=uirements of the deices. Conersely data receied from a deice in
conerted -y B&S to a standard form.
Terminal control is the -asic method for communicatin% ith deicesE hereas -oth
B&S and -atch data interchan%e e:tend the facilities of terminal control to simplify
further the handlin% of data streams. Both B&S and BI use terminal control facilitieshen ino)ed -y an application pro%ram.
Batch data interchan%e proides commands and options that may -e used possi-ly in
conDunction ith B&S commandsE to communicate ith -atch lo%ical units.
'asic /a++in* Su++ort ('/S)
Once a record re=uested -y the operator is retrieedE it has to -e formatted for display.
B&S remoes the responsi-ility of formattin% the screen from the application pro%ram.
B&S places the data ith necessary control characters in the TIO/. The control
characters are remoed -efore the messa%e is displayed on the screen.
It allos repositionin% of fields ithout modifyin% application pro%rams. B&S acts as aninterface -eteen the application pro%ram and Terminal Control $ro%ram.
B&S ma)es the application pro%ram "ormat Independent and eice Independent.
"ormat Independence
/pplication pro%rams are ritten ithout concern for physical position of data
fields ithin a display
1,
-
8/13/2019 CICS mainframe document
20/145
Customer Information Control System (CICS)
In an application pro%ram sym-olic la-els are used to refer the fields
B&S relates the la-el to the actual position in the display
eice Independence
/pplication pro%rams can -e deeloped ithout any concern for physicalcharacteristics of the terminals
B&S prepares the messa%e -ased on the terminal type -ein% used
'/S /a+s
/ Screen defined throu%h B&S is called a map. There are to types of maps a
physical mapE hich is primarily used -y CICSE and a sym-olic mapE hich is primarilyused -y the application pro%rams.
B&S map is nothin% -ut a pro%ram ritten in the /ssem-ler 4an%ua%e. HoeerE you do
not hae to pro%ram the B&S map as suchE -ecause a set of assem-ler macros 'B&Smacros( are proided -y CICS for the B&S map codin%.
Based on ho a map or a %roup of maps is lin)editedE there are to units of the mapmapE hich represents a B&S codin% for a screen panelE and mapsetE hich represents a
load module.
hysical /a+ an& Symbolic /a+
hysical /a+
The primary o-Dectie of the physical map is to ensure the deice independence in theapplication pro%rams. &ore concretelyE for input operationsE the physical map defines
ma:imal data len%th and startin% position of each field to -e read and allos B&S to
interpret an input data stream. "or output operationsE the physical map defines startin%
positionE len%thE field characteristics '/ttri-ute Bytes( and default data for each fieldE andallos B&S to add control characters and commands for output in order to construct an
output data stream.
hysical /a+ 9eneration
The physical map is a pro%ram in a form of load module. ThereforeE the physical map is codedusin% B&S macrosE assem-led separatelyE and lin)edited into the CICS load li-rary
B&S macro codin% /ssem-ly 4in)edit
4oad module 4O/4IB To -e used -y CICS
2
-
8/13/2019 CICS mainframe document
21/145
Customer Information Control System (CICS)
Symbolic /a+
The primary o-Dectie of the B&S sym-olic map is to ensure the deice and formatindependence to the application pro%rams. ThereforeE throu%h the sym-olic mapE a layout
chan%e in the formatted screen can -e done independent of the application pro%ramcodin% as lon% as the field name and len%th remain same.
It is used -y the application pro%ram hich issues a COBO4 CO$9 statement in order to
include a sym-olic map in the pro%ram.
Symbolic /a+ 9eneration
/ sym-olic map is a copy li-rary mem-erE hich is to -e included in the application
pro%ram for definin% the screen fields. ThereforeE the sym-olic map is coded usin% B&S
macrosE assem-led separatelyE catalo%ed into a copy li-rary 'CO$94IB(E and at the time
of application pro%ram compileE it ill -e copied into the application pro%ram.
B&S macro codin% /ssem-ly Sym-olic map definition
CO$94IB Copied 'Copy( into CICS application pro%ram
/a+ an& /a+set
/a+
/ representation of one screen format is called a map. One or %roup of maps ma)es up amapset.
/a+set
/ %roup of mapsE hich are lin)edited to%ether is called mapset. ach mapset must -e
re%istered in $$TE since CICS considers the B&S mapset as a pro%ram coded in/ssem-ler. The mapset name consists of to parts as follos
-
8/13/2019 CICS mainframe document
22/145
Customer Information Control System (CICS)
Com+onents Of Screen
CICS identifies screen into three components1. &apset2. &aps
a. $hysical &ap
-. Sym-olic &ap
3. "ields
a. ?nnamed '4iterals(
-. ;amed 'ata "ields(c. Stopper
The first step in desi%nin% screen layout is to diide the screen into functional areas such
as title areaE application data area and messa%e area. The title area of a screen shouldidentify the pro%ram that displayed data. The application data area comprises the main
portion of the screen. Three )inds of field are usually found in this area
1. *eyord7unnamed7literal K contains constant data sent -y pro%ram to identify thecontents of the data field.
2. ata field7named K contains data that the application pro%ram retriees from files
and displays. The data may appear e:actly as stored in a fileE or it may -e editedEor it may -e left -lan) for operator to enter data.
3. Stopper field K On data entry screen restricts the len%th of the data field. Stopper
field containin% no data is used to stop operator from enterin% too many
characters in a field.
ttribute 'yte ormat
The attri-ute character is alays the first character of a field. It occupies a character
position on the screen -ut appears as a -lan).
$rotection Intensity &T
ositions unctions 'it Settin*s
1 Information a-out -its2 thru +
23 $rotection ?nprotectedE /lphanumeric
1 ?nprotectedE ;umeric
1 $rotected
11 /utos)ip
!# Intensity ;ormal
1 ;ormal
22
1 2 3 ! # 6 +
-
8/13/2019 CICS mainframe document
23/145
Customer Information Control System (CICS)
1 Bri%ht
11 ;odisplay
6 &ust -e
+ &T "ield has not -een modified
1 "ield has -een modified
/ttri-utes -ytes can coney the folloin% field attri-utes.
"ield $rotection
?nprotected can enter any )ey-oard character into unprotected field.
$rotected ata cannot -e entered in a protected field. If the operator
attempts to enter dataE the )ey-oard is loc)ed.
/utos)ip /n autos)ip field is a protected field that automatically s)ipsthe cursor to the ne:t unprotected field.
"ield Intensity
;ormal a normal intensity field displays the data at the normal operatin%
intensity.
Bri%ht a -ri%ht intensity field displays the data at a -ri%hter than normalintensity. This is often used to hi%hli%ht )eyordsE errorsE or operator
messa%es.
;odisplay / nodisplay field does not display the data on the screen for
operator iein%. This mi%ht -e used to enter security data
Shift
/o&ifie& Data Ta*
In order to understand the concept of data transfer from a terminal to the application
pro%ramE it is important to )no the concept of &odified ata Ta% '&T(.
&T is one -it of the attri-ute character. If it is off '(E it indicates that this field has not
-een modified -y the terminal operator. If it is on '1(E it indicates that this field has -een
modified -y the operator. Only hen &T is onE ill the data of the field -e sent -y theterminal hardare to the host computer 'i.e.E to the application pro%ram(.
ffectie use of &T drastically reduces the amount of data traffic in the communication
lineE there-y improin% performance si%nificantly.
"olloin% are the three ays to set &T on
By dataentry
By settin% attri-ute -yte in the physical map
By moin% &T attri-ute in the application pro%ram.
23
-
8/13/2019 CICS mainframe document
24/145
Customer Information Control System (CICS)
/a+ Definition /acros
ailable /acros
/s a pro%ram must -e coded usin% a pro%rammin% lan%ua%eE a B&S map also must -e
coded. "or this purposeE B&S proides /ssem-ler macros as follos
"H&S To define a mapset.
"H&I To define a map
"H&" To define a field
9eneral ormat
The B&S map definition macros are purely /ssem-ler macros. ThereforeE the folloin%
codin% must -e maintained
Col!mn Col!mn Col!mn Col!mn Col!mn1 1" 1# 1$ $2
Symbolic name Opcoe Parameter%s& Cont. Char.
%separate by commas&
'itional parameters
(g.).1: Format o* BMS macros
:ample
M(+, -FMS- T/P(0S/SP'M3 4MO-(0I+O,T3 5'+60COBO53..
(g.).2: (7ample o* BMS macros
Or&er of /acros
2!
-
8/13/2019 CICS mainframe document
25/145
Customer Information Control System (CICS)
There is rule for the order of B&S macros hich must -e folloed. That isE ithin onemapset definitionE the map definition can -e specified as many times as you ish. Aithin
one map definitionE the field definition can -e specified as many times as you ish
2#
-
8/13/2019 CICS mainframe document
26/145
Customer Information Control System (CICS)
Print +ogen 88889 'ssembler Comman5abel -FMS- 88889 Mapset -e*inition
5abel -FM-I 88889 Map -e*inition
-FM-F 88889 Fiel -e*inition5abel -FM-F 88889 Fiel -e*inition
-FM-F-FM-I-FM-F
-FM-F-FMS- Type 0 Final 889 Mapset -e*inition
(n 88888888888888888889 'ssembler comman
(g.).): BMS Macro -e*inition
D/SD /acro
unction
The "H&S macro is used to define a mapset and its characteristics or to end a mapsetdefinition. Only one mapset definition is alloed ithin one assem-ly run.
ormat
5abel -FMS- T/P(0-(S(CT M'P S/SP'M FI+'5;3 MO-(0I+ O,T I+O,T&."2 (OF PICT,( 4.
"2 FI55( (-(FI+(S (OF. ") (O' PICT,( 4."2 (OI PIC 4%$$&.
"2 -,MM/5 COMP PIC SD%>&."2 -,MM/F PICT,( 4."2 FI55( (-(FI+(S -,MMF. ") -,MMI PICT,( 4."2 -,MMI PIC 4%1&.
"1 MOM'P1" (-(FI+(S MOM'P11"2 FI55( PIC 4%12&.
"2 FI55( PICT,( 4%)&. "2 'MO,+TO PIC 4%E& "2 FI55( PICT,( 4%)&. "2 /('SO PIC 4%2& "2 FI55( PICT,( 4%)& "2 'T(O PIC 4%>&. "2 FI55( PICT,( 4%)&.
"2 P'/M(+TO PIC ??3??D.DD. "2 FI55( PICT,( 4%)". "2 M(SS'6(O PIC 4%$D&. "2 FI55( PIC 4%)&. "2 (OO PIC 4%$$&. "2 FI55( PICT,( 4%)&. "2 -,MM/O PIC 4%"1&
(g.).$: (7ample O* Symbolic Map -e*inition
31
-
8/13/2019 CICS mainframe document
32/145
Customer Information Control System (CICS)
Chapter !
Characteristics Of CICS
/ultithrea&in*
&ultithreadin% is the system enironment here the tas)s are sharin% the same pro%ram
under the multitas)in% enironment. &ultithreadin% is a su-set of multitas)in%E since it
concerns tas)s hich use the same pro%ram.
?nder the multithreadin% enironmentE a pro%ram is shared -y seeral tas)s concurrently.
"or each tas)E the pro%ram must or) as if it ere e:ecutin% instructions e:clusiely for
each tas). ThereforeE it re=uires special considerations such as reentrancy.
Contrary to the multithreadin% enironmentE under the sin%le threadin% enironmentE a
pro%ram is used -y only one Do- 'or tas)( at a time. Sin%le threadin% is the e:ecution of apro%ram from -e%innin% to completion. $rocessin% of one transaction is completed -efore
another transaction is started. / typical e:ample is a -atch Do-.
/lthou%h multithreadin% is not a uni=ue concept to CICSE CICS mana%es multithreadin%
of CICS tas)s ithin its on re%ion. That isE CICS proides the multithreadin%
enironment here more than one CICS tas)E hich uses the same pro%ramE run
concurrently.
;uasi,
-
8/13/2019 CICS mainframe document
33/145
Customer Information Control System (CICS)
Fig.>.1: !asi8eentrant Program
"i%ure a-oe shos ho =uasireentrant pro%rams or) under CICSE HereE to users are
runnin% the same application pro%ramE $ro%ram /. They share the same stora%e for thepro%rams o-Dect code. i.e. the procedure diisionJ -ut each is %ien a separate or)in%
stora%e area. That ayE each can use or)in% stora%e in the normal fashion. Ahen you
rite a command leel CICS pro%ramsE you dont need to orry a-out a =uasireentrantECICS handles that for you automatically.
seu&o,Conersational ro*rammin*
/n interactie pro%ram that aits for data to -e input from the user on the terminal iscalled a Conersational pro%ram. On sin%le user system this is not a pro-lem. But ith
the multiuser system it is a pro-lem. .%. In a 3 users systemE hen one pro%ram is
acceptin% and processin% dataE the other 2, are aitin% ta)in% up space in main stora%e.Hence in multi user enironmentE conersational pro%rams can -e tremendously
inefficient.
The solution in $seudoconersational pro%rammin% i.e. to return the control to CICS
hen the pro%ram is aitin% for any i7o. /s a result the pro%ram remains in stora%e only
hen it is processin% data.
33
>irtualStora%e
$ro%ram /O-Dect code
$ro%ram /
Aor)in%Stora%e'?ser1(
$ro%ram /Aor)in%Stora%e
'?ser2(
?ser1
runnin%pro%ram /
?ser2
runnin%pro%ram /
-
8/13/2019 CICS mainframe document
34/145
Customer Information Control System (CICS)
o= a seu&o,Conersational ro*ram >or6s?
/s the operator )eys in dataE its displayed on the screen. Thats a function of theterminalE and not of the pro%ram. /fter the operator has filled in all of the re=uired dataE
the pro%ram needs to -e reloaded to process it. But ho does CICS )no hen to restarta pseudoconersational pro%ramN
BasicallyE an operator si%nals CICS to restart a pseudoconersational pro%ram -ypressin% one of the terminals /I )eys. '/I )eys are the enter )eyE the clear )eyE the
$" )eys and the $/ )eys(. Of courseE most operators dont thin) in terms of restartin%
their pro%ram hen they press an /I )eys. ?suallyE an operator Dust )nos that hepresses specific /I )ey to %et his pro%ram to do specific thin%s. On the other handE as a
CICS pro%rammerE you do need to thin) of an /I )ey as causin% a pro%ram to -e loaded
and e:ecuted.
/ CICS pro%ram retriees the data the operator entered -y issuin% a CICS command
CI> &/$. Command simply transfers data from the screen to th sym-olic map in
a pro%ram.
/fter the pro%ram retriees the data the operator enteredE it processes it. ;e:tE the
pro%ram issues a CICS S; &/$ command to display the results. /fter the pro%ramissues a S; &/$ commandE it issues a T?; command. The T?; command
ends the pro%ram Dust as a STO$ ?; does in a -atch COBO4 pro%ram. In additionE the
T?; command specifies hat transid CICS should ino)e the ne:t time the
operator presses an /I )ey.
Suppose the operator presses the C4/ )ey to end the terminal session. Since the
C4/ )ey is an /I )eyE CICS restarts the pro%ram automatically. Ahen pro%ram seesthat the operator pressed the C4/ )ey rather than the ;T )eyE it sends the
messa%e to the terminal. Then it issues a T?; command ithout a transid. That
ends the pseudoconersational cycle.
Transaction Drien
/ transaction is a lo%ical unit of or) that a terminal user can ino)e. CICS is called to -etransaction drienE -ecause eery transaction or pro%ram can -e ino)ed ith the help of a
transactionid. In shortE transactionid and the pro%ram to hich transactionid is related are
predefined in the $CT ta-le. ach transid is a uni=ue four character code. $ro%ramname is thepro%ramid as defined in COBO4 pro%ram.
Ahen the user enters the transid on the terminal and presses the enter '/I( )eyE CICS
locates the transid in $CT and refers to $$T. 4oads the pro%ram into stora%e and a
3!
-
8/13/2019 CICS mainframe document
35/145
Customer Information Control System (CICS)
T/S* is initiated i.e. CICS passes control to the application pro%ram. ery tas) isassi%ned a uni=ue tas)no -y CICS.
The initiated tas) continues till it encounters any i7o and passes control to CICS.
Tas) can also -e initiated -y CICSE -y proidin% the transid hile returnin% control to
CICS. Ahen the user presses an /I )eyE CICS initiates the tas) a%ain related to thetransid returned. This time the tas) %ets a different tas) no. So one application is diided
into many tas)s durin% the process of e:ecution.
3#
-
8/13/2019 CICS mainframe document
36/145
Customer Information Control System (CICS)
Chapter #
Comman& eel ro*rammin*
CICS ro*ram Deelo+ment
/pplication pro%rammin% in CICS can -e done ith many host lan%ua%es that IB&
supportsE li)e COBO4E $471E /ssem-ler etc. The codin% can -e done either ith &acro
leel or usin% CICS Command leel li-rary.
/acro eel ro*rammin*
&acro 4eel $ro%rammin% inoles callin% macros in the host lan%ua%e usin% the pro%ram areasfor accessin% CICS resources. This style of pro%rammin% is cryptic and comple: as the
pro%rammer is re=uired to remem-er all the macros and their parameters.
Coman& eel ro*rammin*
Command 4eel $ro%rammin% is a hi%hleel lan%ua%e hich proides set of CICScommands for accessin% the resources. $ro%rammin% in this style is comparatiely easier.
Command leel $reprocessor translates the CICS commands into e=uialent macro calls
CICS Comman& ormat @ ++lication Deelo+ment =ithCO'O
CICS commands are em-edded into the Host lan%ua%eE e.%. in the $rocedureiision of COBO4 pro%ram.
CICS commands in a COBO4 pro%ram are delimited -y
@C CICS..; @C
@C CICS is coded in mar%in B of COBO4 pro%ram.
The command leel translator replaces these statements -y COBO4 &O>statements folloed -y COBO4 C/44 statement.
The translated module is complied 5 lin)ed to produce an e:ecuta-le load
module
The Translator also includes copy -oo)s into the pro%ram.
36
-
8/13/2019 CICS mainframe document
37/145
Customer Information Control System (CICS)
CICS Command format
@C CICS "unction
Poption 'ar%ument(
option 'ar%ument(
Q;@C.
"unction descri-es the operation re=uired e.%. S;7CI>
etc.
Option descri-es any of the many optional facilities aaila-le
ith each function.
Options can -e coded in any order -ut prefera-ly one option per
line. Options may -e folloed -y an ar%ument in parentheses. /r%ument is a alueE can -e a dataname or literal.
Comman& an*ua*e Translator
COBO5 So!rce Program
Translator Translate So!rce 5isting -iagnostics
Translate So!rce Program
COBO5 Compiler So!rce 5isting -iagnostics
Compiler
ObGect Mo!le 5inH (it 5oa Mo!le
3+
-
8/13/2019 CICS mainframe document
38/145
Customer Information Control System (CICS)
[email protected]: Comman 5eel Translator
Separate translators are aaila-le for /ssem-lyE COBO4 and $471 lan%ua%es ith
em-edded CICS.
The translator is e:ecuted in a separate Do- step.
The Do- step se=uence is
Translate Compile 'or assem-le( 4in) edit
ach translator is host lan%ua%e oriented and accepts the source pro%ram as input
from S9SI;.
The translator rites the source listin% and error messa%es to S9S$I;T.
The translated source pro%ram is accepted as input -y the COBO4 compiler and
lin) edited to %enerate a load module.
The translator modifies the lin)a%e section -y insertin% the IB structure as the
first parameter and inserts declaration of the temporary aria-les that it re=uiresinto or)in% stora%e section.
"or COBO4 application pro%ramE each command is replaced -y one or more
COBO4 moe statements folloed -y a COBO4 C/44 statement.
&O> statement assi%n constants to COBO4 data aria-les.
The constants are coded as ar%uments to options in the commands.
eclarations for aria-les in or)in% stora%e section is coded as copy file name"HI>/.
CO'O4CICS ro*ram Structure
IDENTIFICATION DIVISION.PO6'M8I-.ENVIRONMENT DIVISION.DATA DIVISION.WORKING-STORAGE SECTION.Variable eclarationFile layo!tSymbolic mapCopy booHs-F(IV'LINKAGE SECTION.
-FCOMM'('(IBB5OC=B55 C(5SSPROCEDURE DIVISION.
The folloin% COBO4 statements are prohi-ited in a CICS application pro%ram
38
-
8/13/2019 CICS mainframe document
39/145
Customer Information Control System (CICS)
/CC$TE C?;T/TE /TE /9E IS$4/9E @HIBITE STO$ ?;ET/C
/ny I7O statements 'O$;E C4OSE /E AITE AITE 4TE
ST/T(
$OT AIT feature
SOT feature
The e=uialent statements 'e:cept eport Ariter and Sort( are prepared in the form of
CICS commands.
The CICS application pro%ram must end ith the CICS T?; command and7or
-
8/13/2019 CICS mainframe document
40/145
Customer Information Control System (CICS)
:sin* CO//ISIO;
I;TI"IC/TIO; I>ISIO;.;>IO;&;T I>ISIO;.
/T/ I>ISIO;.
AO*I;
-
8/13/2019 CICS mainframe document
41/145
Customer Information Control System (CICS)
Chapter 6
CICS COA 'OO7S
Bec Interface 'loc6 (I') In in6a*e Section
*eeps record of system related information. "or e:ample tas) num-erE terminal
idE dateE time etc.
One IB is created per tas).
IB for a tas) contains information a-out the tas)E hich is initiated.
Copy of "HIB4* as IB is automatically included in lin)a%e section ofapplication pro%ram durin% translation.
$ro%ram can only access data usin% IB field names.
?ser should not update data in IB fields.
Some of the IB fields are
IB/I
Contains the attention identifier '/I( associated ith the last input
operation.
IBC/4;
Contains the len%th of the communication area passed to the applicationpro%ram.
IBC$OS;
Contains the cursor address 'position( associated ith B&S
IB/T
Contains the date the tas) is started. "ormat 99 pic s,'+( comp3
IBTI&
Contains the time at hich the tas) is started. "ormat HH&&SS pic s,'+(comp3
IBS Contains the sym-olic identifier of the dataset referred to in a file control
re=uest
IBCO
Contains the CICS response code returned after the function re=uested -y
the tas) has -een completed
!1
-
8/13/2019 CICS mainframe document
42/145
Customer Information Control System (CICS)
IB0I
Contains the re=uest identifier assi%ned to an interal control command -y
CICS
IBS$ Contains a -inary num-er correspondin% to the condition that has -een
raised. "or e:ample 11TI713;OT";71#?$*9
IBT&I
Contains the sym-olic terminal identifier associated ith the tas).
IBT;I
Contains the sym-olic transaction identifier of the tas).
IBT/S*;
Contains the tas) num-er assi%ned to the tas) -y CICS
Stan&ar& ttribute 'yte ist
D'/SC
Co!s"!s Me"!i!#
-FBMP(M Printer en8o*8message-FBMP+5 Printer neJ line-FBM'S= '!to8SHip-FBM,+P ,nprotecte-FBM,++ ,nprotecte n!m-FBMPO Protecte-FBMP/ Bright-FBM-' -arH-FBMFS( M-T set-FBMPF Protecte an M-T set-FBM'SF '!to8SHip M-T set-FBM'SB '!to8SHip bright 888888888 888888888
(g.#.1: -FMSC' Constants
!2
-
8/13/2019 CICS mainframe document
43/145
Customer Information Control System (CICS)
Installation Define&
"1 Fiel8'ttrib!te8efinition.
# "/C?;$OT $IC @ >/4? R R. # "/C?;$OT&T $IC @ >/4? R/R.
# "/C?;$OTBT $IC @ >/4? RHR.
# "/C?;$OTBT&T $IC @ >/4? RIR. # "/C?;$OT/* $IC @ >/4? RR.
# "/C?;$OT/*&T $IC @ >/4? R'R.
# "/C?;$OT;?& $IC @ >/4? R5R.
# "/C?;$OT;?&&T $IC @ >/4? RFR.
# "/C?;$OT;?&BT $IC @ >/4? R0R.
# "/C?;$OT;?&BT&T $IC @ >/4? RR.
# "/C?;$OT;?&/* $IC @ >/4? RR.
# "/C?;$OT;?&/*&T $IC @ >/4? R(R. # "/C$OT $IC @ >/4? RR.
# "/C$OT&T $IC @ >/4? R7R.
# "/C$OTBT $IC @ >/4? R9R.
# "/C$OTBT&T $IC @ >/4? RMR.
# "/C$OT/* $IC @ >/4? RUR.
# "/C$OT/*&T $IC @ >/4? RVR.
# "/C$OTS*I$ $IC @ >/4? RR.
# "/C$OTS*I$&T $IC @ >/4? R#R.
# "/C$OTS*I$BT $IC @ >/4? R8R.
# "/C$OTS*I$BT&T $IC @ >/4? R,R. # "/C$OTS*I$/* $IC @ >/4? RWR.
# "/C$OTS*I$/*&T $IC @ >/4? 0?OT.
(g.#.2: Installation -e*ine 'ttrib!te Constants
Installation Define& /essa*e ile
"1 KS8M(SS'6(S. "@ KS8F'T'58(O8MS6 PIC 4%)"& V'5,( L/O, C'+ O+5/ ST'T FOM M+M,L. "@ KS8+OM'58(4IT8MS6 PIC 4%)"& V'5,( LS(SSIO+ (+-S 'V( ' +IC( -'/L. "@ KS8I+V'5I-8=(/8MS6 PIC 4%)"& V'5,( LI+V'5I- 'I- =(/ P(SS(-L. "@ KS8+OT8,+I,(8MS6 PIC 4%)"& V'5,( LISS,( +OT( +O (4ISTI+6L. "@ KS8IT(M8+OT8F+-8MS6 PIC 4%)"& V'5,( LIT(M +OT FO,+-L. "@ KS8I+V'5I-8T/8MS6 PIC 4%)"& V'5,( LI+V'5I- ,'+TIT/ (+T((-L. "@ KS8-,P8(C8MS6 PIC 4%)"& V'5,( L-,P5IC'T( (CO-L.
"@ KS86(+('58(8MS6 PIC 4%)"& V'5,( L(O I+ I65I6T(- FI(5-SL. "@ KS8S,CC(SS8MS6 PIC 4%)"& V'5,( L(CO- S,CC(SSF,55/ '--(-L. "@ KS8T'+8C'+C(58MS6 PIC 4%)"& V'5,( LT'+S'CTIO+ C'+C(55(-L. "@ KS8I+V'5I-8-'T(8MS6 PIC 4%)"& V'5,( LI+V'5I- -'T(L. "@ KS8(CO-8(8MS6 PIC 4%)"& V'5,( L(O : (CO- +OT FO,+-L. "@ KS8+OT8STOC=8MS6 PIC 4%)"& V'5,( LIT(M +OT I+ STOC=L.
(g.#.): Installation -e*ine Message File
!3
-
8/13/2019 CICS mainframe document
44/145
Customer Information Control System (CICS)
ttention I&entifier (ID)
/ttention Identifier '/I( indicates hich method the terminal operator has used toinitiate the transfer of information from the terminal deice to CICS. /I )eys are $")eysE $/ )eysE ;T )eyE and C4/ )ey.
The IB/I field in IB contains the /I code of the most recently used /I.
ThereforeE the IB/I field can -e tested after each Terminal Control 'or B&S( inputoperation
CICS proides the standard /I list in a form of copy li-rary mem-er '"H/I(E so thata pro%ram can use this list -y specifyin% in the pro%ram
COP/ -F'I-
The "H/I mem-er contains such /I codes as
"H;T ;T )ey"HC4/ C4/ )ey
"H$/13 $/1 to $/3 )eys
"H$"12! $"1 to $"2! )eys
The folloin% is an e:ample of usin% /I information in a pro%ram
IF (IB'I- 0 -FPF) P(FOM 21""8(+-8O,TI+((5S( IF (IB'I- 0 -FP'1
P(FOM 22""8C'+C(58O,TI+( (5S( IF (IB'I- 0 -F(+T( P(FOM 2)""8+OM'58O,TI+(
(5S( P(FOM 2>""8KO+68O,TI+(.
(g.#.>: ,sing 'I- In*ormation In 'pplication Program
!!
-
8/13/2019 CICS mainframe document
45/145
Customer Information Control System (CICS)
Chapter +
++lication ro*ram ouse6ee+in*
Bce+tional Con&itions
/n a-normal situation durin% e:ecution of a CICS command is called an e:ceptionalcondition. Chec)in% e:ceptional conditions is similar to chec)in% return codes after
e:ecutin% COBO4 input7output statements in nonCICS pro%rams. It is stron%ly
recommended to chec) e:ceptional conditions for eery CICS commands. ach CICScommand has its on set of possi-le e:ceptional conditions
Comman& Co&e an&
-
8/13/2019 CICS mainframe document
46/145
Customer Information Control System (CICS)
D CODITIO Comman&
unction
The H/;4 CO;ITIO; command is used to transfer control to the procedure la-elspecified if the e:ceptional condition specified occurs. Once a H/;4 CO;ITIO;
command re=uest has -een madeE it remains actie until the end of the pro%ram or
another H/;4 CO;ITIO; re=uest oerrides it. In order to aoid the confusion oerhich H/;4 CO;ITIO; re=uest is actieE it is stron%ly recommended that a
H/;4 CO;ITIO; re=uest alays -e paired ith a CICS command
The H/;4 CO;ITIO; re=uest is effectie only ithin the pro%ramE hich issuesthe H/;4 CO;ITIO; command. That isE if the control is passed to another
pro%ramE the H/;4 CO;ITIO; re=uest in the callin% pro%ram ill no lon%er -ehonored in the called pro%ram.
ormat
The format of the H/;4 CO;ITIO; command is as follos
(4(C CICS '+-5( CO+-ITIO+ conition%label& ; conition%label&< ;(O%label& command.
;OH/;4 also suspends e:ecution till the specified resources -ecomeaaila-le 'e.%. TS07T0 etc.(.
D ID Comman&
unction
The H/;4 /I command is used to specify the la-el 'i.e.E para%raph name( to hichcontrol is to -e passed hen the specified /I is receied. /fter the completion of anyterminal input commands such as CI> commandE control ill -e passed to the
specified para%raph in the pro%ram. This is one ay of su-stitutin% the IB/I chec)in%
approach. /I )eys are $/ )eysE $" )eysE ;T and C4/ )ey. C4/ and any of
the $/ )eys do not transmit data.
ormat
(4(C CICS '+-5( 'I-Option%label&
(+-8(4(C.
(g.$.$: Format O* '+-5( 'I- Comman
Ahere la-el is the para%raph name of the pro%ram to hich control is to -epassed.
?se of /I )ey is detected -y CI> &/$ command.
!,
-
8/13/2019 CICS mainframe document
50/145
Customer Information Control System (CICS)
H/;4 /I has hi%her precedence than H/;4 CO;ITIO;.
?p to 16 options can to can -e coded in one H/;4 /I
Commonly use& O+tions
/ny )ey name '$/1 to $/3E $"1 to $"2!E ;TE C4/(
/;9*9 '/ny of the a-oe e:cept ;T )ey(
#
-
8/13/2019 CICS mainframe document
51/145
Customer Information Control System (CICS)
Bam+le
(4(C CICS '+-5( 'I-PF)%21""8(+-8O,TI+(&P'1%21""8C'+C(58O,TI+(&
(+T(%21""8+OM'58O,TI+(&'+/=(/%21""8KO+68=(/8O,TI+(&
(+-8(4(C.
(4(C CICS (C(IV( M'P%M'P1&M'PS(T%M'P1&I+TO %M'P1I&5(+6T%KS8M'P85(+6T&
(+-8(4(C.
(g.$.E: (7ample O* '+-5( 'I- Comman
Bam+le'Shoin% disadanta%e of usin% H/;4 /I command(
21""8(C(IV(8M'P S(CTIO+.(4(C CICS '+-5( CO+-ITIO+
M'PF'I5%21""8M'PF'I58O,TI+(&(+-8(4(C.
(4(C CICS '+-5( 'I-PF)%21""8(+-8O,TI+(&P'1%21""8C'+C(58O,TI+(&(+T(%21""8+OM'58O,TI+(&
'+/=(/%21""8KO+68=(/8O,TI+(&
(+-8(4(C.
(4(C CICS (C(IV( M'P%M'P1&M'PS(T%M'P1&I+TO %M'P1I&5(+6T%KS8M'P85(+6T&
(+-8(4(C.
21""8M'PF'I58O,TI+(.888888888
21""8+OM'58O,TI+(.888888888
....21"""8(4IT.
(4IT.
(g.$.D: -isaantage O* '+-5( 'I- Comman
#1
-
8/13/2019 CICS mainframe document
52/145
Customer Information Control System (CICS)
I'ID
The 32+ terminal transmits the /I character to the IB/I field of IBE at the
time of tas) initiation. IB/I can -e used to find hich /I *ey has -een pressed -y user
CICS copy -oo) "H/I fields are used to identify the )ey pressed
I" IB/I L "H/I';T(
O
I" IB/I L "H;T
IB/I alue can -e chec)ed een ithout receiin% map.
#2
-
8/13/2019 CICS mainframe document
53/145
Customer Information Control System (CICS)
Chapter 8
'/S ro*rammin* Consi&erations
Dynamic ttribute Character ssi*nment
CICS proides the standard attri-ute character list '"HB&SC/( in the form of a
CO$94IB mem-er. This list coers most of the re=uired attri-ute characters for an
application pro%ram. 9ou can use this list -y copyin% into the Aor)in% Stora%e Sectionof the application pro%ram throu%h the CO$9 statement as follos
COP/ -FBMSC'.
"olloin% are some useful standard attri-ute characters in "HB&SC/
"HB&/S* /utos)ip"HB&"S ?nprotectedE &T on
"H?;;?& ?nprotectedE &T onE numeric
"H?;I& ?nprotectedE hi%h intensityE &T on
"H?;I;T ?nprotectedE hi%h intensityE &T onE numeric
9ou can assi%n a default attri-ute character in a B&S map. ButE in the cases li)e an edit
error in a fieldE you mi%ht ish to hi%hli%ht the field indicatin% an error in a field. This
can -e accomplished -y dynamically assi%nin% a ne attri-ute character for the field onsu-Dect.
"or the dynamic attri-ute character assi%nmentE you place the predefined attri-ute
character to the fieldnameX/ of the field to hich you ish to dynamically assi%n the
attri-ute character.
The attri-ute character to -e dynamically assi%ned must -e chosen ery carefully -ased
on the re=uirement and the characteristics of the field 'e.%.E alphanumeric or numeric(.
Ahen the map is sent throu%h S; &/$ commandE the ne attri-ute ill -e in effect
on the field on su-DectE oerridin% the ori%inal attri-ute defined at the map definitiontime.
#3
-
8/13/2019 CICS mainframe document
54/145
Customer Information Control System (CICS)
Bam+le
KO=I+68STO'6( S(CTIO+.8888888
COP/ LM'PS(T'L. 8888888COP/ L-FBMSC'L. 8888888POC(-,( -IVISIO+. 8888888
MOV( -FBMB/ TO C,ST+O8'. MOV( -F-MPO TO C,ST+'M(8'. MOV( -F-MPO TO 'MO,+T8'.
(4(C CICS S(+- M'P %LM'P+'M(L&
M'PS(T%LM'PS(T'L& (+-8(4(C.
(.g. E.1: -ynamically attrib!te al!e assignment
Cursor ositionin* Techni-ues
$lacin% a cursor in a particular position of a screen is sometimes ery useful in order to
ma)e the system userfriendlier. There are three approaches to cursor positionin%.
Static Cursor ositionin*
In this approachE you define a cursor position in a map -y placin% YIC in the /TTB
parameter of the "H&" macro for a particular field. Ahen the map is sentE the cursor
ill appear in this field. If there ere more than one field '"H&" macro( ith ICspecified in one map '"H&I macro(E the last IC ould -e honored. The folloin% is
an e:ample of the static cursor positionin%
-FM-F POS0%)31#&3'TTB0%,+POT3 FS(T3 IC&5(+6T0E
(.g. E.2: Static C!rsor Positioning
Dynamic4Symbolic Cursor ositionin*
In this approachE you dynamically position a cursor throu%h an application pro%ram usin%
a sym-olic name of the sym-olic map -y placin% K1 into the field len%th field 'i.e.E
fieldnameX4( of the field here you ish to place the cursor. The S; &/$ command
#!
-
8/13/2019 CICS mainframe document
55/145
Customer Information Control System (CICS)
to -e issued must hae the C?SO option 'ithout alue(. /lsoE the mapset must -ecoded ith &OLI;O?T in the "H&S macro.
ThenE at the completion of the S; &/$ commandE the map ill -e displayed ith the
cursor at the position dynamically specified in the application pro%ramE irrespectie ofthe static cursor position defined in the map definition time. The folloin% is an e:ample
of dynamic7sym-olic cursor positionin%
MOV( N1 TO COIC(5.(4(C CICS S(+- M'P%M'P1&
M'PS(T%M'P1&C,SO('S(
(+-8(4(C.
(.g. E.): Symbolic C!rsor Positioning
Dynamic4
-
8/13/2019 CICS mainframe document
56/145
Customer Information Control System (CICS)
Chapter ,
Terminal Control O+erations
Intro&uction
This chapter ill discuss ho B&S maps are used in the application pro%ram for the
actual terminal input7output operationsE hich are performed -y a set of CICS commandsfor B&S.
unctions
The CICS commands for B&S perform the folloin% three -asic functions
1. Map Sending Function?sin% the data in the sym-olic mapE B&S prepares the output ;atie &ode ata
Stream ';&S( the correspondin% physical mapE and sends to the terminal as
illustrated in fi%ure ,.1.2. Map Receiving Function
?sin% the input ;&S from the terminalE B&S prepares data in the sym-olic
map throu%h the correspondin% physical map as illustrated in fi%ure ,.1.3. Text Handling Function
B&S prepares te:t ithout usin% a map and sends to the terminal.
'pplication Program Symbolic Map BMS O!tp!t +M-S Terminal%S(+- M'P&
Physical Map -ata (ntry
'pplication Program Symbolic Map BMS Inp!t +M-S Terminal%(C(IV( M'P&
Fig.D.1: Concept o* BMS operations
The folloin% commands are aaila-le for the -asic B&S input7output operations
CI> &/$ "ormatted data transfer. To receie a map
S; &/$ "ormatted data transfer. To send a map
CI> ?nformatted data transfer. To receie a te:t
S; T@T ?nformatted data transfer. To send a te:t
#6
-
8/13/2019 CICS mainframe document
57/145
Customer Information Control System (CICS)
&/$ command is used to receie a map from a terminal. /t thecompletion of the commandE the sym-olic map of the specified map ill contain the alid
data from the terminal in the folloin% 3 fields per each field defined -y the "H&"
macro
"ieldnameX4 The len%th fieldE hich contains actual num-er of characters typed
in the screen
"ieldnameX" The fla% -yte fieldE hich is normally @. It ill -e @8 if thescreen field has -een modified -ut cleared.
"ieldnameXI The actual input data field.
ormat
(4(C CICS (C(IV( M'P %map name& M'PS(T%map name& I+TO%ata8area&
(+-8(4(C.
(.g. D.2: Format O* (C(IV( M'P Comman
&/$ defines the name of the mapE hich as defined in the correspondin% "H&I
macro. &/$ST defines the name of the mapset hich as defined in thecorrespondin% "H&S macro. If nothin% else is specifiedE the I;TO option isassumedE and B&S automatically finds the sym-olic map area to place the data from the
terminal.
This command hen e:ecuted ill place all modified data items in the sym-olic or)
area.
Common Bce+tional Con&ition
&/$"/I4
This occurs
If the data to -e mapped has the len%th of Gero.
If user presses the ;T 'or any /I )ey( ithout typin% data if no "ST isspecified in "H&" macros.
If map is receied -y pressin% C4/ or any of the $/ )eys.
#+
-
8/13/2019 CICS mainframe document
58/145
Customer Information Control System (CICS)
Data Vali&ity Chec6in*
/fter the completion of the CI> &/$ commandE the data from the terminal are
placed in the fields of the sym-olic map. Hoeer you cannot assume that all data in thesym-olic map are alidE since B&S has nothin% to do ith the =uality of data contents inthe fields hich ere entered -y the terminal user. ThereforeE you must alidate the data
in each field -efore you use it.
One of the online systems adanta%es is its capa-ility of realtime 'i.e.E instant( dataalidation and feed-ac) to the user. ThereforeE you should perform data alidity chec)in%
as thorou%hly as possi-le ri%ht after the CI> &/$ command.
roce&ures
The folloin% is a set of procedures for the effectie data alidity chec)in% after thecompletion of the CI> &/$ command
1. $erform the data alidity chec)in% in detail as soon as the pro%ram receies data
from the terminal.2. Chec) the fieldnameX4
a. If it is GeroE the user has entered no data. ThereforeE ta)e the default actionE
or consider an error if it is the re=uired field.-. If it is a positie alueE some data of that len%th has -een entered.
Therefore alidate the field data in the fieldnameXI.
3. /lternatielyE chec) directly the fieldnameXI
a. If it is 4OA>/4?S or S$/CE no data has -een entered or space )eyhas -een pressed. ThereforeE ta)e the default actionE or consider an error if
it is the re=uired field.-. If it is not 4OA>/4? or spaceE some data has -een entered. TherforeE
alidate the field data in the fieldnameXI.
c. ;ote that CICS considers spaces as data. ThereforeE space may -e alid
dataE dependin% on the application specifications.!. If an error is detectedE prepare an error messa%e. "or thisE each map should hae
the error messa%e fields.
#. o not stop alidity chec)in% at the first error detection.
-
8/13/2019 CICS mainframe document
59/145
Customer Information Control System (CICS)
SD / Comman& ( ormatte& Data Transfer)
unction
The S; &/$ command is used to send a map to a terminal. Before issuin% thiscommandE the application pro%ram must prepare the data in the sym-olic map of the map
to -e sentE hich has the folloin% three fields per each field defined -y the "H&"
macro
fieldnameX4 The len%th fieldE to hich the application pro%ram does not hae to
prepare the data e:cept for the dynamic cursor positionin%.
fieldnameX/ The attri-ute character filedE to hich the application pro%ram does not
hae to prepare the data e:cept for the dynamic attri-ute character
assi%nement.
fieldnameXO The actual output data fieldE to hich the application pro%ram must place
the data.
ormat
(4(C CICS S(+-M'P%M'P8+'M(&M'PS(T%M'PS(T8+'M(&;FOM%-'T'8'('&: (7ample O* S(+- Comman
61
-
8/13/2019 CICS mainframe document
62/145
Customer Information Control System (CICS)
&. "2 FI55( PIC 4%1&. "2 M(SS'6( PIC 4%@&. 8888
POC(-,( -IVISIO+. MOV( 1" TO MS685(+6T (4(C CICS '+-5( CO+-ITIO+ 5(+6( %5(+6T8(O8T& (+-8(4(C 88888
(4(C CICS (C(IV( I+TO %I+P,T8MS6& 5(+6T %MS685(+6T& (+-8(4(C 8888
5(+6T8(O8T. 88888
(g.D.#: (7ample O* (C(IV( Comman
62
-
8/13/2019 CICS mainframe document
63/145
Customer Information Control System (CICS)
63
-
8/13/2019 CICS mainframe document
64/145
Customer Information Control System (CICS)
SD TET Comman& ( :nformatte& Data Transfer)
unction
The command is used to send unformatted messa%e 'i.e.E data ithout any maps(.This messa%e ill alays %et displayed at ro 1E column 1 position on the screen.
ormat
(4(C CICS S(+- T(4T FOM%ata8area&
5(+6T%ata8al!e&;('S("""8P6M8+OT8F+-&(O%>"""86(+('58(O&
(+-8(4(C.
(4(C CICS 5I+=PO6'M%FI5(8M'I+T&COMM'('%KS8COMM8'('&5(+6T%2"&
(+-8(4(C.
Coe in Prorgram FI5(8M'I+T(4(C CICS (T,+ TaHes control bacH in Men! program(+-8(4(C.
(.g.11.> 5I+= (7ample
Bam+le Of ECT
Coe in ProgramMen!(4(C CICS '+-5( CO+-ITIO+
P6MI-(%>"""8P6M8+OT8F+-&(O%>"""86(+('58(O&
(+-8(4(C.(4(C CICS 4CT5
PO6'M%FI5(8M'I+T&COMM'('%KS8COMM8'('&5(+6T%2"&
(+-8(4(C.
Coe in Prorgram FI5(8M'I+T(4(C CICS (T,+ TaHes control bacH to CICS(+-8(4(C.
(.g.11.@: 4CT5 (7ample
+
-
8/13/2019 CICS mainframe document
71/145
Customer Information Control System (CICS)
Common Bce+tional Con&itions
The folloin% are the e:ceptional conditions common to -oth 4I;* and @CT4
command
;OT/?TH / resource security chec) has failed.
$
-
8/13/2019 CICS mainframe document
72/145
Customer Information Control System (CICS)
Chapter 12
ile Control O+erations (S/& dataset folloin% commands are aaila-le
/ To read a record directly
AIT To nely rite a recordAIT To update an e:istin% record
4T To delete a record
?;4OC* To release e:clusie control ac=uired for update.
S+ecial Serices Of ile Control
Data In&e+en&ence
ata independence is a concept of a pro%ram -ein% independent of the structure ofdata-ase or the data access methods. The CICS file Control proides data independence
to application pro%ramE so that the application pro%rammer does not hae to -e concernith such datadependent COBO4 parameters or FC4 as
I;$?TO?T$?T SCTIO;
S4CT Statement
" Statement
O$;7C4OS
FC4
+2
-
8/13/2019 CICS mainframe document
73/145
Customer Information Control System (CICS)
The system pro%rammer 'or application pro%rammer( defines the "ile Control Ta-le
'"CT( to specify the characteristics of files to -e used under CICSE hile application
pro%rammer codes application pro%ram usin% CICS commands. In this ayE it is almost
transparent to the application pro%rammer hich data access method is -ein% used.
Bclusie Control Durin* :+&ates
If a tas) is updatin% a recordE the other tas)s must -e e:cluded from updatin% the recordJ
otherise data content ill -e updated incorrectly. This control is called e:clusie
control oer the resources durin% updates. This is important -ecause in the CICSenironmentE many tas)s mi%ht -e concurrently accessin% the same file 'possi-ly the
same record(. CICS loc)s the entire control interal here that record under su-Dect is
residin%.
ile O+en4Close
Ahen an application pro%ram accesses a fileE the file must -e open under CICS. "or thisE
"CT defines an initial file open7close status. If the file is closedE you must open the file
usin% the &aster Terminal transaction 'C&T( -efore you initiate an applicationpro%ram hich uses this file.
-
8/13/2019 CICS mainframe document
74/145
Customer Information Control System (CICS)
/T/ST names the fileE hich you ish to read. The file name specified must -edefined in "CT. I;TO names the field in the Aor)in% Stora%e Section to hich the
record content is to -e placed. I"4 is used to specify the )ey fieldE hich identifies
the record to -e read. 4;
-
8/13/2019 CICS mainframe document
75/145
-
8/13/2019 CICS mainframe document
76/145
Customer Information Control System (CICS)
(+-8(4(C.
(.g. 12.): (7ample O* ('- Jith generic =ey Comman
+6
-
8/13/2019 CICS mainframe document
77/145
Customer Information Control System (CICS)
Becution
-
8/13/2019 CICS mainframe document
78/145
Customer Information Control System (CICS)
Bam+le
MOV( )@ TO K=85(+.
MOV( +/"") TO (C8=(/. 0m!st be a *!ll Hey(4(C CICS ('-
-'T'S(T%FI5(2&I+TO%FI5(8IO'('&I-F5-%(C8'8=(/&6T(5(+6T%K=85(+&
(+-8(4(C.
(.g. 12.>: (7ample O* ('- Jith 6T( option Comman
-
8/13/2019 CICS mainframe document
79/145
Customer Information Control System (CICS)
Becution 0
The AIT command is issued ithout a prior / command ith the ?$/T
option.
:OC7 Comman&
unction
The / command ith the ?$/T option normally maintains e:clusie control
oer the record read until
The record is updated -y the AIT command.
The transaction is normally or a-normally completed.
HoeerE there are occasions hen after readin% a record throu%h the / command
ith the ?$/T option. It is found that the update is no lon%er re=uired or if the
AIT command itself fails the e:ecution. In this caseE the application pro%ramshould release e:clusie control from the recordE so that other tas)s can access the same
record. "or this purposeE the ?;4OC* command is used. That isE the ?;4OC*
command is used to release the e:clusie control from the record.
ormat
The format of the ?;4OC* command is shon in the e:ample -elo. /T/STnames the file from hich e:clusie control is to -e released.
Bam+le
(4(C CICS ,+5OC= -'T'S(T%FI5(2&(+-8(4(C.
+,
-
8/13/2019 CICS mainframe document
80/145
Customer Information Control System (CICS)
(.g. 12.#: (7ample O* ,+5OC= Comman
8
-
8/13/2019 CICS mainframe document
81/145
Customer Information Control System (CICS)
> TO (C8'8=(/.Moe symbolic map *iels to the recor areaQQ(4(C CICS KIT(
-'T'S(T%FI5(2&FOM%FI5(8IO'('&
I-F5-%(C8'8=(/&5(+6T%K=85(+&
(+-8(4(C.
(.g. 12.E: (7ample O* KIT( Comman
Bce+tional Con&itions
?$CThe