You are on page 1of 145

Customer Information Control System (CICS)

Version 2.0
10th Oct. 2000

Customer Information Control System (CICS) Table Of Contents


Introduction To CICS.....................................................................................................................6
1. 2. 3. !. #. 6. +. 8. ,. 1 . 11. 12. 13. 1!. 1#. 16. 1+. 18. 1,. 2 . 21. 22. 23. 2!. 2#. 26. 2+. 28. 2,. 3 . 31. 32. 33. 3!. 3#. 36. 3+. 38. 3,. Batch and Online systems.........................................................................................................................................6 Brief History of CICS...............................................................................................................................................8 CICS System Concept............................................................................................................................................1 "eatures Of CICS...................................................................................................................................................13 Terminal Control $ro%ram &ana%ement &odule 'TC$(........................................................................................1# Tas) Control $ro%ram &ana%ement &odule '*C$(...............................................................................................16 $ro%ram Control $ro%ram &ana%ement &odule '$C$(.........................................................................................16 "ile Control $ro%ram &ana%ement &odule '"C$(.................................................................................................1+ Stora%e Control $ro%ram &ana%ement &odule 'SC$(...........................................................................................1+ Ta-les.....................................................................................................................................................................1+ Control Bloc)s........................................................................................................................................................18 Basic &appin% Support 'B&S(..............................................................................................................................1, $hysical &ap and Sym-olic &ap...........................................................................................................................2 &ap and &apset.....................................................................................................................................................21 Components Of / Screen.......................................................................................................................................22 &ap .efinition &acros..........................................................................................................................................2! ."H&S. &acro....................................................................................................................................................26 ."H&.I &acro.....................................................................................................................................................2+ ."H&." &acro....................................................................................................................................................28 "ormat of Sym-olic &ap........................................................................................................................................3 &ultithreadin%........................................................................................................................................................32 0uasi12eentrancy...................................................................................................................................................32 $seudo1Con3ersational $ro%rammin%.....................................................................................................................33 Transaction .ri3en.................................................................................................................................................3! CICS $ro%ram .e3elopment..................................................................................................................................36 CICS Command "ormat 5 /pplication .e3elopment 6ith COBO4.....................................................................36 Command 4an%ua%e Translator..............................................................................................................................3+ COBO47CICS $ro%ram Structure...........................................................................................................................38 $assin% the data usin% CO&&/28/.....................................................................................................................3, 8:ec Interface Bloc) '8IB( In 4in)a%e Section......................................................................................................!1 Standard /ttri-ute Byte 4ist...................................................................................................................................!2 Installation .efined &essa%e "ile..........................................................................................................................!3 /ttention Identifier '/I.(.......................................................................................................................................!! 8:ceptional Conditions...........................................................................................................................................!# H/;.48 CO;.ITIO; Command.......................................................................................................................!6 I<;O28 CO;.ITIO; Command.........................................................................................................................!+ ;OH/;.48 Option..............................................................................................................................................!8 H/;.48 /I. Command......................................................................................................................................!, 8IB/I...................................................................................................................................................................#2

System Components.....................................................................................................................1!

.ata Communication Operation In CICS.....................................................................................1,

Characteristics Of CICS................................................................................................................32

Command 4e3el $ro%rammin%.....................................................................................................36

CICS CO$9 BOO*S...................................................................................................................!1

/pplication $ro%ram House)eepin%.............................................................................................!#

B&S $ro%rammin% Considerations..............................................................................................#3


! . .ynamic /ttri-ute Character /ssi%nment..............................................................................................................#3 !1. Cursor $ositionin% Techni=ues...............................................................................................................................#!

Terminal Control Operations........................................................................................................#6


!2. !3. !!. !#. !6. 28C8I>8 &/$ Command '"ormatted .ata Transfer(..........................................................................................#+ .ata >alidity Chec)in%..........................................................................................................................................#8 S8;. &/$ Command ' "ormatted .ata Transfer(...............................................................................................#, 28C8I>8 Command '?nformatted .ata Transfer(...............................................................................................62 S8;. T8@T Command '?nformatted .ata Transfer(...........................................................................................6!

Inter3al Control Operations..........................................................................................................6#

Customer Information Control System (CICS)


!+. /S*TI&8 Command.............................................................................................................................................6# !8. "O2&/TTI&8 Command....................................................................................................................................66

$ro%ram Control Operations ........................................................................................................6+


!,. /pplication $ro%ram 4e3els...................................................................................................................................6+ # . 28T?2; Command..............................................................................................................................................68 #1. 4I;* and @CT4 Command...................................................................................................................................68

"ile Control Operations '2andom /ccess(....................................................................................+2


#2. #3. #!. ##. #6. #+. #8. #,. 6 . 61. 62. 63. 6!. 6#. 66. 6+. 68. 6,. + . +1. +2. +3. +!. +#. +6. ++. +8. +,. 8 . 81. 82. Special Ser3ices Of "ile Control.............................................................................................................................+2 28/. Command ?sin% "ull *ey..........................................................................................................................+3 28/. Command 6ith <8;82IC Option..............................................................................................................+# 28/. Command 6ith <T80 Option....................................................................................................................++ 28/.7?$./T8 and 28A2IT8 Commands........................................................................................................+8 ?;4OC* Command..............................................................................................................................................+, A2IT8 Command..................................................................................................................................................81 A2IT8 Command 6ith &/SSI;S82T Option.....................................................................................................82 .848T8 Command...............................................................................................................................................83 ST/2TB2 Command............................................................................................................................................8# 28/.;8@T Command ........................................................................................................................................88 28/.$28> Command.........................................................................................................................................8, Special Techni=ues "or Se=uential 2ead................................................................................................................,1 28S8TB2 Command.............................................................................................................................................,2 8;.B2 Command.................................................................................................................................................,3 &ultiple Bro6se Operations...................................................................................................................................,! A2IT80 Command ';o ?pdate(..........................................................................................................................,8 28/.0 TS Command '.irect 2ead(.....................................................................................................................,, 28/.0 TS Command 'Se=uential 2ead(............................................................................................................1 A2IT80 TS Command 6ith 28A2IT8 Option.................................................................................................1 1 .848T80 TS Command.....................................................................................................................................1 2 A2IT80 T. Command.......................................................................................................................................1 28/.0 T. Command .......................................................................................................................................1 .848T80 T. Command....................................................................................................................................1 .estination Control Ta-le '.CT(.........................................................................................................................1 /utomatic Tas) Initiation '/TI(...........................................................................................................................1 ! 6 6 + ,

"ile Control Operations 'Se=. /ccess(..........................................................................................8#

Temporary Stora%e Control..........................................................................................................,6

Transient .ata Control................................................................................................................1 3

Inter3al Control and Tas) Control..............................................................................................11


ST/2T Command................................................................................................................................................11 28T2I8>8 Command.........................................................................................................................................111 C/;C84 Command............................................................................................................................................112 S?S$8;. Command...........................................................................................................................................113 8;0 and .80 Commands...................................................................................................................................113

Tests and .e-u%%in%...................................................................................................................11#


83. H/;.48 /B8;. Command..............................................................................................................................11# 8!. /B8;. Command...............................................................................................................................................116 8#. .?&$ Command.................................................................................................................................................118

2eco3ery and 2estart..................................................................................................................11,


86. S9;C$OI;T Command......................................................................................................................................121

/pplication $ro%ram House)eepin% ContBd...............................................................................122


8+. 88. 8,. , . ,1. ,2. ,3. ,!. ,#. Base 4ocator "or 4in)a%e 'B44(.........................................................................................................................122 S82>IC8 284O/. Statement............................................................................................................................123 /..28SS Command..........................................................................................................................................12! Stora%e Control.....................................................................................................................................................12# $ro%ram Control...................................................................................................................................................12+ CSS;....................................................................................................................................................................131 C8B2...................................................................................................................................................................131 C8CI.....................................................................................................................................................................131 C8&T...................................................................................................................................................................132

CICS Transactions......................................................................................................................131

Customer Information Control System (CICS)


,6. CSS"....................................................................................................................................................................132

/ppendi:1/................................................................................................................................133
,+. /ssi%nment 1........................................................................................................................................................133 ,8. /ssi%nment 2........................................................................................................................................................13! ,,. /ssi%nment 3........................................................................................................................................................13# 1 . /ssi%nment !........................................................................................................................................................13# 1 1. /ssi%nment #........................................................................................................................................................136 1 2. /ssi%nment 6........................................................................................................................................................13+

/ppendi:1B................................................................................................................................138
1 3. Sample COBO41CICS $ro%ram...........................................................................................................................138

/ppendi:1C................................................................................................................................1!2
1 !. Bi-lio%raphy.........................................................................................................................................................1!2

/ppendi:1.................................................................................................................................1!3
1 #. Ta-le Of "i%ures...................................................................................................................................................1!3

Customer Information Control System (CICS)


.ay16ise Schedule
Day 1 Chapter1C Introduction To CICS Chapter2C System Components Day 2 Chapter3C .ata Communication Operation in CICS Chapter!C Characteristics of CICS Day 3 Chapter#C Command 4e3el $ro%rammin% Chapter6C CICS CO$9 BOO*S Day Chapter+C /pplication $ro%ram House)eepin% Chapter8C B&S $ro%rammin% Considerations Day ! Chapter,C Terminal Control Operations Chapter1 C Inter3al Control Operations Chapter11C $ro%ram Control Operations Day " Chapter12C "ile Control Operations '2andom /ccess( Day # Chapter13C "ile Control Operations 'Se=. /ccess( Day $ Chapter1!C Temporary Stora%e Control Chapter1#C Transient .ata Control Chapter16C Inter3al Control 5 Tas) Control Day % Chapter1+C Tests 5 .e-u%%in% Chapter18C 2eco3ery 5 2estart Chapter1,C /pplication $ro%ram House)eepin% contBd Chapter2 C CICS Transactions

Customer Information Control System (CICS)


Chapter 1

Intro&uction To CICS
'atch an& Online systems
Characteristics of batch an& online systems
There are t6o types of computer application systems. One is the -atch application system and the other is the online application system. The -atch system has a system en3ironment 6here Do-s run one -y one in a con3entional 6ayE 6hereas the online system has the system en3ironment 6here many transactions run concurrently. Batch System Off1line Se=uential in -atch /t specific inter3al ;ot shara-le ;ot critical $rinted reportsE output filesE ?ser must 6ait for -atch Do-s to produce reports Simple Simple ;ot al6ays current In -atch Online System On1line 2andomE concurrent Instantaneous Shara-le Critical To terminalE ?pdated filesE system lo%E Instant feed-ac) Comple: Comple: /l6ays current Immediate

.ata Collection Input Fo- Schedule 2esources 2esponse Time Output Security 2eco3ery Information ?pdation

Table 1.1: Batch System Vs Online System

(&)anta*es of the Online system


These daysE the online system is so common that 3irtually e3ery lar%e mainframe installation has at least on online application system. This is -ecause the online system has ad3anta%es o3er the -atch systems. ?p1to1date file 'information( can -e shared amon% many users simultaneously and instantly. .ata 3alidation and editin% can -e done at the data entry time

Customer Information Control System (CICS)

(&)anta*es of the 'atch System


On the other handE in spite of the e3er1increasin% popularity of the online systemE the -atch system has not died outE and it still contri-utes to the lar%e portion of data processin% re=uirements. This is -ecause the -atch system has ad3anta%e o3er the online system. Some of the ad3anta%es of the -atch system are as follo6sC Certain information does not ha3e to -e updated or displayed on a real1time -ase. ?sers can 6ait until the ne:t dayE the end of a 6ee)E or the end of a month. In this caseE the -atch system is sufficient for the purpose. If massi3e file updates or len%thy calculations are in3ol3edE the -atch system should -e used -ecause the online processin% in these areas tends to -e 3ery costly in terms of resource consumption.

Interacti)e +ro*rams
"our types of pro%rams are common to all interacti3e systems. They areC 1. .ata1entry pro%rams 2. In=uiry pro%rams 3. "ile1maintenance pro%rams !. &enu pro%rams Data,entry +ro*rams The most critical pro%rams in most interacti3e systems are data1entry pro%rams. These pro%rams accept input data from operator and use it to update the files after 3alidatin% the data entered. / typical data1entry pro%ram re=uires three stepsC 1. The operator enters data for one transaction 2. The pro%ram updates any related master files 3. The pro%ram 6rites the transaction to a transaction file In-uiry +ro*rams /n in=uiry pro%ram is desi%ned to pro3ide a response to a userBs in=uiry. / in=uiry pro%ram re=uires three stepsC 1. The operator enters the )ey of the record to -e displayed 2. The pro%ram retrie3es the appropriate record from the master file 3. The pro%ram displays the record at the terminal .ile,maintenance +ro*rams / file1maintenance pro%ram can update a file -y addin%E chan%in%E or deletin% records. / file1maintenance pro%ram re=uires fi3e stepsC 1. The operator enters the record )ey 2. The pro%ram reads the appropriate record +

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 re6rites the record to the master file /enu +ro*rams / menu pro%ram allo6s an operator to select the function he 6ishes to perform. / menu pro%ram re=uires three stepsC 1. 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

Interacti)e system consi&erations


Shared files C /n interacti3e system must pro3ide for shared files -y coordinatin% al file updates so t6o users arenBt allo6ed to update the same record at the same time. 2esponse timeC 2esponse time is another special consideration for interacti3e system. &any factors affect response timeC the num-er of users on the systemE siGe of the C$?. Speed of dis) dri3esE ho6 system parameters are setE speed of communication linesE and ho6 application pro%rams are 6ritten. SecurityC The main security techni=ue used in todayBs interacti3e system is lo%on procedure 2eco3eryC /ll interacti3e systems must pro3ide for reco3ery in the e3ent of a system failure.

'rief 0istory of CICS


The ad3anta%es of the online system 6ere first reco%niGed in the late 1,# s and early 1,6 s -y such -usinesses as the airline and -an)in% industriesE 6hich pioneered the de3elopment of the lar%e1scale online systems. Since thenE online systems ha3e -ecome e:plosi3ely popular amon% all industries.

1rior to CICS
?ntil the late 1,6 sE all online systems 6ere de3eloped on a custom1made -asis for each application for each installation. Ho6e3erE de3elopin% an online system is a comple: proDect in3ol3in% the operatin% system 'OS(E telecommunication access methodsE data access methodsE and applications pro%rams.

Customer Information Control System (CICS)


ThereforeE instead of de3elopin% an online system from scratch each timeE the data-ase7data communication '.B7.C( control system 6as de3eloped in order to pro3ide the control functions of the online system en3ironment. ?nder a .B7.C control system E an application pro%ram can concentrate on the application processin%E -ein% free from considerations of OSE hard6areE etc.E 6hich are not really the interest of the application pro%rams. .e3elopin% an online application system under the .B7.C control system as a result -ecame si%nificantly easier and faster.

2arly CICS (/acro 3e)el)


The Customer Information Control System 'CICS( as de3eloped -y IB& in the late 1,6 s as a .B7.C control system. The initial 3ersion 6as the macro le3el CICSE under 6hichE as the name HmacroI su%%estsE the application pro%rams used the assem-ler1 macro type CICS macros for re=uestin% CICS ser3ices. ?nder the CICS macro le3elE application de3elopment -ecame si%nificantly easier. Ho6e3erE it 6as still cum-ersome 6or) 6hich re=uired special s)ills.

CICS Comman& 3e)el


O3er timeE CICS 6as constantly up%raded and functionally enhanced. One si%nificant up%rade 6as from macro le3el to the command le3el. CICS commands are hi%h1le3el lan%ua%e 3ersion of CICS macrosE in a sense that one CICS command achie3es a CICS ser3ice 6hich 6ould ha3e -een achie3ed -y a series of CICS macros. ThereforeE under CICS command le3elE application de3elopment -ecame much easier than under the CICS macro le3el.

Current CICS .amily


There are currently fi3e CICS products a3aila-leE each of 6hich is de3eloped for particular operatin% system. These products are as follo6sC 1ro&uct CICS7&>S >ersion 2 2elease 1 CICS7OS7>S >ersion 1 2elease + CICS7.OS7>S >ersion 1 2elease + CICS7>& 2elease 2 CICS OS72 O+eratin* System &>S7@/E &>S78S/ &>SE &>S7@/ >S8 >&7S$ OS72

"unctionallyE all of these CICS products are compati-le 6ith each otherE 6ith certain e:ceptions caused -y the differences amon% the correspondin% operatin% systems.

Customer Information Control System (CICS)

CICS4/VS
CICS7&>S 3ersion 2 2elease 1 is the current 3ersion of the mainstream CICS productE replacin% its older 3ersionE CICS7Os7>S >ersion 1 2elease +. It runs under the &>S7@/ operatin% system and pro3ides comprehensi3e ser3ices as a %eneral purpose .B7.C control system in the 3irtual en3ironment.

CICS System Conce+t


Ob5ecti)e
The primary o-Decti3e of CICS is to pro3ide the control and ser3ices functions of the .B7.C system as a pac)a%e. That 6ayE CICS users can de3elop their o6n customiGed .B7.C system -y concentratin% on the application de3elopment -ased on their o6n needsE freed from detailed considerations for the operatin% system and computer hard6areE includin% communication terminals. CICS itself is not a .B7.C system unless applications accompany itE -ecause CICS pro3ides only the control en3ironment for the .B7.C system. This is 6hy CICS is cate%oriGed as a .B7.C control system.

CICS System Com+onents


CICS positions itself -et6een the operatin% system and application pro%rams. The essential role of CICS isE thereforeE to interface -et6een application pro%rams and the operatin% system as the .B7.C control system. CICS consists of fi3e maDor system componentsE each of 6hich pro3ides the 3arious specialiGed CICS ser3ices as follo6s .ata1Communication "unctions .ata Handlin% "unctions /pplication $ro%ram Ser3ices System Ser3ices &onitorin% "unctions

Customer Information Control System (CICS)

Data,Communication .unctions The Component of data1communication functions pro3ides an interface -et6een CICS and terminals or other systems. The follo6in% CICS ser3ices are offeredC To interface to telecommunication access methodsE such as >T/&E TC/&E BT/&. To free application pro%rams from terminal hard6are throu%h &asic &appin% Support 'B&S(E 6hich pro3idesC .e3ice independence "ormat independence To pro3ide &ulti12e%ion Operation '&2O(E throu%h 6hich more than one CICS re%ion in a system can communicate. To pro3ide Intersystem communication 'ISC(E throu%h 6hich a CICS re%ion of a system can communicate 6ith other CICS re%ions in other systems or other non1 CICS systems.

Data,0an&lin* .unctions The component of data1handlin% functions pro3ides an interface -et6een CICS and data. The follo6in% CICS ser3ices are offeredC To interface 6ith data access methodsE such as >S/& and B./&. To interface 6ith data-ase access methodsE such as .B2E S047.SE and .47I. To maintain data inte%rity -yC Control of simultaneous record updates $rotection of data as tas) /B8;.s $rotection of data at system 'CICS or OS( failures

(++lication 1ro*ram Ser)ices The component of application pro%ram ser3ices pro3ides an interface -et6een CICS and application pro%rams. The follo6in% CICS ser3ices are offeredC To interface 6ith COBO4E $47IE /ssem-ler pro%rams Command le3el translator 8:ecution dia%nostic facility '8."( Command interpretater 'C8CI( Screen definition facility 'S."( Trace and dump facilities

System Ser)ices The component of system ser3ices pro3ides an interface -et6een CICS and the operatin% system. The follo6in% CICS ser3ices are offeredC $ro%ram controlE such as load and release of application pro%rams 11

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 3arious e3ents 6ithin CICS and pro3ides a series of statistics to -e used for system tunin%. Other Systems
Operatin% System '&>S7@/(

.ata-ase /ccess &ethod '.47IE .B2( .ata Stora%e

.ata /ccess &ethod '>S/&E B./&(

Telecommunication /ccess &ethod '>T/&E TC/&E BT/&(

CICS7&>S System Ser3ices

Terminals

.ata1handlin% "unctions

&onitorin% "unctions

.ata1Comm. "unctions

/pplication $ro%ram Ser3ices

CICS /pplication pro%rams 'COBO4E $47IE /ssem-ler(

12

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 components needed to handle data communication. This allo6s system desi%ner and pro%rammers to concentrate on de3elopin% application pro%rams 6ithout ha3in% to concern 6ith the details of data transmissionE -uffer handlin% or the properties of indi3idual terminal de3ices.

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 systemBs partition or re%ionE 6hich is a 3irtual address space. Therefore CICS ta)es part in multipro%rammin% en3ironment of the operatin% system. CICS is a lon%er runnin% Do- therefore it remains up durin% the day time collectin% on1 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( allo6s more than one tas) to -e e:ecuted concurrentlyE re%ardless of 6hether the tas)s use the same pro%ram or different pro%rams. ThereforeE this is not a uni=ue concept of CICS. ButE CICS mana%es multitas)in% of CICS tas) 6ithin its o6n re%ion. That is CICS pro3ides a multitas)in% en3ironment 6here 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 3alidity of userE terminal and transaction1id. Then tas) control creates a tas) for the transaction. CICS tries to %i3e the -est response times to the most important or ur%ent 6or). ?suallyE se3eral tas)s are competin% for resourcesE so a transactionE an operatorE and a terminal are each assi%ned a priority related to the importance of the function they carry out. CICS sums these priorities to %i3e the o3erall priority of the tas) and uses this priority to decide the order in 6hich to process competin% tas)s. Since transactions are not normally

13

Customer Information Control System (CICS)


processed throu%h to completion in a sin%leE uninterrupted optionE CICS ma)es such decisions e3ery 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 -et6een the operatin% system and the application pro%rams. 8ach mana%ement module performs a particular function. "or e:ampleE 6hen 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% en3ironment. CICS ta)es o3er the difficult part of I7O operationsE lea3in% only the e:ecution lo%ic to the application pro%ram. Ta-les define the CICS7&>S systemBs en3ironment. The ta-les are functionally associated 6ith 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. "or this 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 net6or)J thus the application pro%ram need not -e concerned 6ith the physical attri-utes of 3arious terminals in the system. ;ot all mana%ement modules ha3e 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:ample Tas) Control area contain pointers to the application pro%ram and to the terminalBs entry in the Terminal Control Ta-le.

1!

Customer Information Control System (CICS)

Terminal Control 1ro*ram /ana*ement /o&ule (TC1)


Terminal Control $ro%ram 'TC$( is the mana%ement module that pro3ides communications interface to the application pro%ram. The application pro%rams in3o)e TC$ 6hich then controls communication in the net6or). The Terminal Control $ro%ram performs the follo6in% functionsC 2e=uests terminal to send their transactions Transfers data -et6een 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 hard6are communications re=uirements. TC$ is responsi-le for the actual transmission of a messa%e o3er communication lines. Searches the Terminal Control Ta-le 'TCT(. 8ach terminal in the net6or) is identified -y a uni=ue entry in the Terminal Control Ta-le. The entry is called Terminal Control Ta-le Terminal 8ntry 'TCTT8(. Ahen data is ready to -e sent to the terminalE a fla% is set O; in the terminalBs TCTT8. TC$ searches the TCT periodically and causes the data to -e sent to the respecti3e terminals. 2e=uests initiation of a ne6 tas). /ll functions carried out -y TC$ are transparent to application pro%ram. $ro%rammer simply needs to code 28C8I>8 and S8;. commands.
/pplication pro%ram Terminal Control re=uests

CICS

Terminal Control

Host Operatin% System

TC /ccess &ethods 'TC/&E BT/&E >T/&(

Terminal .e3ices Fig.2.1: Terminal Control Program Management Mo !le

1#

Customer Information Control System (CICS) Tas6 Control 1ro*ram /ana*ement /o&ule (7C1)
Tas) control )eeps control of the status of all CICS tas)s. &any of them 6ill -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 a transaction codeE CICS chec)s the status of the operator and the terminal. This ensures that the operator in )no6n to the system and that the transaction is 3alid for that user and the terminal. Tas) Control then creates a tas) for that transaction. Transaction re=uest can -e made either -y enterin% transaction1id at the terminal or -y another CICS transaction. / transaction is processed up to an instruction in3ol3in% input from a file or a terminalE for instance. Then 6hile the transaction 6aits for its inputE another 6aitin% tas)s -e%ins or resumes e:ecution.

1ro*ram Control 1ro*ram /ana*ement /o&ule (1C1)


$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 is also responsi-le for transferrin% control to them and returnin% control -ac) to CICS 6hen the application pro%ram ha3e completed e:ecution. $C$ also facilitates one application pro%ram transferrin% control to another application pro%ram 3ia 4I;* and @CT4 commands. The 3alidity of transaction1id supplied -y the user is chec)ed from the $ro%ram Control Ta-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 application pro%ram alon% 6ith its nameE host lan%ua%e and address. /t the time a tas) re=uires a %i3en application pro%ramE that pro%ram may or may not -e in stora%e. There are three reasons 6hy 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 6as loaded into stora%e 6hen CICS 6as initiated /nother tas) is usin% the pro%ram /nother tas) used the pro%ram and stora%e area 6as not needed for somethin% else the pro%ram remains in stora%e.

16

Customer Information Control System (CICS)


$C$ )no6s if there are any tas)s currently usin% the same pro%ramE from the 3alue of ?S8 CO?;T82 in $$T. If ?S8 CO?;T82 is GeroE the stora%e area is made a3aila-le for other purpose.

