CICS Tutorial
CICS Tutorial
CICS Tutorial
to interact with a computer and access its resources via a terminal. Example : Railway Reservation system. BATCH & ONLINE SYSTEM BATC ONLINE !ata "rom card tape# dis$ Batched# !ata "rom terminal random# Input se%uential# scheduled concurrent Operator )or operating system* initiates Once CIC& is initiali+ed# entering &tart o" A 'o( the 'o(. Other 'o(s in the same region transaction id triggers the must wait. transaction to start. ,rocessing &ingle tas$ single thread. ,riority in -ulti tas$ multi thread. ,riority -ode 'o( scheduling processing. Each transaction. Once CIC& is End o" 'o( Each 'o( terminated# no transactions can (e entered. printed reports# output "iles. .ser must -essage terminals updated "iles# Output wait "or (atch 'o(s to produce reports system Instant "eed (ac$ )day# wee$# month* Resource Less -ore .sage E/ample o" -onthly sales report Airline reservation system application WHAT IS CICS Customer In"ormation Control &ystem )CIC&* was developed in 0123 (y IB ONLINE CONTROL &4&TE 5eneral purpose data communication control system ,rovides services to handle all the special re%uirements "or online processing Note : Role o" CIC& is to inter"ace (etween application programs and the !B6!C control system. CICS SERVICES & THE OPERATING SYSTEM Re%uests "or "ile I6,# O6, Re%uests "or data(ase I6,# O6, Re%uests "or terminal I6,# O6, CICS CONTROL PROGRAM AND TABLES CICS CONT!OL "!O#!AM CIC& CONTROL ,RO5RA- )IB- &.,,LIE!* 7C, )7ILE CONTROL ,RO5RA-* 8C, )8O.RNAL CONTROL ,RO5RA-* 9C, )TA&9 CONTROL ,RO5RA-* ,C, ),RO5RA- CONTROL ,RO5RA-*
&C, )&TORA5E CONTROL ,RO5RA-* TC, )TER-INAL CONTROL ,RO5RA-* T!, )TRAN&IENT !ATA ,RO5RA-* T&, )TE-,ORAR4 &TORA5E ,RO5RA-* OT ER& CICS CONT!OL TABLES CIC& CONTROL TABLE& ).&ER &,ECI7IE!* 7CT )7ILE CONTROL TABLE* 8CT )8O.RNAL CONTROL TABLE* ,CT ),RO5RA- CONTROL TABLE* ,,T ),ROCE&&IN5 ,RO5RA- TABLE* TCT )TER-INAL CONTROL TABLE* !CT )!E&TINATION CONTROL TABLE* T&T )TE-,ORAR4 &TORA5E TABLE* CICS STA!T $" CIC& is su(mitted as a (atch 'o(. CIC& &ystem Initiali+ation program )&I,* is the main 'o( step &I, loads &ystem Initiali+ation Ta(le )&IT* &I, "urther loads all control programs and ta(les : ,er"orm initial house$eeping tas$s CICS SH$TDOWN -aster terminal transaction is entered with shutdown option CIC& 'o( produces various logs# statistics# dumps and other reports and ends No transaction can (e e/ecuted a"ter that !OLE OF CICS -.LTI TA&9IN5 o -ore than one tas$ can (e e/ecuted concurrently. -.LTI T REA!IN5 o Tas$s share the same program under the multi tas$ing environment. RE:ENTRANT ,RO5RAo ,rogram when does not modi"y itsel" in any way during e/ecution. ;.A&I RE:ENTRANT o Is a reentrant program under the CIC& environment. MAPS AND DISPLAYS INT!OD$CTION TO BMS To ma$e the application program device independent and "ormat independent CIC& provides Basic -apping &upport )B-&* B-& is a standard "acility# to deal with the "ormatted screen operations &creen de"ined through B-& is called a <-A,< "HYSICAL AND SYMBOLIC MA" "%&'i(al Map ,rimarily used (y CIC& Ensures device independence in the application program 7or input operations# it de"ines the ma/imal data length and starting position o" each "ield to (e read and allows B-& to interpret an input data stream 7or output operations it de"ines starting position# length# "ield characteristics
)Attri(ute Bytes* and de"ault data "or each "ield# and allows B-& to construct an output data stream. ,hysical map is a program in the "orm o" Load module ,hysical map is coded using B-& macros B-& macros are assem(led separately and lin$ edited into the CIC& load li(rary SYMBOLIC MA" 0. Ensures the device and "ormat independence to the application programs =. A layout change in the "ormatted screen can (e done independent o" the application program coding as long as "ield name and length remain the same >. &ym(olic map is included in the program (y issuing a COBOL CO,4 statement USING MAPS IN A PROGRAM SYMBOLIC MA" #ENE!ATION &ym(olic map is a copy li(rary mem(er Included in application program "or de"ining the screen "ields. B-& -acros are coded# assem(led and catalogued into a CO,4 li(rary
&4-BOLIC -A, S$FFI)ES al"ward (inary Contain the length o" data entered (y the terminal operator 7 One (yte "lag "ield I Contains the data entered (y the operator A One (yte "ield that contains Attri(ute (yte O Contains data to (e sent to terminal &4-BOLIC -A, FO!MAT A 0= (yte TIOA pre"i/ is automatically provided. ?hen per"orming input "unctions "ields su""i/ed with @LA# @7A# and @IA are meaning"ul. ?hen per"orming O.T,.T "unctions# the "ields su""i/ed with @AA and @OA are meaning"ul.Contains the data to (e sent to the terminal. O$T"$T MA""IN# *MA" ONLY+ EBEC CIC& &EN! -A, )@mapname0C* -A,&ET )Dmapset0C* -A,ONL4 EN!:EBEC L *DATA ONLY+ EBEC CIC& &EN! -A, )Dmapname0C* -A,&ET )Dmapset0C* !ATA ONL4. EN!:EBEC.
0. -A, ONL4 option. o .se the physical map only. o 7ield headings# attri(ute (ytes# and the location o" where all in"ormation is to (e placed is sent. =. !ATA ONL4 o .se the sym(olic map only o only the data in the sym(olic map is sent to the screen. >. Neither @ -A,ONL4 NOR !ATAONL4< EBEC CIC& &EN! -A, )Dmap:name0C* -A,&ET )Dmapset0C* EN!:EBEC
o The physical map and the data "rom sym(olic map is sent to the terminal. Other options o" SEND command.
ERA&EE Current screen is erased (e"ore the map speci"ied appears on the screen ERA&EA.,E erase all the unprotected "ields. 7REE9BE to "ree the $ey(oard ALAR-E to ma$e an alarms sound. 7R&ETE to reset -!T to +ero C.R&ORE to place the cursor in a speci"ied "ield C$!SO! "OSITIONIN# &tatic positioning o I" IC option is speci"ied in the ATTRB "ield o" !7 -!7 macro the cursor will (e placed at this "ield. !ynamic 6 sym(olic positioning. o ,lace ):0* into the "ield length "ield )@LA su""i/*. Cursor will (e placed in the "ield. !ynamic 6 Relative positioning. o Cursor )data:value* option is used. o !ata:Falue will have the value at which the cursor has to (e positioned. o E.g.. EBEC CIC& &EN! -A, )G..* -A,&ET )G..* C.R&OR )033* ERA&E EN!:EBEC. -A,7AIL condition will caused in RECEIFE -A, command. o I" the data to (e mapped has a length o" +ero. o I" the operator presses any $ey )clear# ,A# ,7# ENTER# 9eys* without entering any data. ACCESSIN# AND DIS"LAYIN# MA" FIELDS MA" STO!A#E A!EAS ,lacing maps in the ,rogram
Any o" the three plans "or rede"inition o" maps may (e used with either o" the = alternatives "or placing maps in your program. ?OR9IN5 : &TORA5E &ECTION o Copying a sym(olic description map structure here ma$es the area automatically availa(le whenever the program is invo$ed.
o
LIN9A5E &ECTION o Copying a sym(olic description map structure here does NOT mean the storage will (e availa(le. &ome methods "or providing storage are passing a CO--AREA# ac%uiring temporary storage with the &ET option# or using a 5ET -AIN command. SEND , !ECEI-E Se./i.0 1rom t%e S&m2oli( /e'(riptio. map
&EN! -A, )H-A,0I* -A,&ET)H&ET0I* -OFE H-A,0I TO -A,FAR -OFE H&ET0I TO &ETFAR &EN! -A, )-A,FAR* -A,&ET)&ETFAR* 7RO- )-A,0O* o SEND MA" Co/i.0 Alter.ati3e' 4ou can code the &EN! -A, command to locate the sym(olic description map in several waysE .sing constants in the name "ield "or -A, and -A,&ET)7ROis not re%uired* .sing varia(les in the name "ield "or -A, and -A,&ET )This ma$es 7RO- a re%uired parameter* .sing only the -A, parameter. In this case the name in the -A, option must (e the -A,&ET name. !ECEI-IN# i.to t%e '&m2oli( /e'(riptio. map RECEIFE -A,)H-A,0I* -A,&ET)H&ET0I* ... -A,0 I -ove H-A,0I to -A,FAR -ove H&ET0I to &ETFAR ..... -A,0 I RECEIFE -A, )-A,FAR* -A,&ET)&ETFAR* INTO )-A,0 I* Receive -A, )H&ET0I* ... &ET0 I o !ECEI-E MA" (o/i.0 alter.ati3e' 4ou can code the RECEIFE -A, command to locate the sym(olic description map in several waysE .sing constants in the name "ield "or map and mapset )INTO6&ET is not re%uired* This is the most commonly used "ormat. .sing varia(les in the name "ield "or -A, and -A,&ET. This ma$es INTO )data(ase* or &ET a re%uired parameter.
.sing only the -A, parameter. In this case the name in the -A, option must (e the -A,&ET name. Lin$age &ection. 30 !7 CO--AREA 30 L&T 3= ,TR:=:LI&T ,IC & 1)J* CO-,. 3= ,TR:=:B-& ,IC & 1)J* CO-,. RECEIFE -A, )H-A,0I* -A,&ET )H&ET0I* &ET ),TR:=:B-&* ..... -A,0 I .sing the &ET option re%uests CIC& to get the storage and return a pointer to it. The sym(olic description map must (e in the LIN9A5E &ECTION. O$TBO$ND F$NCTIONS &EN! -A, )H-A,AI* -A,&ET )H&ETAI* KERA&E6 ERA&EA.,L K7REE9BL KALAR-L K7R&ETL K,RINTL ERA&E Erase Bu""er# place cursor in upper le"t corner then write ERA&EA., Erase all the unprotected "ields (e"ore the ?rite 7REE9B .nloc$ 9ey(oard a"ter the write ALARActive alarm with the write 7R&ET &et all -!T currently on to o"" ,RINT &tart the >=M3 print operation. Co.trol Fu.(tio.': Typically the "irst type o" command in the program is a &EN! -A,. Certain control "unctions may (e included in that command. ERA&EA., will clear out each "ield whose attri(ute is unprotected. It will NOT alter any attri(ute settings. I" you do not "ree the $ey(oard using 7REE9B# the operator will have to press the RE&ET $ey (e"ore entering data. I" you code 7R&ET# all attri(ute (ytes currently having -odi"ied !ata Tags )-!T* set on will (e set o"". &elective resetting o" the -!TIs must (e done another way. ?hen sending data to a >=M3 screen the actual printing "rom the (u""er will occur when the ,RINT "unction is re%uested. Attri2ute' : The HAI su""i/ed "ield is an attri(ute "ield which controls the "ollowingE ,ROTECTE!6.N,ROTECTE! A&9I, N.-!T Non !isplay )dar$*!I&,LA4 )normal6(right*
I" the color or highlighting o" a "ield has to (e changed# additional sym(olic "ields are needed which are called the EBTEN!E! ATTRIB.TE&. E)TENDED ATT!IB$TES !&ATT& )"or sym(olic map* and -A,ATT& )"or physical map* support the e/tended attri(ute characteristics The -A,ATT& allows you to set up the physical map with any o" the characteristic)s* coded. The !&ATT& will create appropriate su""i/ed la(els "or the attri(ute characteristic)s* coded. INBO$ND F$NCTIONS - AID,C$!SO! CONT!OL Attention Identi"ier )I!* and CursorE o On a RECEIFE# CIC& updates the EIB with the "ollowing in"ormationE The screen cursor position relative to +ero is placed is EIBC,O&N. The name o" the input $ey the terminal operator pressed is placed in the "ield EIBAI!. EIBAID,C$!SO! ?OR9IN5:&TORA5E &ECTION. CO,4 !7 AI!. ...... ,ROCE!.RE !IFI&ION. I7 EIBAI! N !7 ,70= T EN ...... I7 EIBAI! N !7 ENTER T EN ...... I7 EIBC,O&N LE&& T AN J3 T EN ......
?hen you "irst enter your program as a result o" a transaction id# you can test EIBAI! and6or EIBC,O&N. This may (e done prior to issuing a RECEIFE command# i" so chosen. AID,C$!SO! - SAM"LE CODIN# 4CONT!OL5 I" the operator uses any ,A $ey or presses the CLEAR $ey# no data is transmitted EIBAI! is use"ul when "unction $eys are de"ined "or the user. "or eg. ,70= may (e the e/it "unction ,7> may (e an update "unction etc. Thus testing "or the type o" AI! will alter the logic "low. EIBC,O&N can (e used to determine where the cursor was positioned on the screen. This in"ormation is especially use"ul with screens containing an action (ar. C$!SLOC Sample Map -A,&ETA !7 -&! T4,ENO&4&,AR-# -O!EN INO.T# TER-NALL# LAN5NCOBOL# TIOA,7BN4E&# &TORA5ENA.TO -A,0 !7 -!I &IPEN)=Q#J3*# LINEN0# COL.-NN0# C.R&LOCN4E&
NA-E
!7 -!7 ,O&)=#0*# LEN5T NQ# INITIALNHNA-EI# ATTRIBNA&9I, !7 -!7 ,O&)=#2*#LEN5T N=3# ATTRBN).N,ROT# IC* !7 -!7 ,O&)=#=M*# LEN5T N0# ATTRBN,ROT
C.R&LOCN 4E& allows you to determine a"ter a RECEIFE -A, command# which map "ield had the cursor in it. C.R&LOCNNO is the de"ault. C.R&LOCN)NO64E&* may (e coded on the !7 -&! or the !7 -!I macro. I" coded on the !7 -&! macro# it will provide a de"ault "or all the maps in that mapset. ?hen C.R&LOCN4E&# B-& will set the H7I su""i/ "ield to BI3=I indicating that "ield contained the cursor. I" the cursor is in a "ield "or which there is no sym(olic la(el i.e. a !7 -!7 with no la(el the program will not (e noti"ied. Note E The H7I su""i/ "ield continues. To (e used to indicate the operator pressed the erase to end o" "i/ed )EO7* $ey (y (eing set to BIJ3I. There"ore# i" C.R&LOCN4E& it is possi(le to have (oth these conditions occur "or the same "ield# in which case the H7I su""i/ "ield will contain a BIJ=I. EDITIN# -ap "ield !e"inition ,ICIN6,ICO.T Built in "unction !e:edit command. ?hen data is sent out via the HOI su""i/ "ields or received into the HII su""i/ "ields you may want a de"inition other than ,IC /. ,ICIN AN! ,ICO.T allows the user to use other COBOL ,IC& such as R#P etc. I" the date contains special characters# you may want to remove them using the BI7 !EE!IT command. "IC IN,"IC O$T I" ,ICIN6,ICO.T is not coded in the macro# the pic generated is always ,IC B )length o" "ield* By using ,ICIN6,ICO.T B-& can (e "orced to generate the appropriate ,IC. ,ICIN tells B-& how to move data into the HII su""i/ "ield. ,ICO.T tells COBOL how to edit your data move to the HOI su""i/ "ield. FIELD EDIT B$ILT-IN F$NCTION Amount BI7 Amount RSQ>0.J3 E!IT 33SQ>0J3 EBEC CIC& BI7 !EE!IT 7IEL! )amount* LEN5T )J* EN!:EBEC. BI7 !EE!IT is used to remove the special characters "rom the input "ield. The Amount "ield displayed has a dollar sign and a decimal point
By using BI7 !EE!IT dollar sign and decimal point is removed. Thus the num(er can (e used "or arithmetic operations. COBOL compiler re%uires LEN5T speci"icationE F& COBOL:II uses the implied length o" the data:area used in the "ield parameter. CICS PROGRAM COMPONENTS OB6ECTI-ES &tructure o" CIC& Application ,rogram CIC& -anagement 7unctions &tarting a Tas$ ConversationalO ,seudoconversational transactions CIC& ,rogram preparation CIC& ,rogram testing O !e(ugging CIC& commands ,assing !ata across tas$s ST!$CT$!E OF CICS A""LICATION "!O#!AM I/e.ti1i(atio. Di3i'io. "ro0ram - ID re7uire/ Other comments as (elow# are optional (ut recommended. o Author o !ate:?ritten o !ate:compiled o Remar$s E.3iro.me.t Di3i'io. Only header is re%uired Other re%uirementsE COBOL statements and CIC& commands should (e coded The "ollowing COBOL statements are prohi(ited. ACCE,T# C.RRENT:!ATE# !ATE# !A4# !I&,LA4# EB IBIT# &TO, R.N# TRACE Any I6O &tatements)O,EN# CLO&E# REA!# ?RITE# RE?RITE# !ELETE# &TART* RE,ORT ?RITER "eature &ORT "eature CALL statement is allowed i" the called program does not issue any CIC& commands or inhi(ited COBOL statements mentioned a(ove. TE!MINATION STATEMENTS Note' :This is not the way to terminate a CIC& program. CIC& has a command "or that purpose. Nevertheless# COBOL and F& COBOL II have three statements to conclude programs. Control must not (e allowed to pass (eyond the last statement o" a CIC& ,rogram. &TO, R.N in COBOL uses operating system "acilities# and there"ore# is discouraged. EBIT program is ignored i" the program has not (een called. CIC& RET.RN CO--AN! and6or 5OBAC9 statement is recommended. CICS MANA#EMENT F$NCTIONS
Transactions Tas$ ,rogram Tra.'a(tio.' An e/change (etween a terminal and a data (ase representing an application process. 7or e/ample# an in%uiry or a deposit and (alance update Ta'8 A speci"ic instance o" a transaction i.e. a uni%ue unit o" wor$. "ro0ram ,repared statements compiled or assem(led into an e/ecuta(le module o" machine instructions. CON-E!SATIONAL T!ANSACTION ,rogram uses a pair o" &EN! and RECEIFE commands. ,rogram waits until the user responds. Resources are held until the user responds. Fery ine""icient way o" conversing with the user. "SE$DO CON-E!SATIONAL T!ANSACTION The tas$ is terminated a"ter a message is sent with a lin$age "or the ne/t tas$. CIC& provides a "acility )CO--AREA* to made it easier to accomplish this. ?hen the user completes response )(y pressing enter* reset tas$ is automatically initiated (y CIC&. The tas$ receives the message "rom the terminal O processes it. This is a multitas$ operation "rom systemIs point o" view. "!O#!AM "!E"A!ATION Running the !B= precompiler "irst is the pre"erred method. !B= precompiler precedes another process# (inding# not mentioned here. Output o" the !B= precompiler can serve as input to the translator. Output o" the translator will (e input to the compiler. -essages or warnings are provided on all the listings. TRAN&LATOR recogni+es EBEC CIC& and EBEC !LI statements. They are commented out and replaced with statements in the appropriate language. ere# COBOL -OFE instructions and a CALL are inserted and passed on to the COBOL compiler. !B= ,recompiler is supplied (y the relational data (ase managers# !B= and &;L6!&. It recogni+es EBEC &;L statements which it will comment out and replace with in our case. COBOL ,ER7OR- and CALL statements. Output o" the transaction is i6p to the compiler The o6p o" the lin$age editor is e/ecuta(le. The load module is placed in the CIC& online program li(rary. -essages or warnings are provided on all the listings. The compiler listing is or limited use i" the translator listing would not process all commands. TESTIN# CE-T set program )prg0* New comp Or CE-T & ,R )prg0* N
A"ter ma$ing changes to a program the new version replaces old version# (ut CIC& which is currently e/ecuting has no way o" $nowing this automatically. The CIC& processing program ta(le ,,T still points to the old:version. To avoid testing with the old version# you must use the CIC&:provided CE-T transaction to update the pointer to the program. COMMON FO!MAT A CIC& command consists o" a $eyword phrase# delimiter# "unction# options and their argument values. Be care"ul a(out periods. Avoid them a"ter EN!:EBEC. ?here you donIt really want them. 7or eg. within an I1 9999 t%e. 999 el'e 'tateme.t The translator will place a period into the generated code i" a period "ollows end: e/ec. A!#$MENT -AL$ES ,IC &1)Q* comp al"word (inary data : value ,IC &1)J* comp 7ullword (inary ,IC B)0S* character string constants permitted COBOL data name )Not a constant* eg E: data : area 30 Record:area. 3S 7ld 0 3S 7ld = name COBOL data name Character string la(el ,aragraph name ,IC &1)M* comp > hhmmss ,ac$ed decimal BLL cell pointer:re" .sage pointer !ECEI-E COMMAND EBEC CIC& RECEIFE INTO )data area* LEN5T )ml* EN!:EBEC RECEIFE command is used to receive incoming data "rom the terminal to which this CIC& transaction is associated. A receiving area must (e de"ined in wor$ing storage section and has to (e speci"ied in the INTO parameter. Length "ield must (e de"ined in wor$ing storage section as a &1)Q* comp. It has to (e speci"ied in length option. SEND COMMAND EBEC CIC& &EN! 7RO- )data area* LEN5T )ln* EN!:EBEC
The data to (e sent must (e stored in wor$ing storage section# and this "ield name has to (e speci"ied in the 7RO- parameter. Length must (e speci"ied the same as that o" the Receive command.
E)CE"TIONAL CONDITIONS RE&, option o !e"ine a "ull word (inary "ield &1)J* comp in the wor$ing storage section as the response "ield. o ,lace RE&, option with the response "ield in any CIC& command. o A"ter command e/ecution# chec$ the response code in the response "ield with !7 RE&, )////*where //// is NOR-AL "or normal completion or Any e/ceptional condition
HANDLE CONDITION andle condition command is used to trans"er control to the procedure la(el speci"ied i" the e/ceptional condition# speci"ied occurs. Remains active until the end o" program or another handle condition re%uest overrides it. I#NO!E CONDITION Ignore condition command causes no action to (e ta$en i" the condition speci"ied occurs in the programs. Re%uest (y the I5NORE CON!ITION command is valid until the su(se%uent AN!LE CON!ITION command "or the same condition. NO HANDLE O"TION I" NO AN!LE option is speci"ied in any CIC& command# no action will (e ta$en "or any e/ceptional condition occurring during e/ecution o" this command. o Eg E EBEC CIC& &EN! 7rom )...* Length )...* NO AN!LE EN!:EBEC FO!MATTIN# TIME AND DATE A&9TI-E Command o used to re%uest the current date and time o EIB!ATE and EIBTI-E "ields have the values at the tas$ initiation time. 7OR-AT EXEC CICS ASKTIME END-EXEC FO!MAT TIME COMMAND .sed to receive the in"ormation o" data and time in various "ormats. o 7ormat K44!!! )data : area*L K44--!! )data : area*L K44!!-- )data : area*L K--!!44 )data : area*L
K!!--44 )data : area*L K!ATE&E,)data : value*L K!A4 O7 ?EE9 )data : area*L K!A4 O7 -ONT )data : area*L K-ONT O7 4EAR )data : area*L K4EAR )data : area*L KTI-E )data : area*L KTI-E&E, )data : value*L !ATE&E, represents data separator )de"ault is <6<*. TI-E&E, represents time separator )de"ault is <E<*. The data area "or the AB&TI-E option o" A&9TI-E and 7OR-ATTI-E commands must (e a 0S:digit pac$ed decimal data type. DELAY COMMAND used to delay the processing o" a tas$ "or the speci"ied time interval or until the speci"ied time. 7OR-AT EBEC CIC& !ELA4 INTERFAL )33=333* TI-E )0S=333* End : EBEC Tas$ will (e suspended "or =3 minutes i" INTERFAL is speci"ied or until 0SE=3E33 i" TI-E is speci"ied. COMMA!EA ,assing data via the CO--AREA pseudo conversational tas$ to tas$ Lin$ing program to program "SE$DO CON-E!SATIONAL ,seudo conversational techni%ue is uses the multiple transaction identi"iers)pct entries* and multiple program )pct entries*. It per"ormsthe terminal conversation in the "ollowing wayE A conversational program is logically and physically divided into separte programs a"ter sending a message and (e"ore receving the message. 7or each separate program# a uni%ue cics trasction identi"ier is assigned. (e"ore terminating the program# each program issues the RET.RN command with the ne/t transaction identi"ier which is associated with the ne/t program# unless it is the least return to CIC& itsel". in this way# a series o" terminal conversations can (e carried out continuously. "ASSIN# DATA TO NE)T TAS:
Note' :
o o
The "irst time commarea is passed# it must (egin as an area o" storage in the wor$ing storage section o" the program passing it. A commarea parameter in the RET.RN will pass the area to the program associated with the su(se%uent transaction. In this case# itsel".
The su(se%uent program )in this case the same program* must de"ine access to all the commarea that was passed to it. ,A4ROLL as (oth the sender and the receiver o" the CO--AREA needs the wor$ing storage de"inition to send and the lin$age section !7 CO--AREA to receive. ,A4ROLL must there"ore (e a(le to distinguish (etween 7IR&T TI-E into the program. ?hen there is no CO--AREA and su(se%uent times in. ?here one e/ists in the Lin$age section. The EIB "ield# EIBCALEN indicates the length o" the commarea. EIBCALEN 7irst time into the program no commarea e/ists# there"ore EIBCALEN N 3 ?hile returning the control to CIC& the wor$ing storage is loaded and this is sent via the commarea parameter in the RET.RN Transid. On su(se%uent entry# commarea e/ists and is automatically made addressa(le (y CIC& in the lin$age section o" !7 CO--AREA "ASSIN# DATA $SIN# LIN: To pass control "rom one program to another and then return to the original li$e e/ecuting a su(routine. The lin$ command passes control to another program de"ined in CIC& ,,T e/pecting that the program will return to the lin$ing program instruction "ollowing the LIN9 command. This happens when the lin$ed program issues a RET.RN command. !ata may (e passed using the commarea. The commarea is shared (etween the two program regains control may changes made to the commarea (y the lin$ed program are accessi(le. The two programs e/ecutive under the same tas$. The wor$ing storage section "or the lin$ing program is retained. ?or$ing storage "or the lin$ed program is automatically released a"ter its RET.RN command is e/ecuted. To pass control "rom one program to another and then return to the original li$e e/ecuting a su(routine. The lin$ command passes control to another program de"ined in CIC& ,,T e/pecting that the program will return to the lin$ing program instruction "ollowing the LIN9 command. This happens when the lin$ed program issues a RET.RN command. Reading Ex e!na" Da a Fu.(tio.al o3er3ie; !IRECT RETRIEFAL o F&A- !ATA &TR.CT.RE& !IRECT RETRIEFAL o RELATIONAL TABLE RO? BRO?&E o F&A- !ATA &TR.CT.RE BRO?&E o RELATIONAL TABLE RO?& Entry "or F&A- "ile has to (e there in 7CT )7ile Control Ta(le*
o
Each entry contains all descriptive in"ormation "or the "ile it represents. &o# programmer need not de"ine the physical organi+ation and other attri(utes o" the "iles. o The 7ile parameter coded in the program must (e the same as the "ile name in the 7CT. o Inter"ace (etween CIC& and Relational !ata(ase is called CIC& attachment 7acility. &tatement are coded in &;L language in the application program to Communicate data re%uests to the data(ase. TO"ICS !IRECT RETRIEFAL o F&A- 7ILE RECOR! o RELATIONAL TABLE RO? BRO?&E o F&A- 7ILE RECOR!& o &ET O7 RELATIONAL TABLE ?OR9& -SAM DATA ST!$CT$!ES CIC& uses the "ollowing F&A- structures o 9ey se%uenced data set )9&!&* o Entry se%uenced dataset )E&!&* o Relative record dataset )RR!&* "!O#!AM O!#ANI<ATION 7ile attri(utes are de"ined in the 7CT "or each "ile 7iles are opened (y CIC& o Immediately a"ter system initiali+ation i" speci"ied in the 7CT. o In response to a "ile access re%uest "rom an application i" the "ile is closed o In response to a master terminal CE-T re%uest "rom an operation. Application program is not responsi(le "or open 6 close o" "iles !ECO!D IDENTIFICATION RECOR! 9E4 RELATIFE B4TE A!!RE&& RELATIFE RECOR! N.-BER ,ARTIAL 9E4 o $ey o" the record to (e read is speci"ied in the RI!7L!. "or 9&!& o 9ey speci"ied can (e a "ull $ey or partial $ey o I" partial $ey# $ey length has to (e provided o RBA )Relative Byte Address* o Can also (e used instead o" actual $ey value 7or E&!& o RI!7L! contain a Q (yte RBA 7or RR!& o RI!7L! contains Q Byte (inary relative record num(er. !ECO!D :EY DEFINITION E)AM"LE ?OR9IN5 : &TORA5E &ECTION. 3S REC9E4 ,IC B)2*. ,ROCE!.RE !IFI&ION. -OFE FAL.E TO REC9E4.
RI!7L! must (e set to the value o" the $ey o" the record to (e retrieved. RI!7L! must (e large enough to hold a "ull record $ey even when a partial $ey is used. !EAD COMMAND REA! command with INTO Option. )7.LL 9E4* o Reads the record speci"ied (y the "ull $ey. o The data content o" the record is moved into the speci"ied data:area de"ined in the wor$ing storage section. o 7OR-AT EBEC CIC& REA! !ATA&ET )name* T 7ILE )name* INTO )data:area* T&ET)ptr:re"* RI!7L! )data:area* K LEN5T )data:values* L EN! : EBEC. !ATA&ET 6 7ILE names the "ile. It must (e de"ined in 7CT. INTO names the "ield in the wor$ing storage section where the data has to (e placed. RI!7L! is the $ey "ield. LEN5T is hal" word (inary. It indicates ma/imum length o" the record to (e read. It is optional. EXCEPTIONAL CONDITIONS !.,9E4 E I" duplicate record is "ound "or the speci"ied $ey. NOT7N! E I" the record is not "ound "or the $ey speci"ied. LEN5ER R LEN5ERR E The speci"ied length )in LEN5T O,TION* is shorter than the actual record length. NOTO,EN E ?hen "ile speci"ied is not open. The e/ceptional condition can (e trapped using RE&, option in the REA! command.
ADDRESSABILITY TECHNI#UES EBEC CIC& BCTL ,RO5RA- ),RO5RA- NA-E* RE&, )EBCE,TION* EN!:EBEC. I7 EBCE,TION N !7 RE&, ),5-I!ERR* a module given control through the use o" a CIC& BCTL command will not return to the program that issued the BCTL. The re%uired. program name is character string constant )ma/ J characters* The ,5-I!ERR e/ception condition occurs when the name is not in the ,,T. LOGICAL LEVELS The lin$ed to program runs at a new logical level and returns to a logical level (ac$ to the lin$ing program. The lin$ing program and its storage area remain availa(le. Note' : To %uit the repeated e/ecution simply RET.RN without the TRAN&I! option.
Any lin$ed program could use the same CO--AREA o" the parameters so indicated. The transid O commarea option easy enough to use to ma$e this method practical. "!O#!AMS TO "!O#!AM T!ANSITION CIC& LIN9 CIC& BCTL COBOL CALL Alternative to BCTL or LIN9 U COBOL CALLV COBOL CALL passes control to other programs. "ASSIN# DATA $SIN# IN"$T MS# IN,.T -&5 O IN,.T LEN ,ARA-ETER& .&E! ?IT BCTL OR LIN9. Receiver uses EBEC CIC& RECEIFE command "ASSIN# DATA $SIN# LIN: AREA0 ,IC / )=33* )prog0* /otte/ Lin$age &ection )prog=* 30 !7 CO--AREA 3S AREA= ,IC B)=33* 0&T ,rogram : CO--AREA : Length 033 !ata violation as =nd ,rogram )receives* tries to move =33 char "ASSIN# A COMMA!EA WITH )CTL I" data is to (e passed to the BCTLed program# a CO--AREA can (e used. !ata area is to (e located in the Lin$age &ection o" the receiving program. CO--AREA used with RET.RN# LIN9 O BCTL ADD!ESSABILITY !7 CO--AREA O !7 EIBL9 E Addressa(le automatically (y CIC& !ynamically ac%uired storage E Addressa(le (y program Not necessary to always do a EBEC CIC& 5ET-AIN e/plicitly CICS #UEUEING $ACILITIES Two "acilities to store data that are temporary in nature. This data is created or collected (y one or more online transaction to (e used later (y the same transaction or (y a di""erent transaction or even later passed to a (atch program. They are o Transient data ;ueue )T!;* o Temporary storage ;ueue )T&;*. TRANSIENT DATA #UEUE They are identi"ied (y a Q character I! called destination I! !estination I! and other characteristics o" T!; are de"ined in the destination control ta(le )!CT* (y the system programmer. = types o" T!;Cs o Intra ,artition T!; o E/tra ,artition T!; Intra ,artition T!; : ,rocessed only within the same CIC& region E/tra ,artition T!; : Individual &e%uential 7iles processed (etween the transaction o" the CIC& region and the system outside o" the cics region.
INTRA PARTITION TD# All Intra partition T!; are stored in only 0 physical "ile )F&A-* Record "rom the %ueue can (e returned se%uentially. Record can (e written se%uentially. Records can (e o" varia(le length "ormat &everal tas$s can write to the same T!; (ut only one tas$ can read "rom T!;. Intra ,artition T!; is used in application such as Inter"ace among CIC& transaction. Applicati on program 0 T!; Appl . ,gm = report Automatic tas$ Initiation )ATI* -essage routing -essage Broad cast. EXTRA PARTITION TD# E/tra partition T!; is a separate physical "ile O may (e a dis$# tape or reporter. !CT determines the initial open 6 close status o" a "ile while the "ile can (e opened or closed through the master terminal transaction during CIC& session. T!; can (e de"ined as an Input or output (ut not (oth. Records are "i/ed# varia(le# (loc$ed or un(loc$ed. TRANSIENT DATA OUTPUT Appears only "or Intra:partition T!;. !eletes all records associated with the named destination. All associated storage is released. E)CE"TIONAL CONDITIONS 0. &pecial handling re%uired LEN5ERR : length speci"ied is greater than the ma/imum record length speci"ied in !CT =. ;+ero : !estination empties or end o" T!; error ;lderr : The dest ld speci"ied cannot (e "ound in !CT. TEMPORARY STORAGE T&; is a %ueue o" stored records. Created O deleted dynamically (y application program. .sed as a scratch pad ;ueue I! is o" length 0:J (ytes T&; is o" varia(le length Records can (e stored in main or au/iliary storage The records once written remains accessi(le until the entire T&; is deleted Records can (e read se%uentially or directly Records can (e re:read O updated. W!ITE= TS To write or re:write a record in T&; EBEC CIC& ?RITE; T& ;.E.E )NA-E* LEN5T )!ATA:FAL.E* KITE- )!ATA:AREA* KRE?RITEL
K-AIN T A.BILIAR4L EN!:EBEC. ITE- : I" this option is coded CIC& write return the item num(er assigned to the record 'ust written. RE?RITE : is used to rewrite the record identi"ied (y ITE-. -ain 6 Au/iliary : To speci"y the storage medium. ?ill (e stored in main i" au/iliary storage not supported. !EAD= TS Can (e used to read records either se%uentially or directly.&ynta/ EBEC CIC& REA!; T& ;.E.E )NA-E* INTO )!ATA : AREA* LEN5T )!ATA:FAL.E* KITE- )!ATA:FAL.E* T NEBTL KN.-REC )!ATA:AREA*L EN!:EBEC. NEBT : to retrieve the ne/t : logical record in the T&;. mutually e/clusive to the item option N.-REC : the data area is de"ined as ,IC 1)Q* comp. to "ind the Total no. o" records in the T&;. Item : "or direct access speci"y the item no o" the record. DELETE# TS %& TS# EBEC CIC& !ELETE; T& ;.E.E )NA-E* EN!:EBEC. All records is T&; are deleted. All associated storage is released. E)CE"TIONAL CONDITIONS &pecial handling re%uired o Itemerr : Item num(er speci"ied is not in the range o" entry num(er assigned "or the ;ueue. o Lengerr : Length speci"ied is greater than the ma/imum record length. error ; iderr : speci"ied is ;ueue id not "ound. TESTING & HANDLING EXCEPTIONS COMMANDS FO! TESTIN# A""LICATION "!O#!AMS CECI )Command Level Interpreter* is a CIC& : supplied transaction which per"orms synta/ chec$ing o" a CIC& command. I" the synta/ is satis"ied# it will e/ecute the command. CEBR )Temporary &torage Browse* is a CIC& : supplied transaction which (rowses Temporary &torage ;ueue )T&;*. CE!7 is a CIC& : supplied transaction which monitors the e/ecution o" an application program as an interactive de(ugging aid.
A""LICATION "!O#!AM S$""O!T RE&, and NO AN!LE I5NORE CON!ITION AN!LE CON!ITION AN!LE AI! AN!LE ABEN! COMMAND LE-EL INTE!"!ETE! 7or invo$ing CECI# type CECI with the CIC& command to (e interpreted. The "irst screen lists all the possi(le CIC& commands. 5iving %uestion mar$ )U* (e"ore the command re%uests a synta/ chec$ only. No e/ecution. E/. CECI &EN! -A, )H&,OO-,OI* -A,&ET )H&,OO-&OI* ERA&E B!OWSIN# CICS =$E$ES CEBR can (e invo$ed while you are already in the CE!7 mode. ,ress the ,7S $ey to display the wor$ing storage section. Then# press ,70= $ey to invo$e CEBR. CEBR allows to (rowse in"ormation in Temporary &torage )T&* %ueues. elp ),70* give you a list o" CEBR commands on the screen. T& %ueues are retained until purged. E)CE"TION HANDLIN# CIC& to respond to e/ceptional conditions in one o" three waysE RE&, optionE : The RE&, option can (e speci"ied in any CIC& command. Its "unction is similar to the return code in the (atch program. o !e"ine a "ullword (inary "ield )&1)J*CO-,* in the wor$ing storage section as a response "ield. ,lace the RE&, option with the response "iled in a command. A"ter command e/ecution# chec$ the response code in the response "ield with !7 RE&, )////*# where //// is the : NOR-AL : Any e/ceptional condition AN!LE CON!ITION This command is used to trans"er control to the procedure la(el speci"ied i" the e/ceptional condition speci"ied occurs. I5NORE CON!ITION This command causes no action to (e ta$en i" the condition speci"ied occurs in the program. EBEC CIC& AN!LE CON!ITION Condition )La(el* KCondition )La(el*L KError )La(el*L EN!:EBEC. or EBEC CIC& I5NORE CON!ITION Condition KConditionL EN!:EBEC. ABEN! CO!E
I" an e/ceptional condition occurs during e/ecution o" a CIC& application program and i" the program does not chec$ the e/ceptional condition# CIC& may continue e/ecuting the program or terminate a(normally the e/ecution o" the program# depending on the e/ceptional condition and the command involved. OPTION $OR EXCEPTION HANDLING CO!E RE&, $eyword in commandsE C EC9 .&ER:&.,,LIE! 7IEL! IN ?OR9IN5 : &TORA5E. CO!E NO AN!LE 9E4?OR! IN CO--AN!&. AN!LE CON!ITION CO--AN!& I5NORE CON!ITION &4&TE- !E7A.LT :: ABEN!
CICS A/e./ Co/e' :Exe(ute I.ter1a(e Blo(8 a./ (i(' a2e./ (o/e' &ome o" the more (ommo. CICS a2e./' are (rie"ly descri(ed (elow. These are only (rie" descriptions and do not cover all possi(le reasons. ASRA This is the most common a(end in CIC&. It indicates a ,rogram Chec$ E/ception# roughly e%uivalent to having an &3CM in a (atch program. Chec$ "or spaces in a pac$ed decimal numeric "ield and changes to the "ile and record layouts. AEIx and AEYx There are numerous a(ends that start with AEI or AE4. They indicate that an e/ception has occured# and RE&, )or NO AN!LE* is not is use. The last character indicates the e/act error AEI' indicates a ,5-I!ERR. AEI( is a -A,7AIL condition# AEIO indicates a duplicate $ey )!.,9E4* condition. AEIN indicates a duplicate(record )!.,REC* condition. AEID indicates an End o" "ile condition. AEIS indicates that a "ile is not open )NOTO,EN* AEIP indicates an invalid re%uest condition )INFRE;* AEY) indicates that you are not authorised to use a resource )NOTA.T * AICA This a(end usually occurs i" your program is looping. There are CIC& parameters that determine how long a tas$ can run without giving up control. The ICFR parameter in
the CIC& &IT ta(le can (e used to speci"y a value "or all tas$s running in CIC&# or you can speci"y a R.NA?A4 value when you de"ine a transaction . I" a program is looping then you may not get an AICA a(end# (ecause the timer can (e reset when certain events occur# eg some EBEC CIC& commands may reset the timer to +ero. ATCH and ATCI These a(ends indicates that the tas$ was purged. The tas$ may have (een purged (y someone issuing a CE-T command to purge the tas$# or (y CIC& (ecause the !eadloc$ timeout limit has (een e/ceeded or (ecause there was not enough virtual storage availa(le to run all the tas$s in CIC& )&hort on &torage* APCT A program was not "ound or was disa(led. Chec$ the transaction de"inition to see i" the program name was misspelled. Chec$ that the program is ena(led. Chec$ that the program is in an appropriate Load Li(rary )ie one de"ined to the current CIC& system*. AKCP and AKCT These a(ends indicate that a timeout o" the tas$ occurred. This may (e due to a deadloc$. A$CA A dataset could not (e accessed (ecause it was disa(led. ABM' The speci"ied map was not "ound in the speci"ied mapset. Chec$ that you have not misspelled the map name. The E/ecute Inter"ace Bloc$ )EIBL9* contains a varia(le called EIB7N.This contains a value that tells you what CIC& command was last e/ecuted. This value can (e displayed as part o" an error message# to aid in the de(ugging o" your code or when an e/ception condition occurs The values "or EIB7N are show (elow. Code Command 3=3= A!!RE&& 3=3Q AN!LE CON!ITION 3=32 AN!LE AI! 3=3J A&&I5N 3=3A I5NORE CON!ITION 3=3C ,.& 3=3E ,O, 3=03 A!!RE&& &ET 3Q3= RECEIFE 3Q3Q &EN! 3Q32 CONFER&E 3Q3J I&&.E EO!& 3Q3A I&&.E CO,4 3Q3C ?AIT TER-INAL 3Q3E I&&.E LOA! 3Q03 ?AIT &I5NAL 3Q0= I&&.E RE&ET 3Q0Q I&&.E !I&CONNECT 3Q02 I&&.E EN!O.T,.T
3Q0J I&&.E ERA&EA., 3Q0A I&&.E EN!7ILE 3Q0C I&&.E ,RINT 3Q0E I&&.E &I5NAL 3Q=3 ALLOCATE 3Q== 7REE 3Q=Q ,OINT 3Q=2 B.IL! ATTAC 3Q=J EBTRACT ATTAC 3Q=A EBTRACT TCT 3Q=C ?AIT CONFI! 3Q=E EBTRACT ,ROCE&& 3Q>3 I&&.E ABEN! 3Q>= CONNECT ,ROCE&& 3Q>Q I&&.E CON7IR-ATION 3Q>2 I&&.E ERROR 3Q>J I&&.E ,RE,ARE 3Q>A I&&.E ,A&& 3Q>C EBTRACT LO5ON-&5 3Q>E EBTRACT ATTRIB.TE& 323= REA! 323Q ?RITE 3232 RE?RITE 323J !ELETE 323A .NLOC9 323C &TARTBR 323E REA!NEBT 3203 REA!,REF 320= EN!BR 320Q RE&ETBR 3J3= ?RITE; T! 3J3Q REA!; T! 3J32 !ELETE; T! 3A3= ?RITE; T& 3A3Q REA!; T& 3A32 !ELETE; T& 3C3= 5ET-AIN 3C3Q 7REE-AIN 3E3= LIN9 3E3Q BCTL 3E32 LOA! 3E3J RET.RN 3E3A RELEA&E 3E3C ABEN! 3E3E AN!LE ABEN! 033= A&9TI-E
033Q !ELA4 0332 ,O&T 033J &TART 033A RETRIEFE 033C CANCEL 0=3= ?AIT EFENT 0=3Q EN; 0=32 !E; 0=3J &.&,EN! 0Q3= ?RITE 8O.RNALN.0Q3Q ?AIT 8O.RNALN.023= &4NC,OINT 0J3= RECEIFE -A, 0J3Q &EN! -A, 0J32 &EN! TEBT 0J3J &EN! ,A5E 0J3A ,.R5E -E&&A5E 0J3C RO.TE 0J3E RECEIFE ,ARTN 0J03 &EN! ,ARTN&ET 0J0= &EN! CONTROL 0C3= !.-, 0E3= I&&.E A!! 0E3Q I&&.E ERA&E 0E32 I&&.E RE,LACE 0E3J I&&.E ABORT 0E3A I&&.E ;.ER4 0E3C I&&.E EN! 0E3E I&&.E RECEIFE 0E03 I&&.E NOTE 0E0= I&&.E ?AIT 0E0Q I&&.E &EN! =33= BI7 !EE!IT QJ3= ENTER TRACEN.QJ3Q -ONITOR QA3= A&9TI-E AB&TI-E QA3Q 7OR-ATTI-E S23= &,OOLO,EN S23Q &,OOLREA! S232 &,OOL?RITE S203 &,OOLCLO&E SE32 C AN5E TA&9 SE== ?AIT EBTERNAL SE>= ?AITCIC& 2A3= ;.ER4 &EC.RIT4 2C3= ?RITE O,ERATOR
2C0= I&&.E !7 ?TO MQ3= &I5NON MQ3Q &I5NO77 MQ32 FERI74 ,A&&?OR! MQ3J C AN5E ,A&&?OR! ME3= !.-, TRAN&ACTION
CICS FA=>':CICS $A#S ;uestionE what is di""erence (etween call and lin$ U AnswerE In case o" call # whenever you do changes to the called program you need to compile the calling program also. In case o" lin$ # it is not needed . ;uestionE what are the di""erences (etween d"hcommarea and ts% U AnswerE (oth are used to save data among tas$s. (ut 0. commarea is private to that transaction only . li$e every transaction has its own commarea created (y cics as soon as the transaction is initiated . however ts% # i" %id is $nown can (e accessed (y other transactions also =. commarea length is s1)Q* comp ie 2S$ . (ut ts% can have any length.>. commarea is availa(le only during the transaction is running. ts% i" created with au/iliary option resides in au/ memory and availa(le even i" main memory crashes.Q.normally commarea is used to tran"er data "rom one tas$ to another while ts% is used widely within the tas$ as a scratch pad. ;uestionE ?hat is Communication AreaU AnswerE Communication Area is used to pass data (etween the programmer (etween the tas$. ;uestionE ?hich o" the "ollowing statements correctly descri(e the synta/ o" CIC& command languageU AnswerE 0. I" an EBEC CIC& command must (e continued onto a second line a hyphen ):* must (e coded in column M o" the continued line. =. I" an EBEC CIC& command must (e continued onto a second line an IBI must (e coded in column M= o" each line to (e continued.
>. An EBEC CIC& command CANNOT (e coded within a COBOL I7 statement#(etween the I7 command and the period ).* ending it. Q. The EN!:EBEC delimiter is optional and never needs to (e placed at the end o" a CIC& command. S. The options speci"ied within an EBEC CIC& command can (e in any order. 7or e/ample IEBEC CIC& &EN! 7RO-)-&50* LEN5T )>3* EN!:EBECI can also (e coded IEBEC CIC& &EN! LEN5T )>3* 7RO-)-&50* EN!:EBECI ;uestionE .A CIC& program ABEN!& with an A&RA ABEN! code. ?hat is its meaningU AnswerE 0. A lin$ was issued to a program whose name does not e/ist in the ,,T ),rogram ,rocessing Ta(le*. =. A program attempted to use a map that is not de"ined in the ,CT ),rogram Control Ta(le*. >. A security violation has occurred. The operator is not de"ined with the proper authority in the &NT )&ign:on Ta(le* to use a particular "ile. Q. A program interrupt )3C3 or 3C0 or 3C= or ...* has occurred in a CIC& program. S. An I6O error has occurred when attempting to use a F&A- "ile "rom a CIC& program ;uestionE ?hich o" the "ollowing commands# when issued (y = di""erent programs running at the same time# will prevent simultaneous use o" resource I&IN5LEIU AnswerE 0. EBEC CIC& ,ROTECT RE&O.RCE)I&IN5LEI* LEN5T )2* EN!:EBEC. =. EBEC CIC& OL! RE&O.RCE)I&IN5LEI* LEN5T )2* EN!:EBEC. >. EBEC CIC& TA&9 &IN5LE)I&IN5LEI* LEN5T )2* EN!:EBEC. Q. EBEC CIC& EBCL.&IFE RE&O.RCE)I&IN5LEI* LEN5T )2* EN!:EBEC. ;uestionE ow can you accomplish (ray$point in intertestU AnswerE .:"or uncondishional (ray$point# C:"or condishional (ray$point#and A:"or automatic (ray$point ;uestionE how many ways are there "or initiating a transactionUwhat are theyU AnswerE There are si/ ways in initiating a transaction.they are as "ollows. 0. em(edding "our character transid on the top le"t most corner o" the screen. =. ma$ing use o" EBEC CIC& &TART TRAN&I! ) * >. ma$ing use o" EBEC CIC& RET.RN TRAN&I! ) * Q. By de"ining the transid in !CT ) destination control ta(le* to ena(le ATI )A.TO-ATIC TA&9 INITIATION* S. -a$ing use o" ,LT ) program list ta(le* 2. By associating "our character transid in ,CT )program control ta(le* ;uestionE which type o" T!; is read destructiveU AnswerE intrapartition td% is read destructive. e/trapartition td% is not read destrctive. ;uestionE The error code aeivU AnswerE this is the error code "or length#i" length o" the source data is more than the receiving "ield#this error will occur.this is the correct answer#previously i mentioned it as
program id error.sorry "or the wrong in"ormation. ;uestionE ? AT . -EAN B4 AEIF U AnswerE T I& I& T E ERROR CO!E 5IFEN B4 T E &4&TE- #IT -EAN& ,RO5RA- I! ERROR. ;uestionE ? AT I& T E &IPE O7 CO--AREA AnswerE T E !E7A.LT CO--AREA &IPE I& 2S9. ;uestionE ?hat is A&RAABEN! in CIC&U AnswerE It occurs when program interuption ta$es place.e.g.E when alphanumeric string moved to numeric data itemOR when arithmetic calculations per"ormed on nonnumeric data itemOR when an attempt made to read an occurance o" a ta(le (eyond the de"ind occurances. ;uestionE?hat is a two ,hase commit in CIC&U AnswerE This occurs when a programmer Issues a E/ec CIC& &yncpoint command. this is called two phase (ecause CIC& will "irst commit changes to the resources under its control li$e F&A- "iles. and the !B= changes are committed. .sually CIC& signals !(= to complete the ne/t phase and release all the loc$s. ;uestionE Answer to ANONIs %uestion# di"erence (etween T&; O T!; AnswerE T!; is read destructive# T&; is not. T&; can (e created dynamically# T!; cannot (e created dynamically. T&; is temporary in nature )iEe it will (e deleted when the program "inishes e/ecution# unless it is made permanent (y ma$ing a entry in the Temporary &torage Ta(le*# T!; is not. ope this will su""ice ;uestionE ?hat is EN; in CIC&U AnswerE I" any one want to restrict Trans:Id to single user# enter trans:id with EN;. It wonIt allow any one else to use the same trans:id. ;uestionE In &4-BOLIC Cursor ,ositioning a"ter moving :0 to the length "ield also the cursor is not positioned in that particular "ield.5ive reasonsU AnswerE 4ou have to e/plicitly speci"y the word C.R&OR (etween your EBEC CIC& and EN!:EBEC in the program. ;uestionE ?hat does EIB meanU AnswerE The EIB is the EBEC.TIFE INTER7ACE BLOC9. It is not the EBEC.TE INTER7ACE BLOC9. All T, monitors or transaction processors are $now as EBEC.TIFEs as they carry out process on (ehal" o" a program module. CIC& and !B= are e/cutives. ;uestionE ow many e/ceptional condition can (e given in a AN!LE CON!ITIONU AnswerE -a/. o" 0= e/ceptional conditions can (e given in a single AN!LE CON!ITION.
;uestionE ?hat command do you issue to delete a record in a transient data %ueue U AnswerE REA!; T!# the read is destructive. 4es it is correct (ut there is a restriction.. can deletethe records se%uentially.. 7or e/ample i" one want to delete 03 th record directly it is not possi(le with this.. ;uestionE ow do you access the records randomly in T&; U AnswerE By speci"ying the ITE- option ;uestionE ?hat command do you issue to delete a record in a transient data %ueue U AnswerE REA!; T!# the read is destructive. ;uestionE ? AT ARE !I77ERENT ?A4& O7 INITIATIN5 TRAN&ACTION IN CIC& AnswerE ?E CAN INITIATE CIC& TRAN&ACTION 0. B4 5IFIN5 TRAN&ACTION I! =. B4 5IFIN5 CIC& &TART CO--AN! >. A.TO-ATIC TA&9 INITIATION. ;uestionE ?hat is the di""erence (etween LIN9 and BCTL U AnswerE The BCTL command passes control to another program# (ut the resources re%uested (y the "irst program may still (e allocated. A tas$ does not end until a RET.RN statement is e/ecuted. ?hile in LIN9 command# program control resumes its instruction "ollowing the LIN9 parameter. The disadvantage o" LIN9 is that it re%uires that (oth the calling program and the called program remain in main memory even though (oth are no longer needed. ;uestionE ?hat is the di""erence (etween CIC& ,rogram Control Ta(le ),CT* and CIC& ,rocessing ,rogram Ta(le ),,T* U AnswerE ,CT contains a list o" valid transaction I!. Each transaction I! is paired with the name o" the program #CIC& will load and e/ecute when the transaction is invo$ed. On the other hand# ,,T indicates each programIs location which pertains to a storage address i" the program has already (een loaded or a dis$ location i" the program hasnIt (een loaded. ,,T will also (e used to determine whether it will load a new copy o" the program when the transaction is invo$ed. ;uestionE ?hat are the > common ways to create mapsU AnswerE The "irst way is to code a physical map and then code a matching sym(olic map in your COBOL program. The second way to create a physical map along with a matching sym(olic map is to code only the physical map using the O&4&,AR- option# CIC& will automatically create a mem(er in a CO,4 li(rary. And the third way is to use a map generator such as &!7 )&creen !e"inition 7acility* ;uestionE ?hat is ;uasi:reentrancyU AnswerE There are times when many users are concurrently using the same program# this is what we call -ultiThreading. 7or e/ample# S3 users are using program A# CIC& will provide S3 ?or$ing storage "or that program (ut one ,rocedure !ivision. And this techni%ue is $nown as %uasi:reentrancy
;uestionE ?hat is the di""erence (etween a physical B-& mapset and a logical B-& mapsetU AnswerE The physical mapset is a load module used to map the data to the screen at e/ecution time. The sym(olic map is the actual copy(oo$ mem(er used in the program to re"erence the input and output "ields on the screen. ;uestionE ow To &et -!T)-odi"ied !ata Tag* Thru Application ,rogramU )!ynamically*. AnswerE 4ou have to move the "ollowing macro !7 B-7&E to the Attri(ute "ield o" that particular Faria(le. ;uestionE ?hat CIC& "acilities can you use to save data (etween the transactionsU AnswerE CO--ONAREA# T&; O T!;. ;uestionE ow would you release control o" the record in a REA! "or .,!ATEU AnswerE By issuing a RE?RITE#!ELETE# or .NLOC9 command or (y ending the tas$. ;uestionE ow would you release control o" the record in a REA! "or .,!ATEU AnswerE By issuing a RE?RITE#!ELETE# or .NLOC9 command or (y ending the tas$. ;uestionE ?hat is the di""erence (etween a RET.RN with TRAN&I! and BCTL U7or e/ample prog. A is issuing RE.TRN with TRAN&I! to prog B. ,rog A. is issuing BCTL to prog B. AnswerE In RET.RN with TRAN&I! the control goes to the CIC& region and the user have to trans"er the control to prog. B (y pressing any o" the AI! 9E4&.In BCTL the control is directly trans"er to prog. B. ;uestionE ?hat is the ma/imum num(er o" e/ceptions that can (e speci"ied with a single AN!LE CON!ITION command in CIC& U AnswerE &IBTEEN )02* ;uestionE ? AT ?ILL BE T E LEN5T O7 T E EIBCALEN #I7 T E TRAN&ACTION I& .&E! TO CIC& 7IR&T TI-EU AnswerE T E LEN5T ?ILL BE 3)PERO* . ;uestionE ? AT I& !7 EIBL9U AnswerE !7 EIBL9 is E/ecute Inter"ace Bloc$. It is placed in the lin$age section automatically (y CIC& translator program. It must (e the "irst entry in lin$age section. CIC& places values prior to giving control to the program and we can "ind almost any in"ormation a(out our transaction. ;uestionE ?hat is the di""erence (etween the BCTL and LIN9 commandsU AnswerE The LIN9 command anticipates return o" control to the calling program#
theBCTL command does not. Return to the calling program will (e the result o" the CIC& RET.RN command# speci"ying TRAN&I!)name o" the calling program*. ;uestionE ?hat CIC& command would you use to read a F&A- 9&!& se%uentially in ascending orderU AnswerE 7irst issue a &TARTBR)start (rowse*# which will position the (rowse at the desired record. Retrieve records (y using su(se%uent REA!NEBT commands. Indicate the end o" se%uential processing with the EN!BR command. I" the generic $ey is speci"ied in the &TARTBR command positioning in the "ile will (e (e"ore the "irst record satis"ying the generic $ey.7or reading in descending order use the REA!,REF instead o"REA!NEBT. ;uestionE ?hat is the di""erence (etween pseudo:conversational and conversationalU AnswerE ,seudo:conversational will start a new tas$ "or each input. By coding a CIC& RET.RN command speci"ying TRAN&I!)itsel"*. Conversational will have an active tas$ during the duration o" the data entry. ;uestionE ?hat is the CO--AREA)communications area*U AnswerE An area used to trans"er data (etween di""rent programs or (etween su(se%uent e/ecutions o" the same program. Needs to (e de"ined in the Lin$age &ection.