.ile Control 1ro*ram /ana*ement /o&ule (.C1)


The "ile Control $ro%ram '"C$( facilitates the accessin% of files on a direct access -asis. "C$ pro3ides command to 28/.E A2IT8E 28A2IT8 and .848T8 records. It uses the standard access methods pro3ided -y IB&. It mana%es concurrent operations -y pre3entin% simultaneous updatin% of a %i3en record. In carryin% out its file control functionsE "C$ ma)es use of a ta-le called the "ile Control Ta-le '"CT(. "CT includes an entry for each file that is to -e used durin% the operation of CICS. 8ach entry in the "CT contains all the descripti3e information for the file that it representsE there-y freein% the application pro%rammer from definin% the physical or%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 1ro*ram /ana*ement /o&ule (SC1)


Stora%e Control ac=uiresE controlsE and frees dynamic stora%e durin% e:ecution of a tas). &aintains full control o3er the 3irtual 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 net6or). "ile Control Ta-le descri-es the data files the CICS application pro%rams access. Ta-les also define the operatin% en3ironment. "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 6hen CICS is initialiGed. Ahene3er an application pro%ram re=uires access to a resourceE CICS chec)s the appropriate ta-le to %et the information necessary to process the re=uest. There are si:teen ta-les used to descri-e the CIC8 en3ironment. $CTE $$TE SITE TCT are re=uired. Others are optional.

1+

Customer Information Control System (CICS)

System Initiali8ation Table


The System InitialiGation ta-le 'SIT( contains parameters used -y the system initialiGation process. In particularE the SIT identifies '-y suffi: character( the 3ersion of the CICS system control pro%rams and CICS ta-les that you ha3e specified and that are to -e loaded.

1ro*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 3erify incomin% re=uests to start transactions and to supply information a-out the transaction.

1rocessin* 1ro*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 o6n files. The files defined in the "CT can -e >S/& or B./&.

Control 'loc6s
In e:ecutionE CICS is dynamic. To )eep trac) of 6hat is %oin% on in the system CICS uses se3eral different control -loc)s. &ost of these control -loc)s are dynamically mana%ed. They are created 6hen needed and disposed of 6hen no lon%er needed. $rimarily CICS mana%ement modules access the Control -loc)s. They pro3ide 3arious )inds of information. "or e:ampleE a control -loc) called Tas) Control /rea 'TC/(

18

Customer Information Control System (CICS)


represents each transaction. Information a-out current tas) is stored in to control -loc) named 8:ecute Interface Bloc) '8IB(. Chapter 3

Data Communication O+eration In CICS


Three methods are a3aila-le to the CICS application pro%rammer for communicatin% 6ith the terminals and lo%ical units in the su-systems of the net6or) that forms part of the CICS system. The methods dealt 6ith areC Basic mappin% support 'B&S( Terminal Control Batch .ata Interchan%e 'B.I( Basic mappin% support pro3ides commands and options that can -e used to format data in a standard manner. B&S con3erts data streams pro3ided -y the application pro%ram to conform to the re=uirements of the de3ices. Con3ersely data recei3ed from a de3ice in con3erted -y B&S to a standard form. Terminal control is the -asic method for communicatin% 6ith de3icesE 6hereas -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 B.I use terminal control facilities 6hen in3o)ed -y an application pro%ram. Batch data interchan%e pro3ides commands and options that may -e used possi-ly in conDunction 6ith B&S commandsE to communicate 6ith -atch lo%ical units.

'asic /a++in* Su++ort ('/S)


Once a record re=uested -y the operator is retrie3edE it has to -e formatted for display. B&S remo3es the responsi-ility of formattin% the screen from the application pro%ram. B&S places the data 6ith necessary control characters in the TIO/. The control characters are remo3ed -efore the messa%e is displayed on the screen. It allo6s repositionin% of fields 6ithout modifyin% application pro%rams. B&S acts as an interface -et6een the application pro%ram and Terminal Control $ro%ram. B&S ma)es the application pro%ram "ormat Independent and .e3ice Independent. "ormat Independence /pplication pro%rams are 6ritten 6ithout concern for physical position of data fields 6ithin a display 1,

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

.e3ice Independence /pplication pro%rams can -e de3eloped 6ithout any concern for physical characteristics 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 HmapI. There are t6o types of mapsC a physical mapE 6hich is primarily used -y CICSE and a sym-olic mapE 6hich is primarily used -y the application pro%rams. B&S map is nothin% -ut a pro%ram 6ritten in the /ssem-ler 4an%ua%e. Ho6e3erE you do not ha3e to pro%ram the B&S map as suchE -ecause a set of assem-ler macros 'B&S macros( are pro3ided -y CICS for the B&S map codin%. Based on ho6 a map or a %roup of maps is lin)editedE there are t6o units of the mapC mapE 6hich represents a B&S codin% for a screen panelE and mapsetE 6hich represents a load module.

1hysical /a+ an& Symbolic /a+


1hysical /a+
The primary o-Decti3e of the physical map is to ensure the de3ice independence in the application 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 allo6s 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 and allo6s B&S to add control characters and commands for output in order to construct an output data stream.

1hysical /a+ 9eneration


The physical map is a pro%ram in a form of load module. ThereforeE the physical map is coded usin% B&S macrosE assem-led separatelyE and lin)edited into the CICS load li-rary

B&S macro codin% 4oad module

/ssem-ly 4O/.4IB

4in)edit To -e used -y CICS

Customer Information Control System (CICS)

Symbolic /a+
The primary o-Decti3e of the B&S sym-olic map is to ensure the de3ice and format independence 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%ram codin% as lon% as the field name and len%th remain same. It is used -y the application pro%ram 6hich 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 6hich 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 6ill -e copied into the application pro%ram. B&S macro codin% CO$94IB /ssem-ly Sym-olic map definition

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 a mapset.

/a+set
/ %roup of mapsE 6hich are lin)1edited to%ether is called mapset. 8ach 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 t6o parts as follo6sC <eneric ;ameC 1 to + characters Suffi: C 1 character /pplication pro%ram uses only the %eneric name. The suffi: is re=uired at the mapset definition time in order to distin%uish the de3ice types if the same mapset is used for different types of terminals. Ahile the application pro%ram uses only the %eneric name of the mapset nameE CICS automatically inserts the suffi: dependin% on the terminal in useE there-y ensurin% the de3ice independence to the application pro%ram.

21

Customer Information Control System (CICS)

Com+onents Of ( Screen
CICS identifies screen into three componentsC 1. &apset 2. &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 di3ide the screen into functional areas such as title areaE application data area and messa%e area. The title area of a screen should identify 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 areaC 1. *ey6ord7unnamed7literal K contains constant data sent -y pro%ram to identify the contents of the data field. 2. .ata field7named K contains data that the application pro%ram retrie3es from files and displays. The data may appear e:actly as stored in a fileE or it may -e editedE or 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 al6ays the first character of a field. It occupies a character position on the screen -ut appears as a -lan). 1 2 3 ! # 6 +

$rotection 1ositions 11 213

Intensity 1

&.T 'it Settin*s ?nprotectedE /lphanumeric ?nprotectedE ;umeric $rotected /utos)ip ;ormal ;ormal

.unctions Information a-out -its2 thru + $rotection

1 1 11 !1# Intensity 1

22

Customer Information Control System (CICS)


1 11 1 1 Bri%ht ;o1display "ield has not -een modified "ield has -een modified

6 +

&ust -e &.T

/ttri-utes -ytes can con3ey the follo6in% field attri-utes. "ield $rotection ?nprotectedC can enter any )ey-oard character into unprotected field. $rotectedC .ata cannot -e entered in a protected field. If the operator attempts to enter dataE the )ey-oard is loc)ed. /utos)ipC /n autos)ip field is a protected field that automatically s)ips the cursor to the ne:t unprotected field. "ield Intensity ;ormalC a normal intensity field displays the data at the normal operatin% intensity. Bri%htC a -ri%ht intensity field displays the data at a -ri%hter than normal intensity. This is often used to hi%hli%ht )ey6ordsE errorsE or operator messa%es. ;odisplayC / nodisplay field does not display the data on the screen for operator 3ie6in%. 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 )no6 the concept of H&odified .ata Ta%I '&.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 6hen &.T is onE 6ill the data of the field -e sent -y the terminal hard6are to the host computer 'i.e.E to the application pro%ram(. 8ffecti3e use of &.T drastically reduces the amount of data traffic in the communication lineE there-y impro3in% performance si%nificantly. "ollo6in% are the three 6ays to set &.T onC By data1entry By settin% attri-ute -yte in the physical map By mo3in% &.T attri-ute in the application pro%ram.

23

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 pro3ides /ssem-ler macros as follo6sC ."H&S.C ."H&.IC ."H&."C To define a mapset. To define a map To define a field

9eneral .ormat
The B&S map definition macros are purely /ssem-ler macros. ThereforeE the follo6in% codin% must -e maintainedC
Col!mn 1 Symbolic name Col!mn 1" Opco e Col!mn 1# Col!mn 1$ Parameter%s& %separate by commas& ' itional parameters (g.).1: Format o* BMS macros Col!mn $2 Cont. Char.

8:ampleC
M(+, -F.MST/P(01S/SP'2M3 4 MO-(0I+O,T3 5'+60COBO53.. (g.).2: (7ample o* BMS macros

Or&er of /acros

2!

Customer Information Control System (CICS)


There is rule for the order of B&S macros 6hich must -e follo6ed. That isE 6ithin one mapset definitionE the map definition can -e specified as many times as you 6ish. Aithin one map definitionE the field definition can -e specified as many times as you 6ish

2#

Customer Information Control System (CICS)

Print +ogen 88889 'ssembler Comman 5abel -F.MS- 88889 Mapset -e*inition 5abel -F.M-I 88889 Map -e*inition -F.M-F 88889 Fiel -e*inition 5abel -F.M-F 88889 Fiel -e*inition : : : -F.M-F -F.M-I -F.M-F : : : -F.M-F -F.MS- Type 0 Final 889 Mapset -e*inition (n 88888888888888888889 'ssembler comman

(g.).): BMS Macro -e*inition

D.0/SD /acro
.unction
The ."H&S. macro is used to define a mapset and its characteristics or to end a mapset definition. Only one mapset definition is allo6ed 6ithin one assem-ly run.

.ormat
5abel -F.MST/P(0-(S(CT : M'P : 1S/SP'2M : FI+'5 ;3 MO-(0I+ : O,T : I+O,T< ;3 5'+60'SM : COBO5 : P5I < ;3 STO2'6(0',TO : B'S(0name< ;3 CT250%;F2((=B< ;3 '5'2M< ;3 F2S(T<&< ;3 .I6.5I6.T0OFF : B5I+= : 2(V(2S( : ,+-(25I+(< ;3 V'5I-+0M,STFI55 : M,ST(+T(2< ;3 T(2M0T/P( : 3 S,FFI40n< ;3 TIO'PF40/(S : +O< ;3 -'T'0FI(5- : B5OC=< (g.).>: Format o* -F.MS- Macro

26

Customer Information Control System (CICS)


Commonly :se& O+tions
The follo6in% are some of the commonly used options of the ."H&S. macroC T9$8L .S8CT &/$ 5S9S$/2& "I;/4 &O.8L I; O?T I;O?T 4/;<L STO2/<8L/?TO TIO/$"@L98S C;T4L "288*B "2S8T /4/2& $2I;T T82&Ltype To define the map type "or sym-olic map. "or physical map. "or sym-olic as 6ell as physical map. To indicate the end of the mapset codin%. To indicate input7output operation. "or the input map. "or the output map. "or input7output map. To define the lan%ua%e of the application pro%ram. To ac=uire a separate sym-olic map area for each mapset. To reser3e the prefi: space '12 -ytes( for B&S commands to access TIO/ properly. To define the de3ice control re=uests. To unloc) the )ey-oard. To reset &.T to Gero. To set an alarm at screen displaytime. To indicate the mapset to -e sent to the printer. 2e=uired if other than the 32+ terminal is used. This ensures de3ice independence -y means of pro3idin% the suffi:.

2n& of /a+set Definition


One mapset definition must -e ended 6ith another ."H&S. macro 6ith the T9$8L"I;/4 option as follo6sC
-FSMST/P(0FI+'5

D.0/DI /acro
.unction
The ."H&.I macro is used to define a map and its characteristics in a mapset.

.ormat
5abel -F.M-I ;SI?(0%5I+( 3 CO5,M+&<
;3 5I+(0n!mber : +(4T : S'M(< ;3 CO5,M+0'SM : COBO5 : P5I < ;3 STO2'6(0',TO : B'S(0name< ;3 CT250%;F2((=B< ;3 '5'2M< ;3 F2S(T<&< ;3 .I6.5I6.T0OFF : B5I+= : 2(V(2S( : ,+-(25I+(<

2+

Customer Information Control System (CICS)


;3 V'5I-+0M,STFI55 : M,ST(+T(2< ;3 T(2M0T/P( : 3 S,FFI40n< ;3 TIO'PF40/(S : +O< ;3 -'T'0FI(5- : B5OC=<

(g.).@: Format o* -F.M-I Macro

The 4/B84 must -e specified as the sym-olic name to the ."H&.I macro. SIM8'llE cc( is used to define the siGe of the map -y the line siGe 'll( and column siGe 'cc(. 4I;8 and CO4?&; indicates the startin% position of the map in line and column num-ersE respecti3ely. In additionE the ."H&.I macro has the same options used in the ."H&S. macroE such as C;T4 and TIO/$"@. If the ."H&.I macro has the same options specified in the ."H&S. macroE the options specified in the ."H&.I macro o3erride the ones specified in the ."H&S. macro.

D.0/D. /acro
.unction
The ."H&." macro is used to define a field in map and its characteristics. The ."H&." macro can -e issued as many times as you 6ish 6ithin one ."H&.I macro.

.ormat
5abel -F.M-F POS0%line : col!mn& ;3 5(+6T.0n!mber< ;3 A,STIF/0%;5(FT : 2I6.T<& ;3 'TT2B0%'S=IP : P2OT : ,P2OT ;3 +,M<< ;3 B2T : +O2M : -2=< ;3 IC<;3 FS(T<& < ;3 .I5I6.T0OFF : B5I+= : 2(V(2S( : ,+-(25I+(< ;3 V'5I-+0%;M,STFI55 : M,ST(+T(2<& ;3 OCC,2S0n!mber< ;3 I+ITI'50BCal!eB< ;3 PICI+0BCal!eB< ;3 PICO,T0BCal!eB< (g.).#: Format o* -F.M-F Macro

If the field name is re=uiredE the name of the field '1 to + chars( must -e specified as the sym-olic name to the ."H&." macro. $OSL'lineE column( indicates the startin% position of the field in the line and column num-er includin% the attri-ute character. I;ITI/4 defines the initial 3alue of the field 'if any(. 48;<TH indicates the len%th of 28

Customer Information Control System (CICS)


the field e:cludin% the attri-ute character. $ICI; and $ICO?T defines the $ICT?28 clauses of the sym-olic map in COBO4E 6hich is useful for numeric field editin%.

2,

Customer Information Control System (CICS)

.ormat of Symbolic /a+


/ sym-olic description map is a source lan%ua%e data structure that the assem-ler or compiler uses to resol3e source pro%ram references to fields in the map. Hence it must -e copied into any application pro%ram that refers to fields in the map. / COBO4 pro%ram must contain a COBO4 CO$9 statement for each sym-olic map definition in 6or)in% stora%e section. The sym-olic map starts 6ith the 1 le3el definition of "I4482 $IC @'12(E 6hich is the TIO/ prefi: created -y TIO/$"@L98S of the ."H&S. macroE and this is re=uired -y B&S under the CICS command le3el. Ahen desi%nin% a mapE names are assi%ned to fields that contain 3aria-le data. The sym-olic map data structure contains e:tended 3ersions of these fieldsE each one consistin% of su-1fields. 8ach )ind of su-1field has a different suffi:. name4C The half6ord -inary '$IC S,'!( CO&$( field. "or the input fieldE the actual num-er of characters typed in the field 6ill -e placed -y B&S 6hen the map is recei3ed . "or the output fieldE this is used for the dynamic cursor positionin%. "la% -yte. "or an input fieldE it 6ill -e @B8 B if field has -een modified -ut no data is sent 'i.e.E the field is cleared(. Other6iseE this field is @B B. The attri-ute -yte for -oth input and output fields. B 6ill -e placed if no data in entered.

name"C name/C

nameIC The input data field. @B nameOC

The output data field.

Customer Information Control System (CICS)


8:ampleC
"1 MO2M'P11. "2 FI55(2 PIC 4%12&. "2 'MO,+T5 COMP PIC SD %>&. "2 'MO,+TF PIC 4. "2 FI55(2 2(-(FI+(S 'MO,+TF ") 'MO,+T' PICT,2( 4. "2 'MO,+TI PIC D%#&VDD. "2 2'T(5 COMP PIC SD%>&. "2 2'T(F PICT,2( 4. "2 FI55(2 2(-(FI+(S 2'T(F. ") 2'T(' PICT,2( 4. "2 2'T(I PIC VD%>& "2 P'/M(+T5 COMP PIC SD%>&. "2 P'/M(+TF PICT,2( 4. "2 FI55(2 2(-(FI+(S P'/M(+TF. ") P'/M(+T' PICT,2( 4. "2 P'/M(+TI PIC 4%D&. "2 M(SS'6(5 COMP PIC SD%>&. "2 M(SS'6(F PICT,2( 4. "2 FI55(2 2(-(FI+(S M(SS'6(F. ") M(SS'6(' PICT,2( 4. "2 M(SS'6(I PIC 4%$D&. "2 (22O25 COMP PIC SD%>&. "2 (22O2F PICT,2( 4. "2 FI55(2 2(-(FI+(S (22O2F. ") (22O2' PICT,2( 4. "2 (22O2I PIC 4%$$&.

"2 -,MM/5 COMP PIC SD%>&. "2 -,MM/F PICT,2( 4. "2 FI55(2 2(-(FI+(S -,MMF. ") -,MMI PICT,2( 4. "2 -,MMI PIC 4%1&. "1 MO2M'P1" 2(-(FI+(S MO2M'P11 "2 FI55(2 PIC 4%12&. "2 FI55(2 PICT,2( 4%)&. "2 'MO,+TO PIC 4%E& "2 FI55(2 PICT,2( 4%)&. "2 /('2SO PIC 4%2& "2 FI55(2 PICT,2( 4%)& "2 2'T(O PIC 4%>&. "2 FI55(2 PICT,2( 4%)&. "2 P'/M(+TO PIC ??3??D.DD. "2 FI55(2 PICT,2( 4%)". "2 M(SS'6(O PIC 4%$D&. "2 FI55(2 PIC 4%)&. "2 (22O2O PIC 4%$$&. "2 FI55(2 PICT,2( 4%)&. "2 -,MM/O PIC 4%"1&

(g.).$: (7ample O* Symbolic Map -e*inition

31

Customer Information Control System (CICS)


Chapter !

Characteristics Of CICS
/ultithrea&in*
&ultithreadin% is the system en3ironment 6here the tas)s are sharin% the same pro%ram under the multitas)in% en3ironment. &ultithreadin% is a su-set of multitas)in%E since it concerns tas)s 6hich use the same pro%ram. ?nder the multithreadin% en3ironmentE a pro%ram is shared -y se3eral tas)s concurrently. "or each tas)E the pro%ram must 6or) as if it 6ere e:ecutin% instructions e:clusi3ely for each tas). ThereforeE it re=uires special considerations such as reentrancy. Contrary to the multithreadin% en3ironmentE under the sin%le threadin% en3ironmentE a pro%ram is used -y only one Do- 'or tas)( at a time. Sin%le threadin% is the e:ecution of a pro%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 6ithin its o6n re%ion. That isE CICS pro3ides the multithreadin% en3ironment 6here more than one CICS tas)E 6hich uses the same pro%ramE run concurrently.

;uasi,<eentrancy
In order to ma)e multithreadin% possi-leE an application pro%ram must -e HreentrantI. / completely reentrant pro%ram doesnBt chan%e itself in any 6ay i.e. a reentrant pro%ram cannot modify data in 6or)in% stora%e. /s a resultE any user can enter a reentrant pro%ram at any point 6ithout affectin% other users 6ho are also runnin% it. To ma)e thin%s easierE command le3el CICS allo6s you to use 6or)in% stora%e -y treatin% all pro%rams as =uasi1reentrant.

32

Customer Information Control System (CICS)

>irtual Stora%e $ro%ram / O-Dect code ?ser1 runnin% pro%ram / $ro%ram / Aor)in% Stora%e '?ser1( ?ser2 runnin% pro%ram /

$ro%ram / Aor)in% Stora%e '?ser2(

Fig.>.1: F!asi82eentrant Program

"i%ure a-o3e sho6s ho6 =uasi1reentrant pro%rams 6or) under CICSE HereE t6o users are runnin% the same application pro%ramE $ro%ram /. They share the same stora%e for the pro%ramBs o-Dect code. i.e. the procedure di3isionJ -ut each is %i3en a separate 6or)in% stora%e area. That 6ayE each can use 6or)in% stora%e in the normal fashion. Ahen you 6rite a command le3el CICS pro%ramsE you donBt need to 6orry a-out a =uasi1reentrantE CICS handles that for you automatically.

1seu&o,Con)ersational 1ro*rammin*
/n interacti3e pro%ram that 6aits for data to -e input from the user on the terminal is called a Con3ersational pro%ram. On sin%le user system this is not a pro-lem. But 6ith the multi1user system it is a pro-lem. 8.%. In a 3 users systemE 6hen one pro%ram is acceptin% and processin% dataE the other 2, are 6aitin% ta)in% up space in main stora%e. Hence in multi user en3ironmentE con3ersational pro%rams can -e tremendously inefficient. The solution in $seudo1con3ersational pro%rammin% i.e. to return the control to CICS 6hen the pro%ram is 6aitin% for any i7o. /s a result the pro%ram remains in stora%e only 6hen it is processin% data.

33

Customer Information Control System (CICS)

0o= a 1seu&o,Con)ersational 1ro*ram >or6s?


/s the operator )eys in dataE itBs displayed on the screen. ThatBs a function of the terminalE 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 ho6 does CICS )no6 6hen to restart a pseudo1con3ersational pro%ramN BasicallyE an operator si%nals CICS to restart a pseudo1con3ersational pro%ram -y pressin% one of the terminalBs /I. )eys. '/I. )eys are the enter )eyE the clear )eyE the $" )eys and the $/ )eys(. Of courseE most operators donBt thin) in terms of restartin% their pro%ram 6hen they press an /I. )eys. ?suallyE an operator Dust )no6s that he presses 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 retrie3es the data the operator entered -y issuin% a CICS commandC 28C8I>8 &/$. Command simply transfers data from the screen to th sym-olic map in a pro%ram. /fter the pro%ram retrie3es the data the operator enteredE it processes it. ;e:tE the pro%ram issues a CICS S8;. &/$ command to display the results. /fter the pro%ram issues a S8;. &/$ commandE it issues a 28T?2; command. The 28T?2; command ends the pro%ram Dust as a STO$ 2?; does in a -atch COBO4 pro%ram. In additionE the 28T?2; command specifies 6hat trans1id CICS should in3o)e the ne:t time the operator presses an /I. )ey. Suppose the operator presses the C48/2 )ey to end the terminal session. Since the C48/2 )ey is an /I. )eyE CICS restarts the pro%ram automatically. Ahen pro%ram sees that the operator pressed the C48/2 )ey rather than the 8;T82 )eyE it sends the messa%e to the terminal. Then it issues a 28T?2; command 6ithout a trans1id. That ends the pseudo1con3ersational cycle.

Transaction Dri)en
/ transaction is a lo%ical unit of 6or) that a terminal user can in3o)e. CICS is called to -e transaction dri3enE -ecause e3ery transaction or pro%ram can -e in3o)ed 6ith the help of a transaction1id. In shortE transaction1id and the pro%ram to 6hich transaction1id is related are predefined in the $CT ta-le. 8ach trans1id is a uni=ue four character code. $ro%ram1name is the pro%ram1id as defined in COBO4 pro%ram.

Ahen the user enters the trans1id on the terminal and presses the enter '/I.( )eyE CICS locates the trans1id in $CT and refers to $$T. 4oads the pro%ram into stora%e and a

3!

Customer Information Control System (CICS)


T/S* is initiated i.e. CICS passes control to the application pro%ram. 83ery tas) is assi%ned a uni=ue tas)1no -y CICS. The initiated tas) continues till it encounters any i7o and passes control to CICS. Tas) can also -e initiated -y CICSE -y pro3idin% the trans1id 6hile returnin% control to CICS. Ahen the user presses an /I. )eyE CICS initiates the tas) a%ain related to the trans1id returned. This time the tas) %ets a different tas) no. So one application is di3ided into many tas)s durin% the process of e:ecution.

3#

Customer Information Control System (CICS)


Chapter #

Comman& 3e)el 1ro*rammin*


CICS 1ro*ram De)elo+ment
/pplication pro%rammin% in CICS can -e done 6ith many host lan%ua%es that IB& supportsE li)e COBO4E $471E /ssem-ler etc. The codin% can -e done either 6ith &acro le3el or usin% CICS Command le3el li-rary.

/acro 3e)el 1ro*rammin*


&acro 4e3el $ro%rammin% in3ol3es callin% macros in the host lan%ua%e usin% the pro%ram areas for 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& 3e)el 1ro*rammin*


Command 4e3el $ro%rammin% is a hi%h1le3el lan%ua%e 6hich pro3ides set of CICS commands for accessin% the resources. $ro%rammin% in this style is comparati3ely easier. Command le3el $reprocessor translates the CICS commands into e=ui3alent macro calls

CICS Comman& .ormat @ (++lication De)elo+ment =ith CO'O3


CICS commands are em-edded into the Host lan%ua%eE e.%. in the $rocedure .i3ision of COBO4 pro%ram. CICS commands in a COBO4 pro%ram are delimited -y 8@8C CICSO..8;. 8@8C 8@8C CICS is coded in mar%in B of COBO4 pro%ram. The command le3el translator replaces these statements -y COBO4 H&O>8I statements follo6ed -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

Customer Information Control System (CICS)

CICS Command formatC 8@8C CICS "unction Poption 'ar%ument( option 'ar%ument( 111111111 111111111 Q 8;.18@8C. H"unctionI descri-es the operation re=uired e.%. S8;.728C8I>8 etc. HOptionI descri-es any of the many optional facilities a3aila-le 6ith each function. Options can -e coded in any order -ut prefera-ly one option per line. Options may -e follo6ed -y an ar%ument in parentheses. H/r%umentI is a 3alueE can -e a data1name or literal.

Comman& 3an*ua*e Translator

COBO5 So!rce Program

Translator

Translate So!rce 5isting 1 -iagnostics

Translate So!rce Program

COBO5 Compiler

Compiler So!rce 5isting 1 -iagnostics

ObGect Mo !le

5inH ( it

5oa Mo !le

3+

Customer Information Control System (CICS)

Fig.@.1: Comman 5eCel Translator

Separate translators are a3aila-le for /ssem-lyE COBO4 and $471 lan%ua%es 6ith em-edded CICS. The translator is e:ecuted in a separate Do- step. The Do- step se=uence is C Translate 111 Compile 'or assem-le( 111 4in) edit 8ach translator is host lan%ua%e oriented and accepts the source pro%ram as input from S9SI;. The translator 6rites the source listin% and error messa%es to S9S$2I;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 8IB structure as the first parameter and inserts declaration of the temporary 3aria-les that it re=uires into 6or)in% stora%e section. "or COBO4 application pro%ramE each command is replaced -y one or more COBO4 mo3e statements follo6ed -y a COBO4 C/44 statement. &O>8 statement assi%n constants to COBO4 data 3aria-les. The constants are coded as ar%uments to options in the commands. .eclarations for 3aria-les in 6or)in% stora%e section is coded as copy file name ."HI>/2.

CO'O34CICS 1ro*ram Structure


IDENTIFICATION DIVISION. P2O62'M8I-. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. Variable eclaration File layo!t Symbolic map Copy booHs -F.(IV'2 LINKAGE SECTION. -F.COMM'2(' (IBB5OC= B55 C(5SS PROCEDURE DIVISION.

The follo6in% COBO4 statements are prohi-ited in a CICS application pro%ramC

38

Customer Information Control System (CICS)


/CC8$TE C?228;T1./T8E ./T8E ./9E .IS$4/9E 8@HIBITE STO$ 2?;E T2/C8 /ny I7O statements 'O$8;E C4OS8E 28/.E A2IT8E 28A2IT8E .848T8E ST/2T( 28$O2T A2IT82 feature SO2T feature

The e=ui3alent statements 'e:cept 2eport Ariter and Sort( are prepared in the form of CICS commands. The CICS application pro%ram must end 6ith the CICS 28T?2; command and7or <OB/C* statement. The C/44 statement is allo6ed if the called pro%ram does not issue any CICS commands or inhi-ited COBO4 statements mentioned a-o3e and if it is 6ritten as a reentrant pro%ram. The C/44 statement in this case can -e issued as the follo6in% e:ampleC
C'55 s!bprog ,SI+6 777 yyy III

1assin* the &ata usin* CO//(<2(


$assin% of data from one pro%ram to another is achie3ed -y CO&&/28/ defined in 6or)in%1stora%e section. The recei3in% pro%ram 6ill recei3e the data in its lin)a%e sectionE under ."HCO&&/28/ &ay -e used in functions li)e 28T?2;7@CT474I;* The len%th of CO&&/28/ must -e specified in the 48;<TH parameter of the 4I;* or @CT4 command in the callin% pro%ram. The 48;<TH parameter must -e defined as a half16ord -inary field'S,'!( CO&$(. The ma:imum len%th 6hich can -e specified is 6#E#36 -ytes. Called pro%ram 6ill recei3e data in 4I;*/<8 S8CTIO; Called pro%ram can find len%th of data passed usin% the 8IB field 8IBC/48; If no data is passed then 8IBC/48; L If data is passed then 8IBC/48; L 4en%th of CO&&/28/

3,

Customer Information Control System (CICS)

:sin* CO//(<2( in +seu&o,con)ersational cycle

Previous Execu io!


I.8;TI"IC/TIO; .I>ISIO;. 8;>I2O;&8;T .I>ISIO;. ./T/ .I>ISIO;. AO2*I;<1STO2/<8 S8CTIO;. 1 AS1CO&&1/28/. 4I;*/<8 S8CTIO;. 1 ."HCO&&/28/. $2OC8.?28 .I>ISIO;

Curre! Execu io!


I.8;TI"IC/TIO; .I>ISIO;. 8;>I2O;&8;T .I>ISIO;. ./T/ .I>ISIO;. AO2*I;<1STO2/<8 S8CTIO;. 1 AS1CO&&1/28/. 4I;*/<8 S8CTIO;. 1 ."HCO&&/28/. $2OC8.?28 .I>ISIO;

Temp. Stora%e /rea

(g. @.1: -F.COMM'2(' ,sage

Customer Information Control System (CICS)


Chapter 6

CICS CO1A 'OO7S


2Bec Interface 'loc6 (2I') In 3in6a*e Section
*eeps record of system related information. "or e:ample tas) num-erE terminal idE dateE time etc. One 8IB is created per tas). 8IB for a tas) contains information a-out the tas)E 6hich is initiated. Copy of ."H8IB4* as 8IB is automatically included in lin)a%e section of application pro%ram durin% translation. $ro%ram can only access data usin% 8IB field names. ?ser should not update data in 8IB fields.

Some of the 8IB fields areC 8IB/I. Contains the attention identifier '/I.( associated 6ith the last input operation. 8IBC/48; Contains the len%th of the communication area passed to the application pro%ram. 8IBC$OS; Contains the cursor address 'position( associated 6ith B&S 8IB./T8 Contains the date the tas) is started. "ormatC

99... pic s,'+( comp13

8IBTI&8 Contains the time at 6hich the tas) is started. "ormatC HH&&SS pic s,'+( comp13 8IB.S Contains the sym-olic identifier of the dataset referred to in a file control re=uest 8IB2CO.8 Contains the CICS response code returned after the function re=uested -y the tas) has -een completed

!1

Customer Information Control System (CICS)


8IB280I. Contains the re=uest identifier assi%ned to an inter3al control command -y CICS 8IB28S$ Contains a -inary num-er correspondin% to the condition that has -een raised. "or e:ample 111T82I.8227131;OT";.71#1.?$*89 8IBT2&I. Contains the sym-olic terminal identifier associated 6ith the tas). 8IBT2;I. Contains the sym-olic transaction identifier of the tas). 8IBT/S*; Contains the tas) num-er assi%ned to the tas) -y CICS

Stan&ar& (ttribute 'yte 3ist


D.0'/SC(
Co!s "! s -F.BMP(M -F.BMP+5 -F.BM'S= -F.BM,+P -F.BM,++ -F.BMP2O -F.BMP2/ -F.BM-'2 -F.BMFS( -F.BMP2F -F.BM'SF -F.BM'SB 888888888 888888888 Me"!i!# Printer en 8o*8message Printer neJ line '!to8SHip ,nprotecte ,nprotecte 1 n!m Protecte Bright -arH M-T set Protecte an M-T set '!to8SHip 1 M-T set '!to8SHip 1 bright

(g.#.1: -F.MSC' Constants

!2

Customer Information Control System (CICS)

Installation Define&
"1 Fiel 8'ttrib!te8.efinition. # "/C1?;$2OT # "/C1?;$2OT1&.T # "/C1?;$2OT1B2T # "/C1?;$2OT1B2T1&.T # "/C1?;$2OT1./2* # "/C1?;$2OT1./2*1&.T # "/C1?;$2OT1;?& # "/C1?;$2OT1;?&1&.T # "/C1?;$2OT1;?&1B2T # "/C1?;$2OT1;?&1B2T1&.T # "/C1?;$2OT1;?&1./2* # "/C1?;$2OT1;?&1./2*1&.T # "/C1$2OT # "/C1$2OT1&.T # "/C1$2OT1B2T # "/C1$2OT1B2T1&.T # "/C1$2OT1./2* # "/C1$2OT1./2*1&.T # "/C1$2OT1S*I$ # "/C1$2OT1S*I$1&.T # "/C1$2OT1S*I$1B2T # "/C1$2OT1S*I$1B2T1&.T # "/C1$2OT1S*I$1./2* # "/C1$2OT1S*I$1./2*1&.T $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ $IC @ >/4?8 R R. >/4?8 R/R. >/4?8 RHR. >/4?8 RIR. >/4?8 RSR. >/4?8 R'R. >/4?8 R5R. >/4?8 RFR. >/4?8 R0R. >/4?8 R2R. >/4?8 RTR. >/4?8 R(R. >/4?8 R1R. >/4?8 R7R. >/4?8 R9R. >/4?8 RMR. >/4?8 RUR. >/4?8 RVR. >/4?8 R R. >/4?8 R#R. >/4?8 R8R. >/4?8 R,R. >/4?8 RWR. >/4?8 0?OT8.

(g.#.2: Installation -e*ine 'ttrib!te Constants

Installation Define& /essa*e .ile


"1 KS8M(SS'6(S. "@ KS8F'T'58(22O28MS6 "@ KS8+O2M'58(4IT8MS6 "@ KS8I+V'5I-8=(/8MS6 "@ KS8+OT8,+IF,(8MS6 "@ KS8IT(M8+OT8F+-8MS6 "@ KS8I+V'5I-8FT/8MS6 "@ KS8-,P82(C8MS6 "@ KS86(+(2'58(228MS6 "@ KS8S,CC(SS8MS6 "@ KS8T2'+8C'+C(58MS6 "@ KS8I+V'5I-8-'T(8MS6 "@ KS82(CO2-8(228MS6 "@ KS8+OT8STOC=8MS6 PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& PIC 4%)"& V'5,( L/O, C'+ O+5/ ST'2T F2OM M+M,L. V'5,( LS(SSIO+ (+-S .'V( ' +IC( -'/L. V'5,( LI+V'5I- 'I- =(/ P2(SS(-L. V'5,( LISS,( +OT( +O (4ISTI+6L. V'5,( LIT(M +OT FO,+-L. V'5,( LI+V'5I- F,'+TIT/ (+T(2(-L. V'5,( L-,P5IC'T( 2(CO2-L. V'5,( L(22O2 I+ .I6.5I6.T(- FI(5-SL. V'5,( L2(CO2- S,CC(SSF,55/ '--(-L. V'5,( LT2'+S'CTIO+ C'+C(55(-L. V'5,( LI+V'5I- -'T(L. V'5,( L(22O2 : 2(CO2- +OT FO,+-L. V'5,( LIT(M +OT I+ STOC=L.

(g.#.): Installation -e*ine Message File

!3

Customer Information Control System (CICS)

(ttention I&entifier ((ID)


/ttention Identifier '/I.( indicates 6hich method the terminal operator has used to initiate the transfer of information from the terminal de3ice to CICS. /I. )eys areC $" )eysE $/ )eysE 8;T82 )eyE and C48/2 )ey. The 8IB/I. field in 8IB contains the /I. code of the most recently used /I.. ThereforeE the 8IB/I. field can -e tested after each Terminal Control 'or B&S( input operation CICS pro3ides the standard /I. list in a form of copy li-rary mem-er '."H/I.(E so that a pro%ram can use this list -y specifyin% in the pro%ramC
COP/ -F.'I-

The ."H/I. mem-er contains such /I. codes asC ."H8;T82C 8;T82 )ey ."HC48/2C C48/2 )ey ."H$/113C $/1 to $/3 )eys ."H$"112!C $"1 to $"2! )eys The follo6in% is an e:ample of usin% /I. information in a pro%ramC
IF (IB'I- 0 -F.PF) P(2FO2M 21""8(+-82O,TI+( (5S( IF (IB'I- 0 -F.P'1 P(2FO2M 22""8C'+C(582O,TI+( (5S( IF (IB'I- 0 -F.(+T(2 P(2FO2M 2)""8+O2M'582O,TI+( (5S( P(2FO2M 2>""8K2O+682O,TI+(.

(g.#.>: ,sing 'I- In*ormation In 'pplication Program

!!

Customer Information Control System (CICS)

Chapter +

(++lication 1ro*ram 0ouse6ee+in*


2Bce+tional Con&itions
/n a-normal situation durin% e:ecution of a CICS command is called an He:ceptional conditionI. Chec)in% e:ceptional conditions is similar to chec)in% return codes after e:ecutin% COBO4 input7output statements in non1CICS pro%rams. It is stron%ly recommended to chec) e:ceptional conditions for e3ery CICS commands. 8ach CICS command has its o6n set of possi-le e:ceptional conditions

Comman& Co&e an& <es+onse Co&e


The CICS command e:ecuted last is sho6n in a system field 8IB";E 6hile the response code for the last CICS command is sho6n in another system field 8IB2CO.8. The e:ceptional condition is nothin% -ut the interpretation of the response code in the 8IB2CO.8 field -ased on the command code in the 8IB"; field.

('2CD Co&es
If an e:ceptional condition occurs durin% e:ecution of a CICS application pro%ramE and if pro%ram does not chec) the e:ceptional conditionE CICS 6ill -y default terminates the tas). This )ind of termination is )no6n as a-normal termination and CICS 6ill issue the a-normal termination '/B8;.( codeE 6hich is associated 6ith the e:ceptional condition on su-Dect. 8:ceptional conditions can -e handled usin% any of the follo6in%C H/;.48 CO;.ITIO; command I<;O28 CO;.ITIO; command ;OH/;.48 option

!#

Customer Information Control System (CICS)

0(CD32 COCDITIOC Comman&


.unction The H/;.48 CO;.ITIO; command is used to transfer control to the procedure la-el specified if the e:ceptional condition specified occurs. Once a H/;.48 CO;.ITIO; command re=uest has -een madeE it remains acti3e until the end of the pro%ram or another H/;.48 CO;.ITIO; re=uest o3errides it. In order to a3oid the confusion o3er 6hich H/;.48 CO;.ITIO; re=uest is acti3eE it is stron%ly recommended that a H/;.48 CO;.ITIO; re=uest al6ays -e paired 6ith a CICS command The H/;.48 CO;.ITIO; re=uest is effecti3e only 6ithin the pro%ramE 6hich issues the H/;.48 CO;.ITIO; command. That isE if the control is passed to another pro%ramE the H/;.48 CO;.ITIO; re=uest in the callin% pro%ram 6ill no lon%er -e honored in the called pro%ram. .ormat The format of the H/;.48 CO;.ITIO; command is as follo6sC
(4(C CICS .'+-5( CO+-ITIO+ con ition%label& ; con ition%label&< ;(22O2%label&< (+-8(4(C. (g.$.1: Format O* .'+-5( CO+-ITIO+ Comman

The HconditionI represents an e:ceptional condition. If a la-el is specifiedE control 6ill -e passed to the la-eled para%raph of the pro%ram 6hen the condition specified occurs. If no la-el is specifiedE it has the effect of cancelin% the pre3iously set H/;.48 CO;.ITIO; re=uest and the default action 6ill -e ta)en. The %eneral error condition '822O2( can -e specified 6ithin the same list to specify that all other conditions cause control to -e passed to the la-el specified. /lthou%h more than one H/;.48 CO;.ITIO; command can -e issued in the pro%ramE not more than 16 conditions can -e specified in a sin%le H/;.48 CO;.ITIO; command. 2Bam+le
211"82(C(IV(8C.OIC( S(CTIO+. (4(C CICS .'+-5( CO+-ITIO+

!6

Customer Information Control System (CICS)


M'PF'I5%211"8M'P8F'I5& (+-8(4(C. (4(C CICS 2(C(IV( M'PS(T%LM(+,M'PL& M'P%LM(+,M'PL& I+TO%M(+,M'PI& (+-8(4(C. 6O TO 211"8(4IT. 211"8M'P8F'I5. MOV( LM'P F'I5 S(SSIO+ (+-(-L TO KS8(+-8S(SSIO+8M(SS'6(. MOV( L/L TO KS8(+-8S(SSIO+. 211"8(4IT. (4IT. (g.$.2: (7ample O* .'+-5( CO+-ITIO+ Comman

I9CO<2 COCDITIOC Comman&


.unction The I<;O28 CO;.ITIO; command causes no action to -e ta)en if the condition specified occurs in the pro%ram. That isE control 6ill -e returned to the ne:t instruction follo6in% the commandE 6hich encountered the e:ceptional condition. The re=uest -y the I<;O28 CO;.ITIO; command is 3alid until the su-se=uent H/;.48 CO;.ITIO; command for the same condition. .ormat
(4(C CICS I6+O2( CO+-ITIO+ con ition ;con ition< (+-8(4(C. (g.$.): Format O* I6+O2( CO+-ITIO+ Comman

The HconditionI indicates an e:ceptional condition. ;o more than 16 conditions are allo6ed in the same command. 2Bam+le
(4(C CICS I6+O2( CO+-ITIO+ 5(+6(22 (+-8(4(C. (4(C CICS 2(C(IV( M'P%MM'P1B& M'PS(T%MM'P1B& I+TO%M'P1I& 5(+6T.%E"&

!+

Customer Information Control System (CICS)


(+-8(4(C. (g.$.>: (7ample O* I6+O2( CO+-ITIO+ Comman

CO0(CD32 O+tion
The ;OH/;.48 option can -e specified in any CICS commandE and it 6ill cause no action to -e ta)en for any e:ceptional condition occurrin% durin% e:ecution of this command. This option is 3ery useful to pre3ent a loop on the e:ceptional condition. Ho6e3erE this option should -e used for the special purpose onlyE -ecause the e:cessi3e use of this option defeats the purpose of the e:ceptional conditions and the H/;.48 CO;.ITIO; command. 2Bam+le
(4(C CICS S(+M'P%8888& M'PS(T%888888& F2OM%888888& 5(+6T.%888& +O.'+-5( (+-8(4(C.

(g.$.@: Format O* +O.'+-5(

<2S1 O+tion
The 28S$ option can -e specified in many CICS command. Its function is similar to the return code in the -atch pro%ram. If 28S$ option is specified in a commandE CICS places a response code at a completion of the command. The application pro%ram can chec) this codeE then proceed to the ne:t processin%. If the 28S$ option is specified in a commandE the ;OH/;.48 option is applied to this command. ThereforeE the H/;.48 CO;.ITIO; re=uests 6ill ha3e no effect in this case. The follo6in% are the procedures to utiliGe the 28S$ option in a CICS commandC 1. define a full6ord -inary field 'S,'8( CO&$( in the Aor)in% Stora%e Section as the response field. 2. $lace the 28S$ option 6ith the response field in a command 'any CICS command(. 3. /fter command e:ecutionE chec) the response code in the response field 6ith ."H28S$'::::(E 6here :::: isC 1. ;O2&/4 for normal completion. 2. /ny e:ceptional condition. 2Bam+leD

!8

Customer Information Control System (CICS)


(4(C CICS 2(C(IV( M'P%8888& M'PS(T%888888& I+TO%888888& 5(+6T.%888& +O.'+-5( 2(SP%KS82(SP8FI(5-& (+-8(4(C. IF KS82(SP8FI(5- 0 -F.2(SP%+O2M'5& 88888888888 (5S( IF KS82(SP8FI(5- 0 -F.2(SP%M'PF'I5& 88888888888 (g.$.#: (7ample O* 2(SP3 +O.'+-5(

CoteD ?se of 28S$ implies ;OH/;.48 ;OH/;.48 o3errides H/;.48 CO;.ITIO; and H/;.48 /I.. Hence $" )ey responses mi%ht -e i%nored if used 6ith 28C8I>8 command. ;OH/;.48 also suspends e:ecution till the specified resources -ecome a3aila-le 'e.%.C TS07T.0 etc.(.

0(CD32 (ID Comman&


.unction The H/;.48 /I. command is used to specify the la-el 'i.e.E para%raph name( to 6hich control is to -e passed 6hen the specified /I. is recei3ed. /fter the completion of any terminal input commands such as 28C8I>8 commandE control 6ill -e passed to the specified para%raph in the pro%ram. This is one 6ay of su-stitutin% the 8IB/I. chec)in% approach. /I. )eys are $/ )eysE $" )eysE 8;T82 and C48/2 )ey. C48/2 and any of the $/ )eys do not transmit data. .ormat
(4(C CICS .'+-5( 'IOption%label& (+-8(4(C. (g.$.$: Format O* .'+-5( 'I- Comman

Ahere Hla-elI is the para%raph name of the pro%ram to 6hich control is to -e passed. ?se of /I. )ey is detected -y 28C8I>8 &/$ command.

!,

Customer Information Control System (CICS)


H/;.48 /I. has hi%her precedence than H/;.48 CO;.ITIO;. ?p to 16 options can to can -e coded in one H/;.48 /I.

Commonly use& O+tions /ny )ey name '$/1 to $/3E $"1 to $"2!E 8;T82E C48/2( /;9*89 '/ny of the a-o3e e:cept 8;T82 )ey(

Customer Information Control System (CICS)


2Bam+le
(4(C CICS .'+-5( 'IPF)%21""8(+-82O,TI+(& P'1%21""8C'+C(582O,TI+(& (+T(2%21""8+O2M'582O,TI+(& '+/=(/%21""8K2O+68=(/82O,TI+(& (+-8(4(C. (4(C CICS 2(C(IV( M'P%MM'P1B& M'PS(T%MM'P1B& I+TO %M'P1I& 5(+6T.%KS8M'P85(+6T.& (+-8(4(C. (g.$.E: (7ample O* .'+-5( 'I- Comman

2Bam+le 'Sho6in% disad3anta%e of usin% H/;.48 /I. command(


21""82(C(IV(8M'P S(CTIO+. (4(C CICS .'+-5( CO+-ITIO+ M'PF'I5%21""8M'PF'I582O,TI+(& (+-8(4(C. (4(C CICS .'+-5( 'IPF)%21""8(+-82O,TI+(& P'1%21""8C'+C(582O,TI+(& (+T(2%21""8+O2M'582O,TI+(& '+/=(/%21""8K2O+68=(/82O,TI+(& (+-8(4(C. (4(C CICS 2(C(IV( M'P%MM'P1B& M'PS(T%MM'P1B& I+TO %M'P1I& 5(+6T.%KS8M'P85(+6T.& (+-8(4(C. 21""8M'PF'I582O,TI+(. 888888888 21""8+O2M'582O,TI+(. 888888888 .. .. 21"""8(4IT. (4IT.

(g.$.D: -isa Cantage O* .'+-5( 'I- Comman

#1

Customer Information Control System (CICS)

2I'(ID
The 32+ terminal transmits the /I. character to the 8IB/I. field of 8IBE at the time of tas) initiation. 8IB/I. can -e used to find 6hich /I. *ey has -een pressed -y user CICS copy -oo) ."H/I. fields are used to identify the )ey pressed I" 8IB/I. L ."H/I.'8;T82( O2 I" 8IB/I. L ."H8;T82 8IB/I. 3alue can -e chec)ed e3en 6ithout recei3in% map.

#2

Customer Information Control System (CICS)


Chapter 8

'/S 1ro*rammin* Consi&erations


Dynamic (ttribute Character (ssi*nment
CICS pro3ides the standard attri-ute character list '."HB&SC/( in the form of a CO$94IB mem-er. This list co3ers 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 Section of the application pro%ram throu%h the CO$9 statement as follo6sC
COP/ -F.BMSC'.

"ollo6in% are some useful standard attri-ute characters in ."HB&SC/C ."HB&/S*C ."HB&"S8C ."H?;;?&C ."H?;I&.C ."H?;I;TC /uto1s)ip ?nprotectedE &.T on ?nprotectedE &.T onE numeric ?nprotectedE hi%h intensityE &.T on ?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 6ish to hi%hli%ht the field indicatin% an error in a field. This can -e accomplished -y dynamically assi%nin% a ne6 attri-ute character for the field on su-Dect. "or the dynamic attri-ute character assi%nmentE you place the predefined attri-ute character to the fieldnameX/ of the field to 6hich you 6ish to dynamically assi%n the attri-ute character. The attri-ute character to -e dynamically assi%ned must -e chosen 3ery carefully -ased on the re=uirement and the characteristics of the field 'e.%.E alphanumeric or numeric(. Ahen the map is sent throu%h S8;. &/$ commandE the ne6 attri-ute 6ill -e in effect on the field on su-DectE o3erridin% the ori%inal attri-ute defined at the map definition time.

#3

Customer Information Control System (CICS)

2Bam+le
KO2=I+68STO2'6( S(CTIO+. 8888888 COP/ LM'PS(T'L. 8888888 COP/ L-F.BMSC'L. 8888888 P2OC(-,2( -IVISIO+. 8888888 MOV( -F.BMB2/ TO C,ST+O8'. MOV( -F.-MP2O TO C,ST+'M(8'. MOV( -F.-MP2O 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 Cal!e assignment

Cursor 1ositionin* Techni-ues


$lacin% a cursor in a particular position of a screen is sometimes 3ery useful in order to ma)e the system user1friendlier. There are three approaches to cursor positionin%.

Static Cursor 1ositionin*


In this approachE you define a cursor position in a map -y placin% YICB in the /TT2B parameter of the ."H&." macro for a particular field. Ahen the map is sentE the cursor 6ill appear in this field. If there 6ere more than one field '."H&." macro( 6ith IC specified in one map '."H&.I macro(E the last IC 6ould -e honored. The follo6in% is an e:ample of the static cursor positionin%C
-F.M-F POS0%)31#&3 'TT2B0%,+P2OT3 FS(T3 IC& 5(+6T.0E (.g. E.2: Static C!rsor Positioning

Dynamic4Symbolic Cursor 1ositionin*


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 6here you 6ish to place the cursor. The S8;. &/$ command #!

Customer Information Control System (CICS)


to -e issued must ha3e the C?2SO2 option '6ithout 3alue(. /lsoE the mapset must -e coded 6ith &O.8LI;O?T in the ."H&S. macro. ThenE at the completion of the S8;. &/$ commandE the map 6ill -e displayed 6ith the cursor at the position dynamically specified in the application pro%ramE irrespecti3e of the static cursor position defined in the map definition time. The follo6in% is an e:ample of dynamic7sym-olic cursor positionin%C
MOV( N1 TO C.OIC(5. (4(C CICS S(+- M'P%MM'P1B& M'PS(T%MM'P1B& C,2SO2 (2'S( (+-8(4(C. (.g. E.): Symbolic C!rsor Positioning

Dynamic4<elati)e 1ositionin*
In this approachE you dynamically position a cursor throu%h an application pro%ram usin% the C?2SO2'data13alue( option in the S8;. &/$ command 6ith the 3alue of the relati3e position 'startin% from Gero( of the terminal. /t the completion of the S8;. &/$ commandE the map 6ill -e displayed 6ith the cursor at the specified positionE o3erridin% the static cursor position defined at the map definition time. .ata13alue is calculated asC 'ro6 K 1 ( T 8 X 'column 1 1( The follo6in% is an e:ample of the dynamic72elati3e cursor positionin%C
(4(C CICS S(+M'P%888888& M'PS(T%8888888& C,2SO2%1""& (2'S( (+-8(4(C. (.g. E.>: 2elatiCe C!rsor Positioning

/lthou%h this approach ma)es the application pro%ram a-le to position the cursor dynamicallyE since the relati3e position of the terminal is de3ice dependentE this approach is de3ice dependent and format dependent. Ahene3er the terminal type is chan%ed or the screen layout is chan%edE the application pro%ram 6ill ha3e to -e modified to reflect the chan%e. This lessens the pro%ram maintaina-ility.

##

Customer Information Control System (CICS)


Chapter ,

Terminal Control O+erations


Intro&uction This chapter 6ill discuss ho6 B&S maps are used in the application pro%ram for the actual terminal input7output operationsE 6hich are performed -y a set of CICS commands for B&S. .unctions The CICS commands for B&S perform the follo6in% three -asic functionsC 1. Map Sending Function ?sin% the data in the sym-olic mapE B&S prepares the output ;ati3e &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 6ithout usin% a map and sends to the terminal.

'pplication Program %S(+- M'P&

Symbolic Map

BMS

O!tp!t +M-S

Terminal

Physical Map

-ata (ntry

'pplication Program %2(C(IV( M'P&

Symbolic Map

BMS

Inp!t +M-S

Terminal

Fig.D.1: Concept o* BMS operations

The follo6in% commands are a3aila-le for the -asic B&S input7output operationsC 28C8I>8 &/$ S8;. &/$ 28C8I>8 S8;. T8@T C C C C "ormatted data transfer. To recei3e a map "ormatted data transfer. To send a map ?nformatted data transfer. To recei3e a te:t ?nformatted data transfer. To send a te:t #6

Customer Information Control System (CICS)

<2C2IV2 /(1 Comman& (.ormatte& Data Transfer)


.unction The 28C8I>8 &/$ command is used to recei3e a map from a terminal. /t the completion of the commandE the sym-olic map of the specified map 6ill contain the 3alid data from the terminal in the follo6in% 3 fields per each field defined -y the ."H&." macroC "ieldnameX4C The len%th fieldE 6hich contains actual num-er of characters typed in the screen "ieldnameX"C The fla% -yte fieldE 6hich is normally @B B. It 6ill -e @B8 B if the screen field has -een modified -ut cleared. "ieldnameXIC The actual input data field. .ormat
(4(C CICS 2(C(IV( M'P %map name& M'PS(T%map name& I+TO% ata8area& (+-8(4(C. (.g. D.2: Format O* 2(C(IV( M'P Comman

&/$ defines the name of the mapE 6hich 6as defined in the correspondin% ."H&.I macro. &/$S8T defines the name of the mapset 6hich 6as defined in the correspondin% ."H&S. macro. If nothin% else is specifiedE the I;TO option is assumedE and B&S automatically finds the sym-olic map area to place the data from the terminal. This command 6hen e:ecuted 6ill place all modified data items in the sym-olic 6or) area. Common 2Bce+tional Con&ition &/$"/I4 This occurs If the data to -e mapped has the len%th of Gero. If user presses the 8;T82 'or any /I. )ey( 6ithout typin% data if no "S8T is specified in ."H&." macros. If map is recei3ed -y pressin% C48/2 or any of the $/ )eys.

#+

Customer Information Control System (CICS)

Data Vali&ity Chec6in*


/fter the completion of the 28C8I>8 &/$ commandE the data from the terminal are placed in the fields of the sym-olic map. Ho6e3er you cannot assume that all data in the sym-olic map are 3alidE since B&S has nothin% to do 6ith the =uality of data contents in the fields 6hich 6ere entered -y the terminal user. ThereforeE you must 3alidate the data in each field -efore you use it. One of the online systemBs ad3anta%es is its capa-ility of realtime 'i.e.E instant( data 3alidation and feed-ac) to the user. ThereforeE you should perform data 3alidity chec)in% as thorou%hly as possi-le ri%ht after the 28C8I>8 &/$ command. 1roce&ures The follo6in% is a set of procedures for the effecti3e data 3alidity chec)in% after the completion of the 28C8I>8 &/$ commandC 1. $erform the data 3alidity chec)in% in detail as soon as the pro%ram recei3es data from the terminal. 2. Chec) the fieldnameX4C 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 positi3e 3alueE some data of that len%th has -een entered. Therefore 3alidate the field data in the fieldnameXI. 3. /lternati3elyE chec) directly the fieldnameXIC a. If it is 4OA1>/4?8S or S$/C8E no data has -een entered or space )ey has -een pressed. ThereforeE ta)e the default actionE or consider an error if it is the re=uired field. -. If it is not 4OA1>/4?8 or spaceE some data has -een entered. TherforeE 3alidate the field data in the fieldnameXI. c. ;ote that CICS considers spaces as data. ThereforeE space may -e 3alid dataE dependin% on the application specifications. !. If an error is detectedE prepare an error messa%e. "or thisE each map should ha3e the error messa%e fields. #. .o not stop 3alidity chec)in% at the first error detection. <o to the ne:t field for another 3alidation. 6. 2epeat this until all data fields ha3e -een 3erified. +. /t completion of the data 3alidationE if here are errorsE send error messa%e's( to the terminal for the user to correct them and reenter.

#8

Customer Information Control System (CICS)

S2CD /(1 Comman& ( .ormatte& Data Transfer)


.unction The S8;. &/$ command is used to send a map to a terminal. Before issuin% this commandE the application pro%ram must prepare the data in the sym-olic map of the map to -e sentE 6hich has the follo6in% three fields per each field defined -y the ."H&." macroC fieldnameX4C The len%th fieldE to 6hich the application pro%ram does not ha3e to prepare the data e:cept for the dynamic cursor positionin%. fieldnameX/C The attri-ute character filedE to 6hich the application pro%ram does not ha3e to prepare the data e:cept for the dynamic attri-ute character assi%nement. fieldnameXOC The actual output data fieldE to 6hich 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(& ;F2OM%-'T'8'2('&< ;C,2SO2OC,2SO2%-'T'8V'5,(&< ;(2'S(O(2'S(',P< ;F2((=B< ;'5'2M< ;F2S(T< ;-'T'O+5/OM'PO+5/< (+-8(4(C. (g.D.): Format O* S(+- Comman

&/$ .efines the name of the map defined in the correspondin% ."H&.I macro. &/$S8T .efines the name of the mapset defined in the correspondin% ."H&S. macro. "2O& 83en if not specifiedE this option is assumedE and B&S automatically finds the sym-olic map area to ta)e the data to the terminal.

#,

Customer Information Control System (CICS)

C?2SO2 &a)es the application pro%ram a-le to position the cursor dynamically on any part of the screen. 82/S8 If this is specifiedE the current screen 6ill -e erased -efore the map specified appears on the screen. If this is not specifiedE the map specified 6ill -e o3er6ritten onto the current screen. ThereforeE dou-le ima%e screen mi%ht appearE 6hich may -e useful for sendin% error messa%es into the current screenE -ecause the current screen 6ill -e )ept as it is. 82/S8/?$ To erase all unprotected fields. The protected fields or attri-ute fields remain as they are in the current screen. "288*B To free the )ey-oard. /4/2& To ma)e an alarm sound. "2S8T To reset &.T to Gero 'i.e.E not modified( for all unprotected fields of the screen. ./T/O;49 Only application pro%ram data in the sym-olic map is to -e sent to the terminal. &/$O;49 Only the default data from the physical map is to -e sent to the terminal. PIf the a-o3e t6o options are not %i3enE data from -oth the maps is sent to the terminal.Q 2Bam+le
KO2=I+68STO2'6( S(CTIO+. 8888888 COP/ M'P'. 8888888 P2OC(-,2( -IVISIO+ 88888888 (4(C CICS .'+-5( CO+-ITIO+ I+VMPS? %BI68M'P& (+- (4(C. 8888888 (4(C CICS S(+- M'P%LM'P'L& M'PS(T %LM'P'L& F2OM %M'P'I& (+-8(4(C. 88888888888888

Customer Information Control System (CICS)

BI68M'P P(22O2 P2OC(SSI+6

(g.D.>: (7ample O* S(+- Comman

61

Customer Information Control System (CICS)

<2C2IV2 Comman& (:nformatte& Data Transfer)


.unction The command is used to recei3e an unformatted messa%e from the terminal. In this data transfer maps are not in3ol3ed. .ormat
(4(C CICS 2(C(IV( I+TO%-'T'8'2('& 5(+6T.%-'T'8V'5,(& (+-8(4(C. (g.D.@: Format O* 2(C(IV( Comman

2Bam+le
I-(+TIFIC'TIO+ -IVISIO+. 8888 KO2=I+68STO2'6( S(CTIO+. "1 MS685(+6T. PIC SD%>& COMP. "1 I+P,T8MS6. "2 T2'+S8IPIC 4%>&. "2 FI55(2 PIC 4%1&. "2 M(SS'6( PIC 4%@&. 8888 P2OC(-,2( -IVISIO+. MOV( 1" TO MS685(+6T. (4(C CICS .'+-5( CO+-ITIO+ 5(+6(22 %5(+6T.8(22O282T& (+-8(4(C 88888 (4(C CICS 2(C(IV( I+TO %I+P,T8MS6& 5(+6T. %MS685(+6T.& (+-8(4(C 8888 5(+6T.8(22O282T.
88888

(g.D.#: (7ample O* 2(C(IV( Comman

62

Customer Information Control System (CICS)

63

Customer Information Control System (CICS)

S2CD T2ET Comman& (:nformatte& Data Transfer)


.unction The command is used to send unformatted messa%e 'i.e.E data 6ithout any maps(. This messa%e 6ill al6ays %et displayed at ro6 1E column 1 position on the screen. .ormat
(4(C CICS S(+- T(4T F2OM% ata8area& 5(+6T.% ata8Cal!e& ;(2'S(< F2((=B< (+-8(4(C. (g.D.$: Format O* S(+- T(4T Comman

2Bam+le
I-(+TIFIC'TIO+ -IVISIO+. 8888 KO2=I+68STO2'6( S(CTIO+. O,TP,T8M(SS'6(. 88888 "1 KS8M(SS'6( PIC 4%)"& Val!e Spaces P2O(-,2( -IVISIO+. 8888888 MOV( L(+- OF S(SSIO+L TO KS8M(SS'6(. (4(C CICS S(+- T(4T F2OM %KS8M(SS'6(& 5(+6T. %)"& (2'S( F2((=B (+-8(4(C. 8888888888

(g.D.E: (7ample O* S(+- T(4T Comman

6!

Customer Information Control System (CICS)


Chapter 1

Inter)al Control O+erations


Intro&uction The CICS Inter3al Control $ro%ram pro3ides application pro%ram 6ith time1controlled functionsE such as the time1oriented tas) synchroniGationE pro3idin% current date and timeE and automatic initiation of the time1ordered tas)s.

(S7TI/2 Comman&
.unction The /S*TI&8 command is used to re=uest the current date and time. The 8IB./T8 and 8IBTI&8 fields ha3e the 3alues at the tas) initiation time. ?p on completion of this commandE these fields 6ill -e updated to ha3e the current date and time. .ormat
(4(C CICS 'S=TIM( ;'BSTIM(% ata8area&< (+-8(4(C. (g.1".1: Format O* 'S=TIM( Comman

/BSTI&8 option is re=uired if you 6ant to store current date and time for further processin%. Aithout this option /S*TI&8 6ill Dust update 8IB./T8 and 8IBTI&8 field. The data1area is defined in Aor)in%1Stora%e Section 6ith picture clause of S,'1#( CO&$. Hdata1areaI after the e:ecution %ets the 3alue in milliseconds.

6#

Customer Information Control System (CICS)

.O</(TTI/2 Comman&
.unction The "O2&/TTI&8 command is used to recei3e the information of date and time in 3arious formats. .ormat
(4(C CICS FO2M'TTIM( 'BSTIM(% ata8area& ;//---% ata8area&< ;//MM--% ata8area&< ;//--MM% ata8area&< ;MM--//% ata8area&< ;--MM//% ata8area&< ;-'T(S(P% ata8Cal!e&< ;-'/OFK((=% ata8area&< ;-'/OFMO+T.% ata8area&< ;MO+T.OF/('2% ata8area&< ;/('2% ata8area&< ;TIM(% ata8area& ;TIM(S(P% ata8Cal!e&<< (+-8(4(C.

(g.1".2: Format O* FO2M'TTIM( Comman

Hdata1areaI for date and time are defined as @' 8(. Time separator -y default is HCI and date separator -y default is H7I'for this specify TI&8S8$ and ./T8S8$ options 6ithout ar%ument(. If these t6o options are omittedE no separator is pro3ided.

66

Customer Information Control System (CICS)


Chapter 11

1ro*ram Control O+erations


Intro&uction The CICS $ro%ram Control $ro%ram '$C$( %o3erns a flo6 of control amon% CICS application pro%rams and CICS itself. The name of a CICS application pro%ram must -e re%istered in the $rocessin% $ro%ram Ta-le '$$T(E other6ise the pro%ram 6ill not -e reco%niGed -y CICS. The follo6in% commands are a3aila-le for the $ro%ram Control ser3icesC 28T?2; To return to the ne:t hi%her1le3el pro%ram or CICS. 4I;* To pass control to another pro%ram at the lo6er le3elE e:pectin% to -e returned. @CT4 To pass control to another pro%ram at the same le3elE not e:pectin% to returned. 4O/. To load a pro%ram. 2848/S8 To release a loaded pro%ram.

(++lication 1ro*ram 3e)els


The application pro%rams under CICS run at 3arious lo%ical le3elsE as illustrated in "i%ure 11.!. The first CICS application pro%ram to recei3e control from CICS 6ithin a tas) runs at the hi%hest lo%ical le3el 1. / 4I;*ed pro%ram runs at the ne:t lo6er lo%ical le3el from the 4I;*in% pro%ramE 6hile a @CT4Bed pro%ram runs at the same lo%ical le3el as the @CT4Bin% pro%ram. The 28T?2; command al6ays passes control -ac) to the pro%ram at one lo%ical le3el hi%her.

6+

Customer Information Control System (CICS)

<2T:<C Comman&
.unction The 28T?2; command is used to return control to the ne:t hi%her lo%ical le3elE or CICS itself. .ormat
(4(C CICS 2(T,2+ ;T2'+SI-%name& ;COMM'2('% ata8area& 5(+6T.% ata8Cal!e&<<< (+-8(4(C. (.g.11.1: Format O* 2(T,2+ Comman

If none of T2/;SI.E CO&&/28/E or 48;<TH is specifiedE and if CO&&/28/ had -een passed -y a callin% pro%ramE the 28T?2; command ma)es the data in CO&&/28/ a3aila-le to the callin% pro%ram. That isE the called pro%ram does not ha3e to use the CO&&/28/ option in the 28T?2; command. If the T2/;SI. option is usedE the specified transaction identifier 6ill -e the transaction identifier for the ne:t pro%ram to -e associated 6ith the terminal. . This is allo6ed only in the pro%ram at the hi%hest lo%ical le3el. If the T2/;SI. option is specifiedE the CO&&/28/ and 48;<TH option can -e used to pass data to the ne:t tas)

3IC7 an& ECT3 Comman&


.unction of 3IC7 Comman& The 4I;* command is used to pass control from an application pro%ram at one lo%ical le3el to another application at the ne:t lo6er lo%ical le3el. The callin% pro%ram e:pects control to -e returned to it. The control is returned at the ne:t sentence 6hen called pro%ram completes e:ecution.
Program ' 5I+= Program B 2(T,2+ .igher 5ogical 5eCel 5oJer 5ogical 5eCel Fig.11.1: 5I+= comman

68

Customer Information Control System (CICS)

.ormat
(4(C CICS 5I+= P2O62'M%name& ;COMM'2('% ata8area&< ;5(+6T.% ata8Cal!e&< (+-8(4(C. (.g.11.2: Format O* 5I+= Comman

The name of the called pro%ram to 6hich control is passed must -e specified in $2O<2/&. .unction of ECT3 comman& The @CT4 command is used to pass control from one application pro%ram to another application pro%ram at the same lo%ical le3el. The callin% pro%ram does not e:pect control to -e returned. .ata can -e passed to the pro%ram throu%h a special communication area called CO&&/28/. Since this command re=uires less o3erheadE performance is relati3ely -etter in comparison to the 4I;* command.
CICS 5ogical 5eCel %"& Prog B 5I+= C 2(T,2+ Prog C 4CT5 2(T,2+ Prog 5I+= 77 2(T,2+ %2& %1&

Prog ' 4CT5 B 2(T,2+

Fig. 11.2: 'pplication Program logical leCels

6,

Customer Information Control System (CICS)


.ormat
(4(C CICS 4CT5 P2O62'M%name& ;COMM'2('% ata8area&< ;5(+6T.% ata8Cal!e&< (+-8(4(C. (.g.11.): Format O* 4CT5 Comman

2Bam+le Of 3IC7
PCo e in ProgramBMen!B (4(C CICS .'+-5( CO+-ITIO+ P6MI-(22%>"""8P6M8+OT8F+-& (22O2%>"""86(+(2'58(22O2& (+-8(4(C. (4(C CICS 5I+= P2O62'M%MFI5(8M'I+TB& COMM'2('%KS8COMM8'2('& 5(+6T.%2"& (+-8(4(C. PCo e in Prorgram MFI5(8M'I+TB (4(C CICS 2(T,2+ (+-8(4(C. TaHes control bacH in MMen!B program

(.g.11.> 5I+= (7ample

2Bam+le Of ECT3
PCo e in ProgramBMen!B (4(C CICS .'+-5( CO+-ITIO+ P6MI-(22%>"""8P6M8+OT8F+-& (22O2%>"""86(+(2'58(22O2& (+-8(4(C. (4(C CICS 4CT5 P2O62'M%MFI5(8M'I+TB& COMM'2('%KS8COMM8'2('& 5(+6T.%2"& (+-8(4(C. PCo e in Prorgram MFI5(8M'I+TB (4(C CICS 2(T,2+ (+-8(4(C.

TaHes control bacH to CICS

(.g.11.@: 4CT5 (7ample

Customer Information Control System (CICS)


Common 2Bce+tional Con&itions The follo6in% are the e:ceptional conditions common to -oth 4I;* and @CT4 commandC ;OT/?THC / resource security chec) has failed. $<&I.822C The pro%ram specified is not found in $$T. Data 1assin* Throu*h CO//(<2( .ata can -e passed to a called pro%ram usin% the CO&&/28/ option of the 4I;* or @CT4 command in a callin% pro%ram. In case of the 4I;* the called pro%ram may alter the data content of CO&&/28/ and the chan%es 6ill -e a3aila-le to the callin% pro%ram after the 28T?2; command is issued in the called pro%ram. This implies that the called pro%ram does not ha3e to specify the CO&&/28/ option in the 28T?2; command. If the CO&&/28/ is used in the callin% pro%ramE the area must -e defined in the Aor)in% Stora%e Section of the pro%ramE 6hereasE in the called pro%ramE the area must -e defined as the first area in the 4in)a%e SectionE usin% the reser3ed name ."HCO&&/28/. The len%th of the CO&&/28/ must -e specified in the 48;<TH parameter of the 4I;* or @CT4 command in the callin% pro%ram. The 48;<TH parameter must -e defined as a half6ord -inary field 'S,' !( CO&$(. The ma:imum len%th 6hich can -e specified is 6#E#36 -ytes. 8IBC/48; determines 6hether the callin% pro%ram sent CO&&/28/. If 8IBC/48; is %reater than E CO&&/28/ 6as sent. This should al6ays -e chec)ed. ECT3 )s. 3IC7 ECT3 Callin% pro%ram is released from the main memory Control is transferred to the same lo%ical le3el 2eturn can to CICS or to the application pro%ram CO&&/28/ option can -e used to pass data to the in3o)ed pro%ram 3IC7 Callin% pro%ram is not released from the main memory Control in transferred to the lo6er lo%ical le3el 2eturn is al6ays to the application pro%ram CO&&/28/ option is not re=uired in 28T?2; -ecause the in3o)ed pro%ram does pass pointer to the communication area of the callin% pro%ram.

Table 11.1: 4CT5 Cs. 5I+=

+1

Customer Information Control System (CICS)


Chapter 12

.ile Control O+erations (<an&om (ccess)


The CICS "ile Control $ro%ram '"C$( pro3ides application pro%rams 6ith ser3ices to readE updateE addE and delete records in a file. In additionE it ma)es application pro%rams independent of the structure of the data-aseE 6hile it mana%es e:clusi3e control o3er the records in order to maintain the data inte%rity durin% record updates. Su++orte& (ccess /etho&s CICS "ile Control supports the >S/& and B./& data access methodsE of 6hich >S/& is the primary data access method under CICS. There are three types of >S/& fileE all of 6hich are supported -y CICS. These are as follo6sC *ey1Se=uenced .ataset '*S.S( 8ntry1Se=uenced .ataset '8S.S( 2elati3e12ecord .ataset '22.S(

()ailable Comman&s "or random access of >S/& dataset follo6in% commands are a3aila-leC 28/.C A2IT8C 28A2IT8C .848T8C ?;4OC*C To read a record directly To ne6ly 6rite a record To update an e:istin% record To delete a record To release e:clusi3e control ac=uired for update.

S+ecial Ser)ices Of .ile Control


Data In&e+en&ence .ata independence is a concept of a pro%ram -ein% independent of the structure of data-ase or the data access methods. The CICS file Control pro3ides data independence to application pro%ramE so that the application pro%rammer does not ha3e to -e concern 6ith such data1dependent COBO4 parameters or FC4 asC I;$?T1O?T$?T S8CTIO; S848CT Statement ". Statement O$8;7C4OS8 FC4

+2

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 6hile application pro%rammer codes application pro%ram usin% CICS commands. In this 6ayE it is almost transparent to the application pro%rammer 6hich data access method is -ein% used. 2Bclusi)e Control Durin* :+&ates If a tas) is updatin% a recordE the other tas)s must -e e:cluded from updatin% the recordJ other6ise data content 6ill -e updated incorrectly. This control is called e:clusi3e control o3er the resources durin% updates. This is important -ecause in the CICS en3ironmentE many tas)s mi%ht -e concurrently accessin% the same file 'possi-ly the same record(. CICS loc)s the entire control inter3al 6here 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 'C8&T( -efore you initiate an application pro%ram 6hich uses this file.

<2(D Comman& :sin* .ull 7ey


.unction The 28/. command 6ith the I;TO option usin% the full )ey of a record is used to read a specific record specified -y the full )ey. The data content of the record 6ill -e mo3ed into the specified field defined in the Aor)in% Stora%e section of the pro%ram. .ormat
(4(C CICS 2('-'T'S(T%name& I+TO% ata8area& 2I-F5-% ata8area& 5(+6T.% ata8Cal!e& (+-8(4(C. (.g.12.1: Format O* M2('- Jith F!ll =eyB Comman

This is the -asic format for the 28/. command. /s the othe roptions are introducedE the format 6ill 3ary sli%htly.

+3

Customer Information Control System (CICS)


./T/S8T names the fileE 6hich you 6ish to read. The file name specified must -e defined in "CT. I;TO names the field in the Aor)in% Stora%e Section to 6hich the record content is to -e placed. 2I."4. is used to specify the )ey fieldE 6hich identifies the record to -e read. 48;<TH indicates the ma:imum len%th of the record to -e read. This is optionalE if it is specifiedE at the completion of the commandE CICS 6ill place the actual len%th of the record into the 48;<TH field. 2Bam+le
(+VI2O+M(+T -IVISIO+. -'T' -IVISIO+. KO2=I+68STO2'6( S(CTIO+ "1 5(+ PIC SD%">& COMP V'5,( 2@. "1 2(CO2-8=(/ PIC 4%"@& V'5,( L'"""1L. "1 FI5(8'2('. "2 2(C8=(/ PIC 4%"@&. "2 2(C8-(SC PIC 4%2"&. P2OC(-,2( -IVISIO+. 2@""82('- S(CTIO+. (4(C CICS .'+-5( CO+-ITIO+ 5(+6(22 %2@""85(+6(22& +OTF+- %2@""8+OTF+-& (22O2 %2@""8OT.(2& (+-8(4(C. (4(C CICS 2('I+TO %FI5(8'2('& -'T'S(T %LM'ST(2L& 2I-F5- %2(CO2-8=(/& 5(+6T. %5(+& (+-8(4(C. 2@""85(+6(22 P (rror processing %the recor rea is longer than n!mber o* bytes speci*ie in length *iel %len&& 888888 2@""8+OTF+P (rror processing %recor Jith speci*ie Hey is not in the ata set& 8888888 2@""8OT.(2 P (rror processing %other error has occ!rre & 8888888

(.g. 12.2: (7ample O* M2('- Jith F!ll =eyB Comman

CICS 6ill read the record Y/ 1B and place the data in the I;TO field '"I481 /28/(. The actual record len%th 6ill -e placed in 48;.

+!

Customer Information Control System (CICS)


Common 2Bce+tional Con&itions .?$*89 The duplicate record is found in the specified )ey 'In case of /lternate 2ecord *ey(. The first record in the fileE 6hich has that )eyE 6ill -e read. If you 6ant to read other records of the same )eyE you ha3e to use the Bro6se operation ;OT";. ;o record 6ith the )ey specified is found. 48;<822 The specified len%th is shorter than the actual record len%th. The record 6ill -e truncated at the len%th specified and mo3ed into the I;TO field. The actual len%th 6ill -e placed in the 48;<TH field. ;OTO$8; The file specified is not open.

<2(D Comman& =ith 92C2<IC O+tion


.unction The 28/. command 6ith the <8;82IC option is used to read a nonspecific record -ased on the %eneric )ey 'i.e. a partial )ey( specifiedE instead of the full )ey. This is useful 6hen you do not )no6 the complete information of the )ey. .ormat The format of the 28/. command 6ith the <8;82IC option usin% the I;TO option is sho6n in the e:ample -elo6. "or this optionE in addition to specifyin% e:plicitly <8;82IC as the optionE the len%th of the %eneric )ey must -e specified in the *8948;<TH field. The format related to the other options or parameters remains the same. 2Bam+le
MOV( )@ TO K=85(+. MOV( M+/B TO 2(C8'8=(/. (4(C CICS 2('-'T'S(T%MFI5(2B& I+TO%FI5(8O'2('& 2I-F5-%2(C8'8=(/& =(/5(+6T.%2& 6(+(2IC 5(+6T.%K=85(+&

+#

Customer Information Control System (CICS)


(+-8(4(C. (.g. 12.): (7ample O* M2('- Jith generic =eyB Comman

+6

Customer Information Control System (CICS)

2Becution <esults Suppose that file "I482 has records in the follo6in% orderC BC .C .C ;9 ;9 ;9 $H $H 1 1 1 T 1 2 1 2 ( 6ill -e readE -ecause this is the first record of the %eneric )ey

ThenE the record ';9 H;9I.

Common 2Bce+tional Con&itions ;OT";. ;o record 6ith the )ey specified is found. 48;<822 The specified len%th is shorter than the actual record len%th. The record 6ill -e truncated at the len%th specified and mo3ed into the I;TO field. The actual len%th 6ill -e placed in the 48;<TH field I;>280 The )eylen%th specified is %reater than the actual )eylen%th of the record.

<2(D Comman& =ith 9T2; O+tion


.unction The 28/. command 6ith the <T80 option is used to read a nonspecific record 6hose )ey is e=ual to or %reater than the full )ey data specified. This is useful 6hen you )no6 the full )eyE -ut you are not sure that the )ey e:ists in the file. .ormat The format of the 28/. command 6ith the <T80 option usin% the I;TO option is sho6n in the e:ample -elo6.

++

Customer Information Control System (CICS)


2Bam+le
MOV( )@ TO K=85(+. MOV( M+/"")B TO 2(C8=(/. 0m!st be a *!ll Hey (4(C CICS 2('-'T'S(T%MFI5(2B& I+TO%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& 6T(F 5(+6T.%K=85(+& (+-8(4(C. (.g. 12.>: (7ample O* M2('- Jith 6T(F optionB Comman

<2(D4:1D(T2 an& <2><IT2 Comman&s


.unction / com-ination of the 28/. command 6ith the ?$./T8 option and the 28A2IT8 command is used to update a record. Bet6een these t6o commandsE e:clusi3e control o3er the record 6ill -e maintained for this tas)E so that no other tas)s can access this record for updates. .ormat The format of the 28/. command 6ith the ?$./T8 option is sho6n in the e:ample -elo6. "or this optionE ?$./T8 must -e e:plicitly specified as the option. The format of the 28A2IT8 command is also sho6n in the e:ample -elo6. ./T/S8T must name the same file read -y the prior 28/.7?$./T8 command. The "2O& data area must -e the same record area used -y the 28/.7?$./T8 command. 48;<TH indicates the len%th of the ne6 record. 2Bam+le
MOV( )@ TO K=85(+. MOV( M+/""1B TO 2(C8'8=(/. (4(C CICS 2('-'T'S(T%MFI5(2B& I+TO%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& ,P-'T( 5(+6T.%K=85(+& (+-8(4(C. Set o* MOV( StatementsQQQ (4(C CICS 2(K2IT( -'T'S(T%MFI5(2B& F2OM%FI5(8IO'2('& 5(+6T.%K=85(+& (+-8(4(C.

0rea *or !p ating

(.g. 12.@: (7ample O* M2('-O,P-'T( an 2(K2IT(B Comman

+8

Customer Information Control System (CICS)

2Becution <esults /t the completion of the 28/.7?$./T8 commandE record ;9 1 6ill -e read and reser3ed for the su-se=uent update. That isE e:clusi3e control o3er the record is maintained for this tas). /t the completion of the 28A2IT8 commandE the same record ;9 1 6ill -e re6ritten and the record 6ill -e released from e:clusi3e control.

2Bce+tional Con&itions I;>280 The 28A2IT8 command is issued 6ithout a prior 28/. command 6ith the ?$./T8 option.

:C3OC7 Comman&
.unction The 28/. command 6ith the ?$./T8 option normally maintains e:clusi3e control o3er the record read untilC The record is updated -y the 28A2IT8 command. The transaction is normally or a-normally completed.

Ho6e3erE there are occasions 6hen after readin% a record throu%h the 28/. command 6ith the ?$./T8 option. It is found that the update is no lon%er re=uired or if the 28A2IT8 command itself fails the e:ecution. In this caseE the application pro%ram should release e:clusi3e 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:clusi3e control from the record. .ormat The format of the ?;4OC* command is sho6n in the e:ample -elo6. ./T/S8T names the file from 6hich e:clusi3e control is to -e released. 2Bam+le
(4(C CICS ,+5OC= -'T'S(T%MFI5(2B& (+-8(4(C.

+,

Customer Information Control System (CICS)

(.g. 12.#: (7ample O* M,+5OC=B Comman

Customer Information Control System (CICS)

><IT2 Comman&
.unction The A2IT8 command is used to 6rite a record directly into a file -ased on the )ey specified. .ormat
(4(C CICS K2IT( -'T'S(T%name& F2OM% ata8area& 5(+6T.% ata8Cal!e& 2I-F5-% ata8area& (+-8(4(C. (.g. 12.$: Format O* MK2IT(B Comman

2Bam+le
MOV( )@ TO K=85(+. MOV( M+/"">B TO 2(C8'8=(/. MoCe symbolic map *iel s to the recor areaQQ (4(C CICS K2IT( -'T'S(T%MFI5(2B& F2OM%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& 5(+6T.%K=85(+& (+-8(4(C. (.g. 12.E: (7ample O* MK2IT(B Comman

2Bce+tional Con&itions .?$28C The duplicate record is found. ;OS$/C8 ;o dis) space is a3aila-le for the record addition. 48;<822 The len%th specified is %reater than the ma:imum len%th specified in the >S/& cluster.

81

Customer Information Control System (CICS) ><IT2 Comman& =ith /(SSICS2<T O+tion
.unction The A2IT8 command 6ith the &/SSI;S82T option is used to add a %roup of records 6hose )eys are in ascendin% order into a file. If there are many records to -e added as a %roupE this option 6ill pro3ide hi%h performance in 6ritin% these records. Since the &/SSI;S82T option causes e:clusi3e control o3er the fileE the file must -e released -y the ?;4OC* command after the completion of the A2IT8 command. 1roce&ures The follo6in% are the procedures for the mass1insert operations usin% the A2IT8 command 6ith the &/SSI;S82T optionC 1. 2. 3. !. #. 8sta-lish the first record )ey. Issue the A2IT8 command 6ith the &/SSI;S82T option. Increment the )ey in the ascendin% order. repeat steps 2 and 3 until all records ha3e -een 6ritten. Issue the ?;4O/* command to release the e:clusi3e control o3er the file.

.ormat The format of the A2IT8 command 6ith the &/SSI;S82T option is sho6n in the e:ample -elo6. 2Bam+le
P2OC(-,2( -IVISIO+ QQ.. MOV( MT4"""B TO 2(C8'8=(/B. M'SS8I+S85OOP S(CTIO+. '-- 1 TO 2(C8'8=(/8S(F. QQ. %Prepare the recor content& QQ. (4(C CICS K2IT( -'T'S(T%MFI5(2B& F2OM%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& 5(+6T.%K=85(+& M'SSI+S(2T (+-8(4(C. IF 2(C8'8S(F R DD 6O TO M'SS8I+S85OOP. (4(C CICS ,+5OC=

-'T'S(T%MFI5(2B& (+-8(4(C.

82

Customer Information Control System (CICS)


(.g. 12.D: (7ample O* MK2IT( Jith M'SSI+S(2TB Comman

D232T2 Comman&
.unction The .848T8 command is used to delete one record or a %roup of records from a file. There are three approaches to usin% the .848T8 command. D232T2 after <2(D4:1D(T2 (++roach In this approachE the .848T8 command is used 6ithout the record )ey information after the 28/. command 6ith the ?$./T8 option has -een completed. The record 6hich 6as read -y the 28/.7?$./T8 command 6ill -e deleted from the file. .ormat The format of the .848T8 command in this approach is sho6n in the e:ample -elo6. The only parameter re=uired is ./T/S8TE 6hich must name the same file used -y the prior 28/.7?$./T8 commandC 2Bam+le
MOV( )@ TO K=85(+. MOV( M+/""1B TO 2(C8'8=(/. (4(C CICS 2('-'T'S(T%MFI5(2B& I+TO%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& ,P-'T( 5(+6T.%K=85(+& (+-8(4(C. QQ (4(C CICS -(5(T( -'T'S(T%MFI5(2B& (+-8(4(C.

(.g. 12.1": (7ample O* M-(5(T( a*ter 2('-O,P-'T(B Comman

2Bce+tional Con&ition I;>280 The .848T8 command 6ithout the 2I."4. option is issued 6ithout a prior 28/.7?$./T8 command. Direct D232T2 (++roach

83

Customer Information Control System (CICS)


In this approachE the .848T8 command is issued 6ith the full )ey information in the 2I."4. field. The record specified 6ill -e directly deleted from the file.

.ormat The format of the .848T8 command in this approach is sho6n in the e:ample sho6n -elo6. ./T/S8T must name the file from 6hich a record is to -e deleted. In additionE the full )ey data must -e pro3ided in the 2I."4. field for the record to -e deleted. 2Bam+le
MOV( M+/""1B TO 2(C8=(/. (4(C CICS -(5(T( -'T'S(T %MFI5(2B& 2I-F5-%2(C8'8=(/& (+-8(4(C.

0 reS!ire

(.g. 12.11: (7ample O* M-irect -(5(T( %Jitho!t prior 2('-O,P-'T(&B Comman

2Bce+tional Con&itions .?$*89 There is more than one record 6ith same )ey. 'In the case of /lt. Inde:( ;OT";. The record specified is not found. 9rou+ <ecor& D232T2 (++roach In this approachE the .848T8 command is issued 6ith the <8;82IC option. / %roup of recordsE 6hich satisfy the %eneric )ey specifiedE 6ill -e deleted from the file. .ormat The format of the .848T8 command in this approach is sho6n in the e:ample sho6n -elo6. In addition to the re=uired parameter for the direct deleteE <8;82IC must -e specified as the option. The *8948;<TH indicates the len%th of the %eneric )ey. The hi%her part of the )ey information must -e supplied in the 2I."4. field. / half16ord -inary field 'S,'!( CO&$( should -e pro3ided to ;?&28CE 6hich 6ill contain the num-er of the records deleted -y this %eneric delete. 2Bam+le
P2OC(-,2( -IVISIO+. Q.. MOV( M+/B TO 2(8'8=(/. (4(C CICS -(5(T(

8!

Customer Information Control System (CICS)


-'T'S(T%MFI5(2B& 2I-F5-%M2(C8'8=(/B& =(/5(+6T.%2& 6(+(2IC +,M2(C%K=8-(58CO,+T& (+-8(4(C. (.g. 12.12: (7ample O* M6ro!p -(5(T(B Comman

Chapter 13

.ile Control O+erations (Se-. (ccess)


?nder CICS any of >S/&7*S.SE >S/&78S.SE and >S/&722.S can -e accessed randomly as 6ell as se=uentially. ()ailable Comman&s Se=uential access of >S/& file under CICS is called H-ro6sin%IE for 6hich the follo6in% commands are a3aila-leC ST/2TB2 28/.;8@T 28/.$28> 28S8TB2 8;.B2 C To esta-lish a position for a -ro6se operation. C To read a ne:t record 'for6ard( C To read a pre3ious record '-ac)6ard( C To reesta-lish another position for a ne6 -ro6se. C To complete a -ro6se operation.

ST(<T'< Comman&
.unction The ST/2TB2 command is used to esta-lish a -ro6se startin% position for a file. This command is for esta-lishin% the position only. The actual record 6ill -e read -y the ne:t read command '28/.;8@T or 28/.$28>(. .ormat
(4(C CICS ST'2TB2 -'T'S(T%name& 2I-F5-% ata8area& 6T(FO(F,'5 ;=(/5(+6T.% ata8area& 6(+(2IC< 2B'O22+ (+-8(4(C (.g. 1).1: Format O* MST'2TB2B Comman

8#

Customer Information Control System (CICS)

86

Customer Information Control System (CICS)

2Bam+le
KO2=I+68STO2'6( S(CTIO+. $$ K=85(+ "1 FI5(8IO'2('. "@ 2(C8'8=(/. 1" 2(C8'8=(/8CIT/ 1" 2(C8'8=(/8S(F "@ 2(C8'8-(T'I5 P2OC(-,2( -IVISIO+. : : MOV( M+/"""B TO 2(8'8=(/. (4(C CICS ST'2TB2 -'T'S(T %MFI5(2B& 2I-F5-%2(C8'8=(/& 6T(F (+-8(4(C.

PIC SD%>& COMP. PIC 44. PIC DDD. PIC 4%)"&.

0 e*a!lt

(.g. 1).2: (7ample O* MST'2TB2B Comman

2Becution <esults Suppose the file has the records in the follo6in% orderC B .C .C ;9 ;9 ;9 $H $H 1 1 2 1 2 3 1 2

LThenE -ro6se startin% position is set here ';9

1(.

2Bce+tional Con&itions .SI.822 The file specified is not found in "CT. ;OT";. The specified record is not found.

8+

Customer Information Control System (CICS)

<2(DC2ET Comman&
.unction The 28/.;8@T command is used to read a record of a file se=uentially for6ard. The ST/2TB2 must ha3e -een successfully completed prior to issuin% the 28/.;8@T command. .ormat
(4(C CICS 2('-+(4T -'T'S(T%name& I+TO% ata8area& 5(+6T.% ata8Cal!e& 2I-F5-% ata8area& 2B'O22+ (+-8(4(C. (.g. 1).): Format O* M2('-+(4TB Comman

2Bam+le
KO2=I+68STO2'6( S(CTIO+. $$ K=85(+ "1 FI5(8IO'2('. "@ 2(C8'8=(/. 1" 2(C8'8=(/8CIT/ 1" 2(C8'8=(/8S(F "@ 2(C8'8-(T'I5 P2OC(-,2( -IVISIO+. : : MOV( M+/"""B TO 2(8'8=(/. (4(C CICS ST'2TB2 -'T'S(T %MFI5(2B& 2I-F5-%2(C8'8=(/& 6T(F (+-8(4(C.

PIC SD%>& COMP. PIC 44. PIC DDD. PIC 4%)"&.

0 e*a!lt

MOV( )@ TO K=85(+. (4(C CICS 2('-+(4T -'T'S(T%MFI5(2B& I+TO%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& 0 reS!ire 5(+6T.%K=85(+& (+-8(4(C. (.g. 1).>: (7ample O* M2('-+(4TB Comman

88

Customer Information Control System (CICS)

2Becution <esults /t the completion of the pro%ram lo%icE the follo6in% actions 6ill occurC / record 6ill actually -e read into the I;TO area. That isE the record ;9 1 6ill -e placed in "I481IO/28/. CICS 6ill place the actual )ey into the 2I."4. area '28C1/1*89(. CICS 6ill place the actual record len%th into the 48;<TH area 'A*148;(. If the same 28/.;8@T command is issued a%ainE the record ;9 2 6ill -e readJ that isE the record 6ill -e read for6ard.

2Bce+tional Con&itions .?$*89 The )ey of the record is a duplicate of the ne:t recordBs )ey. 8;."I48 The end of the file is detected. 48;<822 The actual record len%th is %reater than the len%th specified.

<2(D1<2V Comman&
.unction The 28/.$28> command is used to read a record of a file -ac)6ard. The ST/2TB2 command must ha3e -een successfully completed prior to issuin% the 28/.$28> command. .ormat The format of the 28/.$28> command is sho6n in the e:ample -elo6. The options and parameters are the same as the 28/.;8@T command.

8,

Customer Information Control System (CICS)

2Bam+le
KO2=I+68STO2'6( S(CTIO+. $$ K=85(+ "1 FI5(8IO'2('. "@ 2(C8'8=(/. 1" 2(C8'8=(/8CIT/ 1" 2(C8'8=(/8S(F "@ 2(C8'8-(T'I5 P2OC(-,2( -IVISIO+. : : MOV( M+/"""B TO 2(8'8=(/. (4(C CICS ST'2TB2 -'T'S(T %MFI5(2B& 2I-F5-%2(C8'8=(/& 6T(F (+-8(4(C.

PIC SD%>& COMP. PIC 44. PIC DDD. PIC 4%)"&.

0 e*a!lt

MOV( )@ TO K=85(+. (4(C CICS 2('-P2(V -'T'S(T%MFI5(2B& I+TO%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& 0 reS!ire 5(+6T.%K=85(+& (+-8(4(C.

(.g. 1).@: (7ample O* M2('-P2(VB Comman

2Becution <esults /t the completion of this pro%ram lo%icE the follo6in% actions 6ill occurC 8:actly the same results of 28/.;8@T can -e applied. If the same 28/.$28> command is issued a%ainE the record .C read. That isE the record 6ill -e read -ac)6ard.

2 6ill -e

2Bce+tional Con&itions The e:ceptional condition common to the 28/.$28> command includes the same conditions mentioned in the 28/.;8@T command. In additionE the follo6in% conditions should -e 6atchedC ;OT";. The record positioned -y the ST/2TB2 command or the 28S8TB2 command is not found. The ST/2TB2 or 28S8TB2 command prior to the 28/.$28> command must specify an e:istin% record as the start )ey. Other6iseE at the 28/.$28> timeE the

Customer Information Control System (CICS)


;OT";. condition 6ill occurE in 6hich case the -ro6se operation must -e terminated -y the 8;.B2 command or reset -y the 28S8TB2 command. I;>280 The <8;82IC option must not -e used in the ST/2TB2 command prior to the 28/.$28> command. NoteC Better option to use 28/.;8@T after ST/2TB2 to a3oid ;OT";. e:ceptional condition. Because e3en if the specified record is not e:istin%E 28/.;8@T 6ill read ne:t record in se=uence.

S+ecial Techni-ues .or Se-uential <ea&


There are a fe6 special techni=ues for se=uential read. These are 3ery usefulE practicalE and con3enient techni=ues in the actual CICS application pro%rammin%. S6i+ Se-uential <ea& The techni=ue of s)ip se=uential read is used to s)ip records 6hile continuin% the -ro6se operation esta-lished -y the prior ST/2TB2 command. "or the 28/.;8@T commandE the ne6 )ey for s)ippin% must -e in the for6ard direction from the current record. SimilarlyE for the 28/.$28> commandE the ne6 )ey for s)ippin% must -e in the -ac)6ard direction from the current record. 2Bam+le
MOV( M+/""1B TO 2(C8'8=(/. (4(C CICS ST'2TB2 888888888 (+-8(4(C. : : MOV( )@ TO K=85(+. (4(C CICS 2('-+(4T 88888888 (+-8(4(C. : MOV( )@ TO K=85(+. (4(C CICS 2('-+(4T 88888888 (+-8(4(C : MOV( )@ TO K=85(+. MOV( MP."""B TO 2(C8'8=(/. (4(C CICS 2('-+(4T 88888888 (+-8(4(C.

0 2ecor +/""1 is positione .

0 2ecor +/""1 is rea into the *ile area.

0 2ecor +/""2 is rea into the *ile area.

0 Place a sHipping Hey 0 2ecor P.""" is rea into the *ile area.

(.g. 1).#: (7ample O* SHip SeS!ential Processing

,1

Customer Information Control System (CICS)

2Becution <esults 2ecord $H 6ill -e read 'that isE ;9 continued from there. Chan*in* Direction Of 'ro=se /fter the ST/2TB2 commandE the direction of -ro6se can -e chan%ed from for6ard to -ac)6ard -y simply s6itchin% the 28/.;8@T command to the 28/.$28> commandE or 3ice 3ersa. Ho6e3erE the first 28/.$28> 'or 28/.;8@T( command after the direction chan%e 6ill read the same record as the last 28/.;8@T 'or 28/.$28>E respecti3ely( commandE as illustrated -elo6C
ST/2TB228/.;8@T28/.;8@T28/.;8@T28/.$28>28/.$28>

3 6ill -e s)ipped(E and se=uential read can -e

'rec1(

'rec2(

'rec3(

'rec3( Chan%e of .irection

'rec2(

<2S2T'< Comman&
.unction The 28S8TB2 command is used to reesta-lish another startin% point 6ithin the same -ro6se operation a%ainst the same file. The 28S8TB2 command performs e:actly the same function as the ST/2TB2 commandE e:cept that reposition is much faster -ecause the file is already in the -ro6se mode -y the prior ST/2TB2 command. That is 6ithout issuin% the 8;.B2 command. The 28S8TB2 command ma)es it possi-le to reposition the dataset for a ne6 -ro6se operation. Similar to the ST/2TB2 commandE the 28S8TB2 command does repositionin% only. The actual record read 6ill -e done -y the ne:t 28/.;8@T or 28/.$28> command. The 28S8TB2 command can also -e used for chan%in% the characteristics of -ro6seE for e:ampleE from %eneric )ey positionin% to full )ey positionin%E or 3ice 3ersa. .ormat The format of the 28S8TB2 command is sho6n in the e:ample -elo6. The options and parameters are the same as the ST/2TB2 command.

,2

Customer Information Control System (CICS)

2Bam+le
KO2=I+68STO2'6( S(CTIO+. $$ K=85(+ "1 FI5(8IO'2('. "@ 2(C8'8=(/. 1" 2(C8'8=(/8CIT/ 1" 2(C8'8=(/8S(F "@ 2(C8'8-(T'I5 P2OC(-,2( -IVISIO+. : : MOV( M+/"""B TO 2(8'8=(/. (4(C CICS ST'2TB2 -'T'S(T %MFI5(2B& 2I-F5-%2(C8'8=(/& 6T(F (+-8(4(C.

PIC SD%>& COMP. PIC 44. PIC DDD. PIC 4%)"&.

0 e*a!lt

MOV( )@ TO K=85(+. (4(C CICS 2('-+(4T -'T'S(T%MFI5(2B& I+TO%FI5(8IO'2('& 2I-F5-%2(C8'8=(/& 0 reS!ire 5(+6T.%K=85(+& (+-8(4(C. PP6o *or 2('-+(4T !ntil Hey matchesQ. PP2eset the Hey (4(C CICS 2(S(TB2 -'T'S(T%MFI5(2B& 2I-F5-%2(C8'8=(/& (F,'5 (+-8(4(C. : : (.g. 1).$: (7ample O* M2(S(TB2B Comman

2Bce+tional Con&itions I;>280 The 28S8TB2 command is issued 6ithout the prior ST/2TB2 command.

2CD'< Comman&
.unction /t the physical end1of file 'no record e:ists physically further( or lo%ical end1of file 'no rele3ant record e:ists further(E the -ro6se operation must -e terminated. The 8;.B2

,3

Customer Information Control System (CICS)


command performs this function. That isE 8;.B2 command is used to terminate the -ro6se operation 6hich 6as initiated -y the prior ST/2TB2 command. .ormat The format of the 8;.B2 command is sho6n in the e:ample -elo6. The only re=uired parameter is ./T/S8TE 6hich must name the file to 6hich you 6ish to terminate the -ro6se operation. 2Bam+le
(4(C CICS (+-B2 -'T'S(T%MFI5(2B& (+-8(4(C. (.g. 1).E: (7ample O* M(+-B2B Comman

/ulti+le 'ro=se O+erations


The multiple -ro6se operations are used to perform se3eral concurrent -rose operations a%ainst the same file. One -ro6se operation is to -e identified -y the 280I. parameter in the -ro6se commands. /s sho6n in the e:ample -elo6E for multiple -rose operationsE all -ro6se commands 'ST/2TB2E 28/.;8@TE 28/.$28>E 28S8TB2E 8;.B2( must ha3e the 280I. parameter to identify to 6hich -ro6se operation %roup the command -elon%s. The other parameters and options of each -ro6se command remain the same as the case of the sin%le -ro6se operation. Once 280I. is esta-lishedE 6ithin the same 280I. %roupE the -ro6se operation can -e performed in any 6ay as you 6ishE independently from the other 280I. %roup. 2Bam+le
POP(2'TIO+ %1& MOV( M+/"""B TO 2(C8'8=(/1. (4(C CICS ST'2TB2 -'T'S(T%MFI5(2B& 2(FI-%1& 2I-F5-%2(C8'8=(/1& 6T(F (+-8(4(C. P POP(2'TIO+%2& MOV( M-C""2B TO 2(C8'8=(/2. (.g. 1).D: (7ample O* M!ltiple broJse

,!

Customer Information Control System (CICS)


(4(C CICS ST'2TB2 -'T'S(T%MFI5(2B& 2(FI-%2& 2I-F5-%2(C8'8=(/2& 6T(F (+-8(4(C. P POP(2'TIO+ %)& MOV( MB""""B TO 2(C8'8=(/). (4(C CICS ST'2TB2 -'T'S(T%MFI5(2B& 2(FI-%1& 2I-F5-%2(C8'8=(/)& 6T(F (+-8(4(C. P POP(2'TIO+ %1& MOV( )@ TO K=85(+1 (4(C CICS 2('-+(4T -'T'S(T%MFI5(2B& 2(-FI-%1& I+TO%FI5(8IO'2('1& 2I-F5-%2(C8'8=(/1& 5(+6T.%K=85(+1& (+-8(4(C. P P OP(2'TIO+ %2& MOV( )@ TO K=85(+2 (4(C CICS 2('-+(4T -'T'S(T%MFI5(2B& 2(-FI-%2& I+TO%FI5(8IO'2('2& 2I-F5-%2(C8'8=(/2& 5(+6T.%K=85(+2& (+-8(4(C. P P OP(2'TIO+ %)& MOV( )@ TO K=85(+) (4(C CICS 2('-+(4T -'T'S(T%MFI5(2B& 2(-FI-%)& I+TO%FI5(8IO'2(')& 2I-F5-%2(C8'8=(/)& 5(+6T.%K=85(+)& (+-8(4(C. (.g. 1).D: (7ample O* M!ltiple BroJse ContB

2Becution <esult "or operation 1C ;9 6ill -e read "or operation 2C .C 1 6ill -e read "or operation 3C B 6ill -e read

,#

Customer Information Control System (CICS)


Chapter 1!

Tem+orary Stora*e Control


Intro&uction The CICS Temporary Stora%e Control $ro%ram 'TS$( pro3ides the application pro%ram 6ith an a-ility to store and retrie3e the data in a Temporary Stora%e 0ueue 'TS0(. Typically TS0 is used for passin% of data amon% transactions. Characteristics of TS; / Temporary Stora%e 0ueue 'TS0( is a =ueue of stored records 'data(. It is created and deleted dynamically -y an application pro%ram 6ithout specifyin% anythin% in the CICS control ta-lesE as lon% as data reco3ery is not intended. ThereforeE the application pro%ram can use TS0 as a scratch pad memory facility for any purposes. / TS0 is identified -y the =ueue id '1 to8 -ytes(E and the relati3e position num-er called item num-er identifies a record 6ithin a TS0. The records in TS0E once 6rittenE remain accessi-le until the entire TS0 is e:plicitly deleted. The records in TS0 can -e read se=uentially or directly. /lso records in TS0 can -e updated. TS0 may -e 6ritten in the main stora%e or the au:iliary stora%e in the direct access de3ice. 2e%ardless of 6here TS0 residesE TS0 can -e accessed -y any transactionsE in the same CICS re%ion. The characteristics of TS0 descri-ed a-o3e are uni=ue to TS0 in comparison to the Transient .ata 0ueue 'T.0(.

Camin* Con)ention for TS; ;ueue I& / TS0 identified -y the =ueue id '1 to 8 -ytes( can -e accessed -y any transactions in the same CICS re%ion. This means that TS0 could -e accessed -y any of the follo6in% transactionsC Same transactionC o "rom same terminal o "rom different terminal .ifferent transactionC

,6

Customer Information Control System (CICS)


o "rom same terminal o "rom different terminal In order to a3oid confusion and to maintain data securityE a strict namin% con3ention for 0I. 6ill -e re=uired in the installation. The follo6in% is an e:ample of a 0I. namin% con3entionC "ormatC
6hereE

dtttann

dC ttttC aC nnC

.i3ision id 'e.%.E / for /ccountsE B for Bud%et( Terminal id /pplication code '/E -E CEO..( 0ueue num-er'1E 2E O..(

Terminal I& in ;ID "or a terminal dependent tas) 'e.%.E pseudo1con3ersational tas)(E the terminal id should -e included in 0I. in order to ensure the uni=ueness of TS0 to the tas). TS; in /(IC Stora*e or (:EI3I(<A Stora*e TS0 can -e 6ritten in the main stora%e. In this caseE accessin% TS0 is a fast and con3enient operation. But TS0 in this mode is not reco3era-le. &utually e:clusi3e to the TS0 in the main stora%eE TS0 can -e 6ritten in the au:iliary stora%e. The au:iliary stora%e is an e:ternal >S/& file '."HT8&$( esta-lished -y the system pro%rammer. It is al6ays a3aila-le to application pro%ramsE 6hich implies that no file open7close is re=uired. TS0 in this mode is reco3era-le. If you 6hich to reco3er TS0 in this modeE you must specify so in the Temporary Stora%e Ta-le 'TST(.

()ailable Comman&s A2IT80 TSC 28/.0 TSC .848T80 TSC To 6rite or re6rite a record in a TS0. To read a record in a TS0. To delete a TS0. /ll records in the TS0 6ill -e deleted.

,+

Customer Information Control System (CICS)

><IT2; Comman& (Co :+&ate)


.unction The A2IT80 TS command is used to 6rite a record 'item( in a TS0. .ormat The format of the A2IT80 TS command is sho6n in the e:ample -elo6. 0?8?8 names the =ueue id '0I.(. "2O& defines the area from 6hich data is to -e 6ritten. 48;<TH indicates the len%th of the record. / half 6ord -inary field 'S,'!( CO&$( should -e pro3ided to the item parameterE to 6hich CICS places the actual item num-er of the record 6ritten. &/I; indicates TS0 to -e 6ritten in the main stora%e 'not au:iliary stora%e(. 2Bam+le
(4(C CICS K2IT(F TS F,(,(%M'ttttM"1B& F2OM%TSF8-'T'& 5(+6T.%TSF85(+& IT(M%TSF8IT(M& M'I+ (+-8(4(C. (.g. 1>.1: (7ample O* K2IT(F TS Comman

2Becution <esults If TS0 6ith this 0I. does not e:istE a TS0 6ill -e created 6ith 0I.L/tttt& 1E 6here tttt is the terminal id. CICS 6ill 6rite a record in the TS0 identified -y the 0I.. CICS 6ill place the actual relati3e record num-er 'i.e.E item num-er( of the TS0 into TS0 KIT8&. 9ou may ha3e to remem-er this for later use if more than one record is in the TS0. If TS0 6ith this 0I. already e:istsE CICS 6ill simply 6rite a record in the e:istin% TS0 at the ne:t to the last e:istin% recordE and place the relati3e num-er of the record into TS01IT8&.

Common o+tions ;OS?S$8;.C 83en if the ;OS$/C8 condition is detectedE instead of suspendin% the tas)E CICS 6ill return control to the ne:t statement after the A2IT80 command.

,8

Customer Information Control System (CICS)


/?@I4I/29C &utually e:clusi3e to the &/I; option. If specifiedE the TS0 6ill -e 6ritten in the e:ternal >S/& file. 2Bce+tional Con&itions ;OS$/C8 Sufficient space is not a3aila-le. The default action is to suspend the tas) until space -ecomes a3aila-le.

<2(D; TS Comman& (Direct <ea&)


.unction The 28/.0 TS command is used to read a particular record 'item( of a particular TS0. .ormat The format of the 28/.0 TS command is sho6n in the e:ample -elo6. 0?8?8 names the =ueue id '0I.(. I;TO defines the area to 6hich the record data is to -e placed. 48;<TH indicates the len%th of the record to -e read. IT8& indicates the item num-er of the record to -e read. 2Bam+le
(4(C CICS 2('-F TS F,(,(%TSF8FI-& I+TO%TSF8-'T'& 5(+6T.%TSF85(+& IT(M%TSF8IT(M& (+-8(4(C. (.g. 1>.2: (7ample O* 2('-F TS Comman %-irect 2ea &

Commonly :se& O+tions ;?&IT8&SC If you 6ish to )no6 the num-er of items in the TS0E specify ;?&IT8&S 'data1area(E 6here the data1area is defined as $IC S,'!( CO&$. /t the completion of the 28/. commandE CICS 6ill place the actual num-er of records in the TS0 specified. ;8@TC &utually e:clusi3e to the IT8& optionE if the ;8@T option is specifiedE the tas) 6ill read the ne:t se=uential record in the TS0 specified.

,,

Customer Information Control System (CICS)

2Bce+tional Con&ition 0I.822 The specified 0I. is not found IT8&822 The specified item num-er is not found. If you are readin% TS0 se=uentiallyE this condition occurs at the end of the records of the TS0.

<2(D; TS Comman& (Se-uential <ea&)


.unction The 28/.0 TS command can -e used also for readin% all records se=uentially in the =ueue. But the se=uential read of TS0 should -e performed -ased on the pro%rammin% techni=uesE instead of the ;8@T option of the 28/.0 TS command. .ormat The format of the 28/.0 TS command for the se=uential read is the same as the case of the direct read. 2Bam+le
P(ST'B5IS. .'+-5( CO+-ITIO+. (4(C CICS .'+-5( CO+-ITIO+ IT(M(22%TSF8(OF& (22O2%SF8(22O2& (+-8(4(C. 5OOP. '-- 1 TO TSF8IT(M. MOV( 2"" TO TSF85(+. P2('- ' F,(,(. (4(C CICS 2('-F TS F,(,(%TSF8FI-& I+TO%TSF8-'T'& 5(+6T.%TSF85(+6T.& IT(M%TSF8IT(M& (+-8(4(C. : %P2OC(SS ' 2(CO2-& : 6O TO 5OOP. TSF8(OF. %(OF P2OC(SSI+6& : (.g. 1>.): (7ample O* 2('-F TS Comman %SeS!ential 2ea &

Customer Information Control System (CICS)


2Becution <esults /t the completion of each 28/.0 TS commandE the record 6ill -e se=uentially read one -y one -ased on the 3alue in TS01IT8&. Ahen there are no more records to readE the IT8&822 condition 'implyin% that end of TS0( 6ill -e detected throu%h the H/;.48 CO;.ITIO; commandE and control 6ill passed to TS018O".

Note: The se=uential read of TS0 should -e done throu%h this approach. This approach is -etter than specifyin% the ;8@T option in the 28/.0 TS commandE 6hich %i3es the application pro%ram the ne:t record to the current record read -y any CICS transaction. This means that if the ;8@T option is specified in the 28/.0 TS command instead of the item option for a TS0E and if other tas)s ha3e read se3eral records of the same TS0 after the last read -y this tas)E then this tas) 6ould read a s)ipped record 'i.e.E not ne:t to the record this tas) read last(. ThereforeE the ;8@T option should -e used 3ery carefullyE if you ha3e to use it.

><IT2; TS Comman& =ith <2><IT2 O+tion


.unction The A2IT80 Ts command 6ith 28A2IT8 option is used to re6rite a record 'item( of a TS0E 6hich has -een read. .ormat The A2IT80 TS command 6ith the 28A2IT8 option is sho6n in the e:ample -elo6. 28A2IT8 must -e e:plicitly specified as the option. Other options and parameters are the same as the case of the A2IT80 TS 6ithout update. 2Bam+le
(4(C CICS 2('-F TS F,(,(%TSF8FI-& I+TO%TSF8-'T'& 5(+6T.%TSF85(+& IT(M%TSF8IT(M& (+-8(4(C. : PProcess ata in TSF8-'T' :

1 1

Customer Information Control System (CICS)


(.g. 1>.>: (7ample O* K2IT(F TS Comman Jith 2(K2IT( Option (4(C CICS K2IT(F TS F,(,(%TSF8FI-& F2OM%TSF8-'T'& 5(+6T.%TSF85(+& IT(M%TSF8IT(M& 2(K2IT( M'I+ (+-8(4(C.

(.g. 1>.>: (7ample O* K2IT(F TS Comman Jith 2(K2IT( Option ContB

Note: The 28/.0 command does not hold e:clusi3e control o3er TS0E as you note that there is no ?$./T8 option in the 28/.0 command. ThereforeE if a TS0 is shared -y other transactionsE it is the application pro%ramBs responsi-ility to esta-lish e:clusi3e control o3er the TS0 durin% update. In this caseE you must use the 8;0 command -efore the 28/.0 command and the .80 command after the A2IT80 command 6ith the 28A2IT8 option

D232T2; TS Comman&
.unction The .848T80 TS command is used to delete a TS0 entirely. .ormat The format is sho6n in the e:ample -elo6. 0?8?8 names the =ueue id of TS0 you 6ish to delete. 2Bam+le
(4(C CICS -(5(T(F TS F,(,(%TSF8FI-& (+-8(4(C. (.g. 1>.@: (7ample O* -(5(T(F TS Comman

2Bce+tional con&ition 0I.822

1 2

Customer Information Control System (CICS)


The =ueue id specified is not found. Chapter 1#

Transient Data Control


Intro&uction The CICS transient .ata Control $ro%ram 'T.$( allo6s a CICS transaction to deal 6ith se=uential data called Transient data files. / Transient .ata file can -e used as either as an input file or an output fileE -ut not -oth. The Transient data is sometimes called Transient .ata 0ueue 'T.0(E 6hile other times it is called Transient .ata .estination. The 6ord H0ueueI is used -ecause the records in the Transient data are put to%ether in the se=uential mode. The 6ord H.estinationI is used -ecause this se=uential data is directed to other transactions. Both terms are used interchan%ea-ly and they mean essentially the same. There are t6o types of T.0C Intrapartition T.0 and 8:trapartition T.0. /lthou%h the same CICS commands are used for -oth Intrapartition T.0 and 8:trapartition T.0E the application of theses t6o types of T.0 are 3ery different. 2e%ardless of the typeE a 11! characters identifier called Hdestination1idI identifies each T.0. /ll destination ids must -e re%istered in the destination Control ta-le '.CT(. Intra+artition TD; /n Intrapartition T.0 is a %roup of se=uential records 6hich are produced and processed -y the same and7or different transactions 6ithin a CICS re%ion. This is 6hy the 6ord HIntrapartitionI is used. /ll Intrapartition T.0s are stored in only one physical file '>S/&( in a CICS re%ionE 6hich is prepared -y the system pro%rammer. "rom an application pro%ramBs point of 3ie6E ho6e3erE only se=uential access is allo6ed for a =ueue. Once a record is read from a =ueueE the record 6ill -e lo%ically remo3ed from the =ueueJ that is the record cannot -e read a%ain.. The Intrapartition T.0 is used for the 3arious applications such asC Interface amon% CICS transactions. /ppl. $ro%. 1 T.01Z/ppl. $ro%. 2 2eport /utomatic Tas) Initiation '/TI( &essa%e 2outin%

1 3

Customer Information Control System (CICS)


&essa%e Broadcast

2Btra+artition TD; /n 8:trapartition T.0 is a %roup of se=uential recordsE 6hich interfaces -et6een the transactions of the CICS re%ion and the systems 'or -atch Do-s( outside of the CICS re%ion. This is 6hy the 6ord H8:trapartitionI is used. 8ach e:trapartition T.0 is a separate physical fileE and it may -e on the dis)E tapeE printerE or plotter. This implies that each file 'i.e.E 8:trapartition T.0( must -e open 6ithin CICS re%ion 6hen it is used -y the CICS transaction. The 8:trapartition T.0 is typically used for the follo6in% t6o applicationsC Interface to -atch 'or TSOE or $C( Do-s. CICS /ppl. $ro%. T.0 "ile Batch $ro%. Interface from -atch 'or TS0E or $C( Do-s. Batch pro%. "ile T.0 CICS /ppl. $ro%.

()ailable Comman&s A2IT80 T.C 28/.0 T.C .848T80 T.C To se=uentially 6rite a record in a T.0. To se=uentially read a record in a T.0. To delete an Intrapartition T.0.

It should -e noted that T. represents Transient .ata. If this is omittedE Temporary stora%e 'TS( 6ill -e assumed.

><IT2; TD Comman&
.unction The A2IT80 T. command is used to 6rite a record in a T.0. .ormat The format of the A2IT80 T. command is sho6n in the e:ample -elo6. 0?8?8 names the destination id '1 to ! characters(E 6hich must -e defined in .CT. "2O& defines the name of the area from 6hich the data is to -e 6ritten. 48;<TH indicates the len%th of the record.

1 !

Customer Information Control System (CICS)

2Bam+le
KO2=I+68STO2'6( S(CTIO+. "1 MS68'2('. "@ MS68TO85OC PIC %2& V'5,( M6(B. "@ FI55(2 PIC 4 V'5,( SP'C(. "@ MS68OP8F2OM PIC 4%@& V'5,( MAIMB. "@ FI55(2 PIC 4 V'5,( SP'C(. "@ MS68OP8TO PIC 4%@&. "@ FI55(2 PIC 4 V'5,( SP'C(. "@ MS68M(SS'6( PIC 4%>"&. $$ MS685(+ PIC SD%>& COMP. : P2OC(-,2( -IVISIO+. : MOV( MA'C=B TO MS68OP8TO. MOV( M.I3 T.IS IS ' T(ST M(SS'6( SKITC.I+6B TO MS68M(SS'6(. MOV( @@ TO MS685(+. (4(C CICS K2IT(F TF,(,(%MMS6SB& -estination I F2OM%MS68'2('& 5(+6T.%MS685(+& (+-8(4(C. (.g. 1@.1: (7ample O* K2IT(F T- Comman

2Bce+tional Con&ition 0I.822 The destination id specified cannot -e found in .CT. 48;<822 The len%th specified is %reater than the ma:imum record len%th specified in .CT. ;OS$/C8 ;o space is a3aila-le in the T.0.

1 #

Customer Information Control System (CICS)

<2(D; TD Comman&
.unction The 28/.0 T. command is used to read a particular record of a particular T.0. .ormat The format of the 28/.0 TS command is sho6n in the e:ample -elo6. 0?8?8 names the destination id '1 to ! characters(. I;TO defines the area to 6hich the record data is to -e placed. 48;<TH indicates the len%th of the record to -e read. 2Bam+le
(4(C CICS 2('-F TF,(,(%MMS6SB& I+TO%MS68'2('& 5(+6T.%MS685(+& (+-8(4(C. (.g. 1@.2: (7ample O* 2('-F T- Comman

2Bce+tional Con&ition 0I.822 The specified .estination Id is not found 48;<822 The len%th specified is shorter than the actual record len%th. The record 6ill -e truncated at the len%th specifiedE 6hile that actual len%th 6ill -e placed in th!e 48;<TH field. 0M82O The =ueue is empty. This often means the end of the file.

D232T2; TD Comman&
.unction The .848T80 T. command is used to delete an Intrapartition T.0 entirely. .ormat The format is sho6n in the e:ample -elo6. 0?8?8 names the destination id of T.0 you 6ish to delete. 1 6

Customer Information Control System (CICS)


2Bam+le
(4(C CICS -(5(T(F TF,(,(%MMS6SB& (+-8(4(C. (.g. 1@.): (7ample O* -(5(T(F T- Comman

2Bce+tional con&ition 0I.822 The destination id specified cannot -e found in .CT.

Destination Control Table (DCT)


.unction The primary function of the .estination Control Ta-le '.CT( is to re%ister control information of all T.0s. The CICS destination Control pro%ram '.C$( uses this ta-le for identifyin% all T.0s and performin% input7output operations a%ainst them. .ormat of Intra+artition TD;
-F.-CT T/P(0I+T2'3 -(STI-0name3 ;T2'+SI-0name3<3 ;T2I65(V0n!mber3<3 ;2(,S(0/(S:+O< (.g. 1@.>: Format o* -CT (ntry *or Intrapartition T-F

T9$8LI;T2/ indicates that T.0 is the Intrapartition T.0. .8STI. defines the destination id '1 to ! characters(. 28?S8 option defines space a3aila-ility after a T.0 record has -een read. This is useful for -etter dis) space mana%ement. "or the /utomatic Tas) InitiationE T2/;SI. and T2I<48> must -e specified. T2/;SI. names the transaction id of the transaction to -e initiated. T2I<48> indicates the num-er of the records in T.0E 6hich tri%%ers the transaction to -e initiated. Note: One a record of Intrapartition T.0 is read -y a transactionE the record is lo%ically remo3edE -ut it still occupies the space. If 28?S8L98S is specifiedE this space for the lo%ically deleted record 6ill -e used for other T.0 records. ButE in this caseE records are

1 +

Customer Information Control System (CICS)


not reco3era-le. reco3era-le. If 28?S8L;O is specifiedE the lo%ically deleted records are

1 8

Customer Information Control System (CICS)

(utomatic Tas6 Initiation ((TI)


The /utomatic Tas) Initiation '/TI( is a facility throu%h 6hich a CICS transaction can -e initiated automatically. The num-er of the records in an Intrapartition T.0 tri%%ers the transaction initiation. The transaction id 'tas)( must -e defined in the .CT entry of the Intrapartition T.0E 6ith nonGero tri%%er le3el. (++lications "ollo6in% are some of the practical applications of /TIC &essa%e S6itchin%C messa%es can -e accumulated in an Intrapartition T.0E and at a certain le3elE a transaction can -e initiated automatically throu%h /TI in order to route the messa%es. 2eport printC reports can -e accumulated in an Intrapartition T.0E and at a certain le3elE a transaction can -e automatically initiated throu%h /TI in order to print the reports.

1 ,

Customer Information Control System (CICS)


Chapter 16

Inter)al Control an& Tas6 Control


ST(<T Comman&
.unction The ST/2T command is used to start a transaction at the specified terminal and at the specified time or inter3al. OptionallyE data can -e passed to the to1-e1initiated transaction. .ormat The -asic format of the ST/2T command is sho6n in the e:ample -elo6. T2/;SI. defines the transaction id of a transactionE 6hich you 6ish to initiate. T82&I. defines the terminal id of a terminal a%ainst 6hich you initiate the transaction. If T82&I. is omittedE the specified transaction 6ill -e initiated a%ainst the terminal 6ith 6hich the current transaction is associated. TI&8 or I;T82>/4 indicates the time or the time inter3al of the transaction initiationE respecti3elyE in the form of hmmss. 2Bam+le
(4(C CICS ST'2T T2'+SI-%MT2+1B& T(2MI-%MT2M1B& TIM(%"E)"""& (+-8(4(C.

0 Or I+T(2V'5%""1@""&

(.g. 1#.1: (7ample o* ST'2T Comman

2Becution <esults Transaction YT2;1B 6ill -e started on terminal 'or printer( YT2&1B at 8C3 'if TI&8 is specified( or 1# minutes later 'if I;T82>/4 is specified(. Other O+tions
"2O&C To pass a field in the 6or)in% stora%e section

48;<THC 0?8?8C

To specify the len%th of the Y"2O&B field. To pass the =ueue id '8 -ytes( of a TS0 11

Customer Information Control System (CICS)

These data must -e retrie3ed -y the 28T2I8>8 command in the to1-e1initiated transaction.

<2T<I2V2 Comman&
.unction The 28T2I8>8 command is used to retrie3e the data passed -y the ST/2T commandE 6hich 6as issued in the other transaction in order to initiate this transaction. .ormat The format of the 28T2I8>8 command is sho6n in the e:ample -elo6. I;TO defines the field in the Aor)in% Stora%e Section to 6hich the data passed -y the "2O& option of the ST/2T command is to -e placed. 48;<TH indicates the len%th of the I;TO field. 0?8?8 defines the 0I. to 6hich the 0I. passed -y the ST/2T command to -e placed. 2Bam+le
1< (4(C CICS ST'2T T2'+SI-%MT2+1B& I+T(2V'5%""1@""& T(2MI-%MT2M1B& F2OM%-'T'F5-& 5(+6T.%1""& F,(,(%F+'M(& (+-8(4(C. 2< In the transaction %T2+1& Jhich is to be initiate by the ST'2T comman : (4(C CICS 2(T2I(V( I+TO%-'T'F5-& 5(+6T.%1""& F,(,(%2(TF,I-& (+-8(4(C.

(.g. 1#.2: (7ample o* 2(T2I(V( Comman

2Becution <esults /t the completion of the ST/2T commandE the ori%inal transaction 6ill initiate the ne6 transaction 'T2;1( -ased on the time specified and the data ./T/"4.E 111

Customer Information Control System (CICS)


transaction1idE terminal1idE and 0I. 6ill -e passed to the ne6 transaction 'T2;1(. 1# minutes laterE CICS 6ill actually initiates the I;01 transaction. /t the completion of the 28T2I8>8 commandE the I;01 transaction 6ill recei3e all specified data passed from the ori%inal transactionE 6hich has initiated this I;01 transaction.

C(CC23 Comman&
.unction The C/;C84 command is used to cancel the Inter3al Control command ST/2TE 6hich ha3e -een issued. The Inter3al control commands to -e cancelled are identified -y the 280I. parameter of these commands. .ormat The format of the C/;C84 command is sho6n in the e:ample -elo6. 280I. defines the re=uest id 'up to 8 chars(E 6hich identifies the inter3al control command to -e cancelled. 2Bam+le
(4(C CICS ST'2T 2(FI-%MST'2T1B& 8888888888888888 (+-8(4(C. : : : (4(C CICS C'+C(5 2(FI-%MST'2T1B& (+-8(4(C. (.g. 1#.): (7ample o* C'+C(5 Comman

Note: 8ffecti3e only prior to the e:piration time specified in the ST/2T command.

112

Customer Information Control System (CICS)

S:S12CD Comman&
.unction The S?S$8;. command is used to suspend a tas). .urin% the e:ecution of this commandE the tas) 6ill -e suspendedE and control 6ill -e %i3en to other tas)s 6ith hi%her priority. /s soon as all hi%her priority tas)s ha3e -een e:ecutedE control 6ill -e returned to the suspended tas). .ormat
(4(C CICS S,SP(+(+-8(4(C. (.g. 1#.>: (7ample o* S,SP(+- Comman

(++lications Because of the =uasi1reentrancy of the CICS pro%ramsE if a C$? intensi3e processin% is performed in a pro%ramE it is a %ood practice to issue the S?S$8;. command from time to time in the pro%ram in order to allo6 other tas)s to proceed.

2C; an& D2; Comman&s


.unction The 8;0 command is used to %ain e:clusi3e control o3er a resource. The .80 command is used to free that e:clusi3e control from the resource. .ormat The format of the 8;0 and .80 are sho6n in the e:ample -elo6. 28SO?2C8 defines the name of the resource to -e 8;0Bed or .80Bed.

113

Customer Information Control System (CICS)

2Bam+le
(4(C CICS (+F 2(SO,2C( %TSF8FI-& (+-8(4(C. (4(C CICS 2('-F TS F,(,( %TSF8FI-& (+-8(4(C. : %,p ate the contents o* TSF& : (4(C CICS K2IT(F TS F,(,( %TSF8FI-& 2(K2IT( (+-8(4(C. (4(C CICS -(F 2(SO,2C(%TSF8FI-& (+-8(4(C. (.g. 1#.@: (7ample o* (+F an -(F Comman

Other O+tions 4en%thC If the resource is a character strin%E the 48;<TH parameter must -e specified in -oth 8;0..80 commands. ;OS?S$8;.C If this is specifiedE e3en if the 8;0B?S9 condition occursE control 6ill -e returned to the statement after the 8;0 command. 2Bce+tional Con&ition 8;0B?S9 The resource specified is reser3ed to another tas). The tas) 6ill -e suspended until the resource is freed -y the other tas).

11!

Customer Information Control System (CICS)


Chapter 1+

Tests an& Debu**in*


Intro&uction "or an effecti3e de-u%%in% and7or -etter mana%ement of a-normal termination of a pro%ramE CICS pro3ides useful control functions o3er these areas. The /-normal Termination 2eco3ery function '/B8;. Control( mana%es an a-normal termination '/B8;.( of a tas). The .ump Control pro%ram '.C$( mana%es dumpin% the main stora%e areas. The CICS Trace Control $ro%ram ma)es use of the Trace Ta-le for de-u%%in% aid purposes. Comman&s /-end Control CommandsC o H/;.48 /B8;.C To detect an /B8;.. o /B8;.C To force an /B8;. .ump Control CommandC o .?&$C To dump the main stora%e area

Other .acilities In additionE in order to facilitate effecti3e tests and production operationsE CICS pro3ides the follo6in% facilitiesC Transaction .ump 8:ecution .ia%nostic "acility '8."( Command 4e3el Interpreter 'C8CI( Temporary Stora%e Bro6se 'C8B2( &aster Terminal Transaction 'C8&T( .ynamic "ile Open7Close '."OC(

0(CD32 ('2CD Comman&


.unction The H/;.48 /B8;. command is used to intercept an a-normal termination '/B8;.( 6ithin a pro%ramE and to acti3ateE cancelE or reacti3ate an e:it for the /B8;. processin%. The H/;.48 /B8;. command is similar toE -ut different fromE the

11#

Customer Information Control System (CICS)


H/;.48 CO;.ITIO; commandE 6hich intercepts only the a-normal conditions of the CICS command e:ecution.

.ormat
(4(C CICS .'+-5( 'B(+;P2O62'M%name&< : 5'B(5%label& : C'+C(5 : 2(S(T< (+-8(4(C. (.g. 1$.1: Format o* .'+-5( 'B(+- Comman

$2O<2/& or 4/B84 is used to acti3ate an e:it to a pro%ram or a para%raphE respecti3elyE for the /B8;. processin%. C/;C84 is used to cancel the pre3iously esta-lished H/;.48 /B8;. re=uest. 28S8T is to reacti3ate the pre3iously cancelled H/;.48 /B8;. re=uest.

('2CD Comman&
.unction The /B8;. command is used to terminate a tas) intentionallyE causin% an /B8;.. .ormat
(4(C CICS 'B(+;'BCO-(%name& < (+-8(4(C. (.g. 1$.2: Format o* 'B(+- Comman

/BCO.8 is used to specify the user a-end code '1 to ! characters(. 2Bam+le
(4(C CICS .'+-5( CO+-ITIO+ (22O2%(22O282T+& (+-8(4(C. : : (22O282T+. (4(C CICS 'B(+'BCO-(%M12)>B& (+-8(4(C.

116

Customer Information Control System (CICS)


(.g. 1$.): (7ample o* 'B(+- Comman

11+

Customer Information Control System (CICS)

2Becution <esults If the %eneral error condition occursE control 6ill -e passed to 822O212T; throu%h the H/;.48 CO;.ITIO; command. /t the completion of the /B8;. commandE the tas) 6ill -e forcefully terminated 6ith the user /B8;. code 123!.

D:/1 Comman&
.unction The .?&$ command is used to dump the main stora%e areas related to the tas). .ormat
(4(C CICS -,MP -,MPCO-(%name& ;F2OM% ata8area& 5(+6T.% ata8Cal!e&< ;T'S=< : %Other options& : (+-8(4(C. (.g. 1$.>: Format o* -,MP Comman

.?&$CO.8 names the user dump code '1 to ! characters(. "2O& and 48;<TH are used to define the name of a particular area of the pro%ram 6hich you 6ish to dump and the len%th of the areaE respecti3ely. T/S* indicates that the tas)1related system areas are to -e dumped. There are other options for dumpin% system areas. If no option is specifiedE the option T/S* is assumedE in 6hich case the follo6in% areas 6ill -e normally dumpedC TCA, CSA, Trace Ta le, !rogra" Storage, #eneral Regi$ter$

118

Customer Information Control System (CICS)


Chapter 18

<eco)ery an& <estart


Intro&uction Online systems tend to use si%nificant amounts of resources includin% a lar%e data-ase. /lsoE as the nature of online systemE at one time many transactions may -e concurrently updatin% the data-aseE many terminal users may -e usin% the system at the same time. ThereforeE if one transaction encounters an /B8;. or the entire online system crashes E it is crucial to reco3er the resources in3ol3ed and to restart the transactions or the entire system as =uic) as possi-le. ThereforeE a lar%e .B7.C system usually offers useful reco3ery7restart facilities. Terminolo*y The reco3ery facilities and restart facilities are independent of each otherE althou%h they are closely related to each other. <eco)ery 2eco3ery is an attempt to come -ac) to 6here the CICS system or the transaction 6as 6hen the failure occurredE -y reco3erin% all reco3era-le resources rele3ant to the system or the transaction. <estart 2estart is to resume the operations of the CICS system or the transaction 6hen reco3ery is completedE -y restartin% the system or the transaction -ased on the reco3ered resources. CICS <eco)ery4<estart .acilities The o-Decti3e of reco3ery7restart facilities is to minimiGe andE if possi-leE to eliminate the dama%e done to the online system 6hen a failure occursE so that the system inte%rity and data inte%rity can -e maintained. CICS offers e:tensi3e reco3ery7restart facilities for users to esta-lish their o6n reco3ery7restart capa-ility in their CICS system. The follo6in% are commonly used CICS reco3ery7restart facilitiesC .ynamic Transaction Bac)out '.TB( /utomatic Transaction 2estart 2esource 2eco3ery ?sin% System 4o% 2esource 2eco3ery ?sin% Fournal

11,

Customer Information Control System (CICS)


System 2estart

Dynamic Transaction 'ac6out (DT') The H/;.48 CO;.ITIO; command detects only a-normal status durin% the CICS command e:ecution. If an a-normal status occurs outside CICS commandsE since it cannot -e detected -y the H/;.48 CO;.ITIO; commandE the tas) usually 6ill -e a-normally terminated '/B8;.(. "or thisE some reco3ery mechanism is re=uired. In case a transaction /B8;. occursE CICS can automatically reco3er reco3era-le resources usin% information in the special data pool called Hdynamic lo%I. This is called H.ynamic Transaction Bac)outI '.TB(E and the CICS .ynamic Bac)out $ro%ram '.B$( mana%es it. The o-Decti3e of .TB is to restore automatically the reco3era-le resources after a transaction encounters an /B8;. to the state 6here they 6ere 6hen e3erythin% 6as %ood. If this is successfully achie3edE the transaction can -e restarted from that point. Sync 1oint an& 3o*ical :nit of >or6 (3:>) The sync point is a point in time at 6hich the resources such as files are %ood. The -e%innin% of a tas) is a sync point 6hile the end of the tas) is another sync point 6hile the end of the tas) is another sync point. 4?A is the acti3ityE 6hich a tas) performs -et6een t6o sync points. CICS maintains e:clusi3e control o3er the reco3era-le resources for the duration of a 4?A for the tas). If an /B8;. occursE CICS reco3ers the reco3era-le resources o3er the current 4?A up to the last sync point. Bet6een the -e%innin% and end of a tas)E another sync point may -e declared. This is called Hintermediate sync pointI. .eclarin% the intermediate sync point has follo6in% ad3anta%esC It reduces the amount of resource to -e maintained in the dynamic lo% It reduces the duration of e:clusi3e control o3er a 4?A. It pre3ents successful record updates from -ein% -ac)ed out need1lessly.

Dynamic 3o* / CICS re%ion has a special system area in the main memory called Hdynamic lo%I. Ahene3er a record of a reco3era-le resource such as a >S/& file is chan%ed durin% the e:ecution of a transactionE CICS automatically 6rites the H-efore ima%eI information of the record into the dynamic lo% for the duration of one 4?A of the transaction. The information in the dynamic lo% is the -asis for the resource reco3ery.

12

Customer Information Control System (CICS)

SACC1OICT Comman&
.unction The S9;C$OI;T command is used to define an intermediate sync point. This e:cludes the -e%innin% and end of a tas)E 6hich are automatically ta)en -y CICS. Other6iseE the S9;C$OI;T command can -e placed any6here in the application pro%ram. /t the completion of the S9;C$OI;T commandE CICS defines a sync point. .ormat
(4(C CICS S/+CPOI+T ;2O55B'C=< (+-8(4(C. (.g. 1E.1: Format o* S/+CPOI+T Comman

<O33'(C7 O+tion The S9;C$OI;T command 6ith the 2O44B/C* option is used to ma)e CICS perform .TB up the last sync point and return control to the instruction follo6in% the S9;C$OI;T72O44B/C* command. This option is 3ery useful 6hen you 6ish to automatically terminate the tas) for some reason 'e.%.E unusual e:ceptional conditions(. Before terminatin% the tas)E you can issue the S9;C$OI;T72O44B/C* command. ThenE the reco3era-le resources 6ould -e reco3ered to the last sync point.

121

Customer Information Control System (CICS)


Chapter 1,

(++lication 1ro*ram 0ouse6ee+in* ContF&


'ase 3ocator .or 3in6a*e ('33)
The Base 4ocator for 4in)a%e 'B44( is an addressin% con3ention used to address stora%e outside the Aor)in% Stora%e Section of an application pro%ram. If B44 is used for the input commands 'e.%.E 28/.E 28C8I>8(E it 6ill impro3e the performanceE since the pro%ram 6ould -e accessin% directly the input -uffer outside of the pro%ram. /lsoE if B44 is used for the dynamic ta-le loadin%E it 6ill sa3e the siGe of the application pro%ramE since the application pro%ram does not ha3e to reser3e the space for the ta-le in the pro%ram. Con)ention B44 operates -y addressin% the stora%e as if it 6ere a parameter to the pro%ram. ThereforeE in order for B44 to 6or) as intendedE the pro%ram must construct B44 -ased on the follo6in% con3entionsC The parameter list must -e defined -y means of a 1 le3el data definition in the 4in)a%e Section as the first area definition to the 4in)a%e SectionE unless a communication area is -ein% passed to the pro%ramE in 6hich case ."HCO&&/28/ must -e defined first. The parameter list consists of a %roup of the address pointersE each of 6hich is defined as the full16ord -inary field 'S,'8( CO&$(. This is called B44 cells. The parameter list is follo6ed -y a %roup of 1 le3el data definitionsE 6hich 6ould -e the actual data areas. The first address pointer of the parameter list is set up -y CICS for addressin% the parameter list itself. "rom the second address pointer on6ardE there is a one1to1 one correspondence -et6een the address pointers of the parameter list and 1 le3el data definitions. That isE the second address pointer and third address pointer point the address of the first 1 le3el and the second 1 le3el fieldsE respecti3elyE and so on.

122

Customer Information Control System (CICS)

(++lication In a CICS application pro%ramE the B44 con3ention is used commonly for the follo6in% t6o applicationsC CICS Command 6ith S8T OptionC B44 is commonly used -y the S8T option of certain CICS commands /ccessin% CICS System /reasC /nother common use of B44 is for accessin% CICS system areas.

.ormat
5I+='6( S(CTIO+. "1 B558C(5585IST. "@ FI55(2 "@ FI2ST8POI+T(2 "@ S(CO+-8POI+T(2 "@ T.I2-8POI+T(2 "1 FI2ST8-'T'. "@ FI2ST8FI(5"1 S(CO+-8-'T'. "@ S(CO+-8FI(5"1 T.I2-8-'T'. "@ T.I2-8-'T'

PIC PIC PIC PIC PIC PIC PIC

SD%E& COMP. SD%E& COMP. SD%E& COMP. SD%E& COMP. 4%"@&. 4%1"&. 4%1"&.

(.g. 1D.1: Format o* eclaring B55 cell list

Im+ro)ements 'y VS CO'O3 II >S COBO4 II pro3ides CICS application pro%rams 6ith si%nificant impro3ements in the area of addressa-ility throu%h the special /..28SS re%ister. ThereforeE if an application pro%ram is 6ritten in >S COBO4 IIE the pro%ram no lon%er re=uires -uildin% the B44 cells in the 4in)a%e Section. The pro%ram can directly specify the 1 le3el field definitions in the 4in)a%e section 6ithout definin% the B44 cells.

S2<VIC2 <23O(D Statement


.unction The S82>IC8 284O/. statement is used to ensure addressa-ility to a particular area defined in the 4in)a%e Section. ThereforeE this statement must -e used follo6in% 6hene3er the content of B44 cell is chan%ed in any 6ay. This statement is 3alid only for .OS7>SE OS7>S COBO4E or COBO4 >! compiler.

123

Customer Information Control System (CICS)

.ormat
S(2VIC( 2(5O'- *iel 8name (.g. 1D.2: Format o* S(2VIC( 2(5O'- Comman

AhereE Hfield1nameI is a sym-olic name of the data area defined in 1 le3el of the 4in)a%e Section. 8.%.C C S82>IC8 284O/. "I2ST1./T/. C

(DD<2SS Comman&
.unction The /..28SS command is used to access information in the CICS system areas. "or the /..28SS commandE the B44 cells must -e properly defined -ased on the con3ention. .ormat
(4(C CICS '--2(SS OPTIO+% pointer8re*& ;OPTIO+%pointer8re*&< (+-8(4(C. (.g. 1D.): Format o* '--2(SS Comman

The pointer1reference is to -e set -y CICS to address the areaE 6hich you 6ish to access. Commonly :se& O+tions CS/ To access the Common System /rea 'CS/(E 6hich is a CICS system area defined -y the system. CA/ To access the Common Aor) /rea 'CA/(E 6hich is a CICS system area defined -y the system pro%rammer in SIT.

12!

Customer Information Control System (CICS)

TCT?/ To access the terminal Control Ta-le ?ser /rea 'TCT?/(E 6hich is a 6or) area associated 6ith a terminal. TCT?/ is defined as one per terminal in TCT. TA/ To access the Transaction Aor) /rea 'TA/(E 6hich is a 6or) area associated 6ith a tas). TA/ is defined as one per tas) in $CT.

Stora*e Control
CICS Stora%e Control $ro%ram 'SC$( controls re=uest for main stora%e -y the application pro%rams. There are t6o commands a3aila-leC <8T&/I; and "288&/I;.

92T/(IC Comman&
.unction The <8T&/I; command is used to o-tain a certain amount of stora%e. .ormat
(4(C CICS 6(TM'I+ S(T%pointer8re*& 5(+6T.% ata8Cal!e& : F5(+6T.% ata8Cal!e& ;I+ITIM6% ata8Cal!e&< ;+OS,SP(+-< (+-8(4(C. (.g. 1D.>: Format o* 6(TM'I+ Comman

The pointer reference is set to the address of the ac=uired stora%e area -y CICS. ThereforeE the correspondin% B44 cell must -e esta-lished. The len%th of the stora%eE 6hich you 6ish to ac=uireE should -e specified in either the 48;<TH or "48;<TH option. The ma:imum len%th of stora%e to -e ac=uired is 6#E #2 -ytes for the 48;<TH option and 1E +3E+!1E82! -ytes for the "48;<TH option. The I;IT&< option determines the initial 3alue to -e filled in the stora%e to -e ac=uired. The ;OS?S$8;. optionE if specifiedE inhi-its the ;OST< condition and returns to the ne:t instruction.

12#

Customer Information Control System (CICS)

2Bam+le
KO2=I+68STO2'6( S(CTIO+. $$ I+IT8C.2 PIC 4 V'5,( 5OK8V'5,(. : 5I+='6( S(CTIO+. "1 P'2M85IST. "@ FI55(2 PIC SD%E& COMP. "@ -KS8PT2 PIC SD%E& COMP. "1 -KS8'2('. "@ FI(5-1 PIC 4%1""&. "@ FI(5-2 PIC 4%2""&. : P2OC(-,2( -IVISIO+. : (4(C CICS 6(TM'I+ S(T%-KS8PT2& 5(+6T.%)""& I+ITM6%I+IT8C.2& (+-8(4(C. S(2VIC( 2(5O'- -KS8'2('. : (.g. 1D.@: (7ample o* 6(TM'I+ Comman

2Becution <esults /t the completion of the <8T&/I; commandE the stora%e of 3 for .AS1/28/E 6hich 6ould contain 4OA1>/4?8S. Common 2Bce+tional Con&itions 48;<822 The len%th specified e:ceeded the limit. ;OST< ;o stora%e is a3aila-le for the specified amount. The default action is that the tas) 6ill -e suspended until stora%e -ecomes a3aila-le. -ytes 6ill -e ac=uired

.<22/(IC Comman&
.unction The ac=uired stora%e area should -e freed as soon as it is no lon%er re=uired. The "288&/I; command is used to release the stora%eE 6hich has -een ac=uired. If the ac=uired stora%e is not freedE it 6ill -e freed 6hen the tas) terminates.

126

Customer Information Control System (CICS)


.ormat
(4(C CICS F2((M'I+ -'T' % ata8area& (+-8(4(C. (.g. 1D.#: Format o* F2((M'I+ Comman

The ./T/ parameter is used to specify the area name of the stora%e to -e released. 2Bam+le
(4(C CICS F2((M'I+ -'T'%-KS8'2('& (+-8(4(C. (.g. 1D.$: (7ample o* F2((M'I+ Comman

1ro*ram Control
3O(D Comman&
.unction The 4O/. command is used to load a pro%ram or a ta-leE 6hich is independently compiled or assem-ledE lin)1edited and re%istered in $$T. This command is useful for loadin% a ta-le dynamically. That isE as an applicationE a ta-le can -e coded in /ssem-lerE assem-ledE and lin)1edited. Then a COBO4 pro%ram can load it as a ta-le. .ormat
(4C CICS 5O'P2O62'M%name& ;S(T%pointer8re*&< ;5(+6T.% ata8area& : F5(+6T.% ata8area&< ;.O5-< (+-8(4(C. (.g. 1D.E: Format o* 5O'- Comman

The address of the loaded pro%ram 'or ta-le( 6ill -e placed in the pointer1 reference specified in the S8T parameter. If the HO4. option is specifiedE the loaded pro%ram 'or ta-le( 6ill -e permanently resident until e:plicitly released.

12+

Customer Information Control System (CICS)


If the HO4. option is not specifiedE the loaded pro%ram 'or ta-le (6ill remain until the 2848/S8 command is issued or the tas) is normally or a-normally terminated. If the 48;<TH or "48;<TH option is specifiedE at the completion of loadin%E the len%th of the pro%ram 'or ta-le( 6ill -e placed in the data area.

2Bam+le The follo6in% e:ample illustrates that a ta-le defined in an /ssem-ler pro%ram 'C;T29TB4( is to -e loaded into a CICS application pro%ram '$2O<1( coded in COBO4. It assumes that -oth C;T29TB4 and $2O<1 /re re%istered in $$T. (ssembler 1ro*ram This pro%ram defines a ta-le to -e used -y another pro%ram.
C+T2/TB5 CS(CT -C C51" B1",.S.'.B -C C51" M11C'+'-'B -C C51" M12,.=.B : : %1" entries& (+-

Cobol 1ro*ram This pro%ram loads and uses the ta-le outside of the pro%ram.
I-(+TIFIC'TIO+ -IVISIO+. P2O62'M8I-. P2O61. (+VI2O+M(+T -IVISIO+. -'T' -IVISIO+. KO2=I+68STO2'6( S(CTIO+. $$ TB585(+ PIC SD%>& COMP. : 5I+='6( S(CTIO+. "1 P'2M85IST. "@ FI55(2 PIC SD%E& COMP. "@ C+T2/TB58PT2 PIC SD%E& COMP. "1 C+T2/TB58-'T'. "@ FI55(2 OCC,2S 1" TIM(S. 1" C+T2/8CO-( PIC DD. 1" C+T2/8+'M( PIC 4%E&. P2OC(-,2( -IVISIO+.
(4(C CICS .'+-5( CO+-ITIO+ P6MI-(22%P2O68+OT8FO,+-& (+-8(4(C. (4(C CICS 5O'P2O62'M%MC+T2/TB5B& S(T%C+T2/B58PT2& 5(+6T.%TB585(+& (+-8(4(C. S(2VIC( 2(5O'- C(+T2/B58-'T' MOV( C+T2/8CO-(%1& TO 8888888888. MOV( C+T2/8+'M(%1& TO 8888888888. QQQQQ

(.g. 1D.D: (7ample o* 5O'- Comman

128

Customer Information Control System (CICS)

2Becution <esults /fter the completion of the 4O/. command and the S82>IC8 284O/. statementE the C;T29TB4 ta-le 6ill -e loaded and the $2O<1 pro%ram could refer the ta-le The len%th of the C;T29TB4 ta-le 6ill -e placed in TB4148;.

Common 2Bce+tional Con&itions ;OT/?TH 2esource security chec) has failed $<&I.822 $ro%ram specified in not found Im+ro)ement by VS CO'O3 II 1. $/2&14IST in the 4in)a%e Section is not re=uired 2. The 4O/. command must ha3e the special 6ord /..28SS for pointin% the address of the field specified in the 4in)a%e SectionE as follo6sC 8@8C CICS 4O/. $2O<2/&'YC;T29TB4B( S8T'/..28SS O" C8;T29TB41./T/( 48;<TH'TB4148;( 8;.18@8C. 3. The S82>IC8 284O/. statement is not re=uired.

<232(S2 Comman&
.unction The 2848/S8 command is used to release a pro%ram 'or ta-le(E 6hich has -een loaded pre3iously. .ormat
(4(C CICS 2(5('S( P2O62'M%name& (+-8(4(C. (.g. 1D.1": Format o* 2(5('S( Comman

12,

Customer Information Control System (CICS)


The name of the pro%ram to -e released must -e specified in the $2O<2/& parameter. 2Bam+le
(4(C CICS 2(5('S( P2O62'M %MC+T2/TB5B& (+-8(4(C. (.g. 1D.11: (7ample o* 2(5('S( Comman

Common 2Bce+tional Con&itions ;OT/?TH 2esource security chec) has failed. $<&I.822 $ro%ram specified is not found.

13

Customer Information Control System (CICS)


Chapter 2

CICS Transactions
There are total appro:imate 22 CICS transactions a3aila-le. "ollo6in% is the list of fe6C CSS;C Si%n1On C8B2C Temporary Stora%e Bro6se C8CIC Command 4e3el Interface C8."C 8:ecution .ia%nostic "acility C8&TC &aster Terminal Transaction C8./C 2esource .efinition Online CSS"C Si%n1Off

CSSC
8na-les CICS to associate user 6ith the terminal ;ame and pass6ord should -e defined in the Si%no; Ta-le 'S;T(.

C2'<
The Temporary Stora%e Bro6se 'C8B2( is a CICS1supplied transactionE 6hich -ro6ses Temporary Stora%e 0ueue 'TS0(. It is a 3ery con3enient tool if you 6ish to display the content of TS0 6hen you are monitorin% an application pro%ram throu%h 8.". In3o)in% C8B2 is simple. 9ou type C8B2 and press the 8;T82 )ey. The C8B2 initial screen 6ill -e displayed. ThenE you typeC 0?8?8 :::::::: Ahere :::::::: is the =ueue id of TS0 to -e -ro6sed. /fter pressin% 8;T82 )eyE the content of the TS0 6ill -e displayed.

C2CI
The Command 4e3el Interpreter 'C8CI( is a CICS1supplied transaction 6hich performs synta: chec)in% of a CICS command. If the synta: is satisfiedE it 6ill actually e:ecute the command. This may -e useful for interacti3e patchin% into the application system. C8CS Dust chec)s the synta:.

131

Customer Information Control System (CICS)

C2/T
The C8&T '8nhanced &aster Terminal( transaction is a CICS supplied transactionE 6hich manipulates the CICS en3ironmentE such as transactionsE pro%ramsE filesE TS0sE and tas)s. It is a menu1dri3en and easy1to1use transactionE -ut due to its nature of manipulatin% the CICS en3ironmentE it is usually a restricted transaction 6hich an application pro%rammer or the end1users cannot use freelyE But helps application pro%rammers for pro%ram testin%E monitorin%E and7or trou-le shootin%. /a5or .unctions The C8&T transaction performs the follo6in% maDor functionsC I;0?I28C To in=uire a-out the status of CICS en3ironments. S8TC To update the status of CICS en3ironments $82"O2&C "or further system operations.

CSS.
Si%n1off Transaction Brea)s the connection to CICS Sends the messa%e to messa%e lo% Arites si%n1off messa%e to terminal

132

Customer Information Control System (CICS)

(++en&iB,(
(ssi*nment 1
Create follo6in% &apsC 1Q &enu Screen Customer Information System Hindustan $3t. 4td. .ateC ,,7,,7,,

/enu 1. 2. Customer &aintenance Customer In=uiry

8nter >alid ChoiceC VVVVVVV &essa%eC VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV Operator &essa%eC 2nter1$rocessE .1018:itE .!12efresh 2Q *ey Screen Customer Information System Hindustan $3t. 4td. .ateC ,,7,,7,,

8nter Customer codeC VVVVVVV &essa%eC VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV Operator &essa%eC 2nter1$rocessE .101&enuE .!12efresh

133

Customer Information Control System (CICS)


3Q .etail Screen Customer Information System Hindustan $3t. 4td. .ateC ,,7,,7,,

/o&ification4In-uiry4Data,entry Customer CodeC VVVVVVVVVVVVVVVVVV ;ameC /ddressC CityC Mip1codeC VVVVVVVVVVVVVVVVVVV VVVVVVVVVVVVVVVVVVV VVVVVVVVVVVVVVVVVVV VVVVVVVVVVVVVVVVVVV

&essa%eC VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV Operator &essa%eC GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG ?se follo6in% names for maps and mapsetsC Screen &enu *ey .etail /a+ Came menumap )eymap detmap /a+set Came menumap )eymap detmap

(ssi*nment 2
1Q Code the sample pro%ram %i3en to you. 2Q .e-u% it usin% /nimator. 3Q Chec) the pseudo1con3ersational lo%ic.

13!

Customer Information Control System (CICS)

(ssi*nment 3
1Q .isplay current date and time. "irst pro%ram 6ill display follo6in% screenO.

D(T2 D TI/2 D &8SS/<8 C .2L$2OC8SS .10L8@IT .!L28"28SH Ahen user 6ill press "2 /I. )ey the control should pass to second pro%ram usin% 4I;*. Called pro%ram should %et the dateE time and format it. Then first pro%ram should display the date 5 time 3alue. If user presses "1 /I. )eyE session should %et terminated. If user presses "# /I. )eyE screen should %et refreshed. If any other )ey is pressedE display the appropriate error messa%e.

(ssi*nment
1Q Arite a $ro%ram for Customer "ile &aintenance &odule. /ccept the choice from the &8;? pro%ramE and pass control to the &/I;T pro%ram 6hich is %oin% to perform follo6in% functionsC /.. &O.I"9 .848T8 &/I;T pro%ram 6ill ta)e the C?STVCO.8 as an input. If customer is not present in the data fileE 6ill perform /.. routine. If customer is presentE then it 6ill perform &O.I"97.848T8 routine. /fter performin% the /..7&O.I"97.848T8 control should return -ac) to the *89 mapE displayin% appropriate messa%e. 13#

Customer Information Control System (CICS)

In the case of record not e:istin% in the fileE display follo6in% Operator &essa%e in the .8T/I4 screen. .21/..E .31*891SC288;E .!128"28SHE ."1&8;?1SC288;

In the case of record e:istin% in the fileE display follo6in% Operator &essa%e in the .8T/I4 screen. .21&O.I"9E .31.848T8E . 1*891SC288;E .!128"28SHE ."1&8;?1SC288;

"or any mapE if user presses 6ron% )eyE then display I;>/4I. *89 messa%e into error1messa%e -o:. &a)e use of C/1$2OC8SS1SA to determine 6hether to process *89 mapE /.. map or &O.I"9 map. ?se 8IB/I. to chec) for the /I. )ey pressed. &a)e use of sections 6hile 6ritin% pro%ram code. '/lso 6rite 8@IT para%raph in e3ery section to come out of it(. $erform all necessary fields 3alidations -efore proceedin% further.

(ssi*nment !
1Q Arite a $ro%ram for Customer In=uiry &odule. .isplay the .8T/I4 screen after user selects the I;0?I29 option from the menu. ?ser is allo6ed to enter specific C?ST1CO.8 or can %o for 3arious /I. )eys "ollo6in% )eys are pro3ided to the user to perform an in=uiryC 8;T821$2OC8SS "11"I2ST "214/ST "31$28>IO?S "!1;8@T "#128"28SH "61&8;?

136

Customer Information Control System (CICS)


.isplay appropriate error messa%es in the error messa%e -o:.

(ssi*nment "
?se TS0 in the &O.I"9 routine to determine 6hether record has -een chan%ed durin% the current tas)Bs pseudo1con3ersational cycle. "or this use the follo6in% procedureC 28/. the record for specified customer code If record is found. Store it in a TS0. Send the .8T/I4 map to perform &O.I"9 or .848T8 routine. /fter this I7OE a%ain read the record 6ith ?$./T8 option and no6 compare this recordE 6hich is readE and the oneE 6hich is there in the TS0. If -oth are sameE it implies that no other tas) has modified that record. So continue processin%. If the comparison failsE then display the messa%e H2ecord has already -een modified -y someone. 8nter the chan%es a%ainI.

9eneral 9ui&elinesD Chec) for 8IBC/48;L for in3alid entry to I;0?I29 and &/I;T8;/;C8 pro%ram. 'The entry should -e al6ays from &8;? pro%ram(. Chec) the C/1$2OC8SS1SA in the main section to -ranch out to different sections. ?se H<O TOI to ta)e control to the 8@IT para%raph in the section. 'Code 8@IT at the end of e3ery section( Code CICS command and the associated H/;.48 CO;.ITIO; in the same section. /ll 6or)in%1stora%e 3aria-les must -e initialiGed. 8ach section must -e preceded 6ith proper documentation.

13+

Customer Information Control System (CICS)

(++en&iB,'
Sam+le CO'O3,CICS 1ro*ram
ID2CTI.IC(TIOC DIVISIOC. $2O<2/&1I.. &8;?. 2CVI<OC/2CT DIVISIOC. D(T( DIVISIOC. AO2*I;<1STO2/<8 S8CTIO;. 1 AS1SAITCH8S. # AS18;.1S8SSIO; $IC @' 1( >/4?8 R;R. 88 8818;.1S8SSIO; >/4?8 R9R. T 1 AS18;.1S8SSIO;1&8SS/<8 $IC @'# ( >/4?8 S$/C8S. 1 AS1$<&1;/&8 $IC @' 8( >/4?8 S$/C8S. 1 AS1./T8 $IC S,'1#( CO&$13 >/4?8 M82OS. T 1 AS1>/4I.1./T/ $IC @' 1( >/4?8 R9R. 88 881>/4I.1./T/ >/4?8 R;R. T 1 AS1CO&&1/28/. # C/1$2OC8SS1SA $IC @' 1( >/4?8 R1R. # C/1$2O<2/&1;/&8 $IC @' 8( >/4?8 S$/C8S. # C/1./T8 $IC @' 8( >/4?8 S$/C8S. T CO$9 &8;?&/$. CO$9 BOO*S. T 4I;*/<8 S8CTIO;. T 1 ."HCO&&/28/ $IC @'1+(. TT 1<OC2D:<2 DIVISIOC. T 0000,/(IC S2CTIOC. &O>8 4OA1>/4?8S TO &8;?&/$I. I" 8IBC/48; L $82"O2& 1 1"I2ST1TI&8 84S8 &O>8 ."HCO&&/28/ TO AS1CO&&1/28/ $82"O2& 2 1S?BS80?8;T. T I" 8818;.1S8SSIO; 8@8C CICS S8;. T8@T "2O& 'AS18;.1S8SSIO;1&8SS/<8( 48;<TH'# ( 82/S8 "288*B 8;.18@8C 8@8C CICS 28T?2; 8;.18@8C 84S8 8@8C CICS 28T?2; T2/;SI.'RT1R( CO&&/28/'AS1CO&&1/28/( 48;<TH'1+( 8;.18@8C. 18@IT.

138

Customer Information Control System (CICS)


8@IT. T 1000,.I<ST,TI/2 S2CTIOC. 8@8C CICS /S*TI&8 /BSTI&8'AS1./T8( 8;.18@8C. 8@8C CICS "O2&/TTI&8 /BSTI&8'AS1./T8( ..&&99'./T8I( ./T8S8$'R7R( 8;.18@8C. &O>8 ./T8I TO C/1./T8. &O>8 11 TO CHOIC84. &O>8 R1R TO C/1$2OC8SS1SA. 8@8C CICS S8;. &/$S8T'R&8;?&/$R( &/$'R&8;?&/$R( "2O&'&8;?&/$I( 82/S8 "288*B C?2SO2 8;.18@8C. 1 18@IT. 8@IT. T 2000,S:'S2;:2CT S2CTIOC. I" 8IB/I. L ."H8;T82 $82"O2& 21 1$2OC8SS1CHOIC8 84S8 I" 8IB/I. L ."H$"1 $82"O2& 22 18;.1S8SSIO; 84S8 I" 8IB/I. L ."H$"# $82"O2& 23 1SC288;128"28SH8. 84S8 $82"O2& 2! 1I;>/4I.1*89. T I" 881>/4I.1./T/ $82"O2& 2# 1S8;.1&/$. 2 18@IT. 8@IT. T 2100,1<OC2SS,C0OIC2 S2CTIOC. $82"O2& 211 128C8I>81CHOIC8. $82"O2& 212 1>/4I./T81CHOIC8. I" ;OT 881>/4I.1./T/ $82"O2& 213 1T2/;S"821$<& 84S8 $82"O2& 21! 1I;>/4I.1./T/. 21 18@IT. 8@IT. T 2200,2CD,S2SSIOC S2CTIOC. &O>8 RS8SSIO; 8;.8. ...R TO AS18;.1S8SSIO;1&8SS/<8. &O>8 R9R TO AS18;.1S8SSIO;. 22 18@IT. 8@IT. T 2300,SC<22C,<2.<2S02D S2CTIOC. I" &8SS/<8I ;OT L 4OA1>/4?8S &O>8 S$/C8S TO &8SS/<8I. &O>8 S$/C8S TO CHOIC8I. &O>8 R;R TO AS1>/4I.1./T/. 23 18@IT. 8@IT. T 2 00,ICV(3ID,72A S2CTIOC.

13,

Customer Information Control System (CICS)


&O>8 RI;>/4I. *89 $28SS8......R TO &8SS/<8I. &O>8 R;R TO AS1>/4I.1./T/. 2! 18@IT. 8@IT. T 2!00,S2CD,/(1 S2CTIOC. &O>8 11 TO CHOIC84. 8@8C CICS S8;. &/$S8T'R&8;?&/$R( &/$'R&8;?&/$R( "2O&'&8;?&/$I( "288*B C?2SO2 8;.18@8C. 2# 18@IT. 8@IT. T 2110,<2C2IV2,C0OIC2 S2CTIOC. 8@8C CICS H/;.48 CO;.ITIO; &/$"/I4'211 1&/$1"/I4( 8;.18@8C. 8@8C CICS 28C8I>8 &/$S8T'R&8;?&/$R( &/$'R&8;?&/$R( I;TO'&8;?&/$I( 8;.18@8C. <O TO 211 18@IT. 211 1&/$1"/I4. &O>8 R&/$ "/I4 S8SSIO; 8;.8.R TO AS18;.1S8SSIO;1&8SS/<8. &O>8 R9R TO AS18;.1S8SSIO;. 211 18@IT. 8@IT. T 2120,V(3ID(T2,C0OIC2 S2CTIOC. I" CHOIC8I L R1R &O>8 R"""R TO AS1$<&1;/&8 84S8 I" CHOIC8I L R2R &O>8 RIIIR TO AS1$<&1;/&8 84S8 &O>8 R;R TO AS1>/4I.1./T/. 212 18@IT. 8@IT. T 2130,T<(CS.2<,19/ S2CTIOC. 8@8C CICS H/;.48 CO;.ITIO; $<&I.822'213 1$<&1;OT1";.( 8;.18@8C. &O>8 Y2B TO C/1$2OC8SS1SA. 8@8C CICS @CT4 $2O<2/&'AS1$<&1;/&8( CO&&/28/'AS1CO&&1/28/( 48;<TH'1+( 8;.18@8C. <O TO 213 18@IT. 213 1$<&1;OT1";.. &O>8 R$2O<2/& ;OT $28S8;TR TO &8SS/<8I. &O>8 R;R TO AS1>/4I.1./T/. 213 18@IT. 8@IT. T 21 0,ICV(3ID,D(T( S2CTIOC. &O>8 R;R TO AS1>/4I.1./T/. &O>8 R8;T82 >/4I. CHOIC8... R TO &8SS/<8I. 21! 18@IT. 8@IT.

1!

Customer Information Control System (CICS)


T

1!1

Customer Information Control System (CICS)

(++en&iB,C
'iblio*ra+hy
1. 2. 3. !. #. CICS for COBO4 $ro%rammers '$art 1( By .ou% 4o6e CICS for COBO4 $ro%rammers '$art 2( By .ou% 4o6e CICS a Ho6 To "or COBO4 $ro%rammer IB& Independent Study $ro%ram IB& /pplication $ro%rammers 2eference &anual

1!2

Customer Information Control System (CICS)

(++en&iB,D
Table Of .i*ures
Ta-le 1.1C Batch System >s Online System....................................................................................6 "i%. 1.1C CICS System Components..............................................................................................13 "i%.2.1C Terminal Control $ro%ram &ana%ement &odule............................................................1# 8%.3.1C "ormat of B&S macros....................................................................................................2! 8%.3.2C 8:ample of B&S macros..................................................................................................2! 8%.3.3C B&S &acro .efinition.....................................................................................................26 8%.3.!C "ormat of ."H&S. &acro.............................................................................................26 8%.3.#C "ormat of ."H&.I &acro..............................................................................................28 8%.3.6C "ormat of ."H&." &acro.............................................................................................28 8%.3.+C 8:ample Of Sym-olic &ap .efinition.............................................................................31 "i%.!.1C 0uasi12eentrant $ro%ram................................................................................................33 "i%.#.1C Command 4e3el Translator.............................................................................................38 8%. #.1C ."HCO&&/28/ ?sa%e...............................................................................................! 8%.6.1C ."H&SC/ Constants.....................................................................................................!2 8%.6.2C Installation .efined /ttri-ute Constants..........................................................................!3 8%.6.3C Installation .efined &essa%e "ile...................................................................................!3 8%.6.!C ?sin% /I. Information In /pplication $ro%ram.............................................................!! 8%.+.1C "ormat Of H/;.48 CO;.ITIO; Command................................................................!6 8%.+.2C 8:ample Of H/;.48 CO;.ITIO; Command............................................................!+ 8%.+.3C "ormat Of I<;O28 CO;.ITIO; Command.................................................................!+ 8%.+.!C 8:ample Of I<;O28 CO;.ITIO; Command..............................................................!8 8%.+.#C "ormat Of ;OH/;.48 .................................................................................................!8 8%.+.6C 8:ample Of 28S$E ;OH/;.48....................................................................................!, 8%.+.+C "ormat Of H/;.48 /I. Command...............................................................................!, 8%.+.8C 8:ample Of H/;.48 /I. Command............................................................................#1 8%.+.,C .isad3anta%e Of H/;.48 /I. Command.....................................................................#1 8.%. 8.1C .ynamically attri-ute 3alue assi%nment.........................................................................#! 8.%. 8.2C Static Cursor $ositionin%................................................................................................#! 8.%. 8.3C Sym-olic Cursor $ositionin%..........................................................................................## 8.%. 8.!C 2elati3e Cursor $ositionin%............................................................................................## "i%.,.1C Concept of B&S operations.............................................................................................#6 8.%. ,.2C "ormat Of 28C8I>8 &/$ Command...........................................................................#+ 8%.,.3C "ormat Of S8;. Command...........................................................................................#, 8%.,.!C 8:ample Of S8;. Command..........................................................................................61 8%.,.#C "ormat Of 28C8I>8 Command......................................................................................62 8%.,.6C 8:ample Of 28C8I>8 Command...................................................................................62 8%.,.+C "ormat Of S8;. T8@T Command.................................................................................6! 8%.,.8C 8:ample Of S8;. T8@T Command...............................................................................6! 8%.1 .1C "ormat Of /S*TI&8 Command...................................................................................6# 8%.1 .2C "ormat Of "O2&/TTI&8 Command...........................................................................66 8.%.11.1C "ormat Of 28T?2; Command....................................................................................68 "i%.11.1C 4I;* command.............................................................................................................68

1!3

Customer Information Control System (CICS)


8.%.11.2C "ormat Of 4I;* Command..........................................................................................6, "i%. 11.2C /pplication $ro%ram lo%ical le3els...............................................................................6, 8.%.11.3C "ormat Of @CT4 Command..........................................................................................+ 8.%.11.! 4I;* 8:ample...............................................................................................................+ 8.%.11.#C @CT4 8:ample.............................................................................................................+ Ta-le 11.1C @CT4 3s. 4I;*.........................................................................................................+1 8.%.12.1C "ormat Of Y28/. 6ith "ull *eyB Command................................................................+3 8.%. 12.2C 8:ample Of Y28/. 6ith "ull *eyB Command............................................................+! 8.%. 12.3C 8:ample Of Y28/. 6ith %eneric *eyB Command.......................................................+6 8.%. 12.!C 8:ample Of Y28/. 6ith <T80 optionB Command....................................................+8 8.%. 12.#C 8:ample Of Y28/.7?$./T8 and 28A2IT8B Command.........................................+8 8.%. 12.6C 8:ample Of Y?;4OC*B Command.............................................................................8 8.%. 12.+C "ormat Of YA2IT8B Command....................................................................................81 8.%. 12.8C 8:ample Of YA2IT8B Command.................................................................................81 8.%. 12.,C 8:ample Of YA2IT8 6ith &/SSI;S82TB Command................................................83 8.%. 12.1 C 8:ample Of Y.848T8 after 28/.7?$./T8B Command........................................83 8.%. 12.11C 8:ample Of Y.irect .848T8 '6ithout prior 28/.7?$./T8(B Command.............8! 8.%. 12.12C 8:ample Of Y<roup .848T8B Command.................................................................8# 8.%. 13.1C "ormat Of YST/2TB2B Command..............................................................................8# 8.%. 13.2C 8:ample Of YST/2TB2B Command............................................................................8+ 8.%. 13.3C "ormat Of Y28/.;8@TB Command..........................................................................88 8.%. 13.!C 8:ample Of Y28/.;8@TB Command.......................................................................88 8.%. 13.#C 8:ample Of Y28/.$28>B Command........................................................................, 8.%. 13.6C 8:ample Of S)ip Se=uential $rocessin%......................................................................,1 8.%. 13.+C 8:ample Of Y28S8TB2B Command...........................................................................,3 8.%. 13.8C 8:ample Of Y8;.B2B Command...............................................................................,! 8.%. 13.,C 8:ample Of &ultiple -ro6se.......................................................................................,! 8.%. 13.,C 8:ample Of &ultiple Bro6se ContBd..........................................................................,# 8.%. 1!.1C 8:ample Of A2IT80 TS Command..........................................................................,8 8.%. 1!.2C 8:ample Of 28/.0 TS Command '.irect 2ead(.......................................................,, 8.%. 1!.3C 8:ample Of 28/.0 TS Command 'Se=uential 2ead(..............................................1 8.%. 1!.!C 8:ample Of A2IT80 TS Command 6ith 28A2IT8 Option...................................1 2 8.%. 1!.!C 8:ample Of A2IT80 TS Command 6ith 28A2IT8 Option ContBd.......................1 2 8.%. 1!.#C 8:ample Of .848T80 TS Command.......................................................................1 2 8.%. 1#.1C 8:ample Of A2IT80 T. Command.........................................................................1 # 8.%. 1#.2C 8:ample Of 28/.0 T. Command .........................................................................1 6 8.%. 1#.3C 8:ample Of .848T80 T. Command......................................................................1 + 8.%. 1#.!C "ormat of .CT 8ntry for Intrapartition T.0.............................................................1 + 8.%. 16.1C 8:ample of ST/2T Command...................................................................................11 8.%. 16.2C 8:ample of 28T2I8>8 Command............................................................................111 8.%. 16.3C 8:ample of C/;C84 Command...............................................................................112 8.%. 16.!C 8:ample of S?S$8;. Command..............................................................................113 8.%. 16.#C 8:ample of 8;0 and .80 Command.......................................................................11! 8.%. 1+.1C "ormat of H/;.48 /B8;. Command...................................................................116 8.%. 1+.2C "ormat of /B8;. Command....................................................................................116 8.%. 1+.3C 8:ample of /B8;. Command..................................................................................11+ 8.%. 1+.!C "ormat of .?&$ Command......................................................................................118 8.%. 18.1C "ormat of S9;C$OI;T Command............................................................................121 8.%. 1,.1C "ormat of declarin% B44 cell list ...............................................................................123 8.%. 1,.2C "ormat of S82>IC8 284O/. Command................................................................12!

1!!

Customer Information Control System (CICS)


8.%. 1,.3C "ormat of /..28SS Command................................................................................12! 8.%. 1,.!C "ormat of <8T&/I; Command................................................................................12# 8.%. 1,.#C 8:ample of <8T&/I; Command.............................................................................126 8.%. 1,.6C "ormat of "288&/I; Command..............................................................................12+ 8.%. 1,.+C 8:ample of "288&/I; Command...........................................................................12+ 8.%. 1,.8C "ormat of 4O/. Command.......................................................................................12+ 8.%. 1,.,C 8:ample of 4O/. Command....................................................................................128 8.%. 1,.1 C "ormat of 2848/S8 Command...............................................................................12, 8.%. 1,.11C 8:ample of 2848/S8 Command............................................................................13

1!#

You might also like