1. Introduction To CICS.


1. Explain the differences between a Transaction and a Task.


A. Under CICS, a user can't directly invoke a program. Instead, the user invokes a transaction, which in turn specifies the program to be run. When a user invokes a transaction, CICS locates the associated program with the transaction, loads it into storage (if it is not there), and starts a task. Where Task is a unit of work which is scheduled by CICS. The difference between transaction and task is that while several users may invoke the same transaction, each initiates a separate task.


2. Describe the basic differences between batch and online systems.


A. In a Batch processing system, transactions are accumulated into groups, or batches, before they are processed. For example the processing of the Orders collected for the whole day. In an Online processing system the transactions are processed by the system as soon as the transaction is entered on to the system. Ex. Airplane Reservation system. In a batch system the turnaround time is measured in hours and days, while for the On-line system it is measured in micro-seconds and seconds. On an Online system, if there is an error in data, the system indicates it immediately, and can be corrected and reprocessed. Allstate Insurance Co., uses CICS V4.1. on their system.


3. What are the four major types of Online Programs?


A. The menu program. The inquiry program. The file maintenance program. The Data Entry program.


4. Describe the different considerations for the Online programs (CICS).


A. Ease of use. IBM promotes a user interface standard called CUA (common user Access). CUA provides Entry model, Graphical model, and Intermediate model - the text subset of graphical model.

Performance. Performance is a critical consideration for online programs. Performance for online systems is measured in terms of response time. Many factors affect response time. The most critical factors are the total number of programs running within the CICS system, the Disk I/O, the terminal and host computers and network.


File Integrity. A batch program typically has complete control of the files it uses, so there's no chance of another interfering with its processing. In an online system however many terminal users use the system simultaneously, and all must have access to the files they require at the same time.

Security. On batch systems Security implementation is simple as the access to the computer system can be controlled. However in an online system terminals are located at several locations. Logon procedure being used can ensure security to a great extent. Using of multi-level security to allow only certain users to access files and programs based on the logon id helps to secure the system.


5. Describe the most common way a task is started under CICS.


A. By entering the Transaction Identifier on the terminal and pressing Enter Key. When the Trans-id is entered on the CICS screen, it locates the program associated with the trans-id from the PCT. Then the location of the program is determined by CICS by reading the entries in PPT. After the load module is located, it loads it onto the CICS main memory, then task workspace is assigned for CICS own use to execute the task.

The other different ways are by a transaction identifier associated with a terminal for pseudo-conversation, By RETURN command, By START command (Time-driven Automatic Task Initiation), By a DCT entry and TDQ write (Data-driven ATI), and by using 3270 attention identifier key.


6. Distinguish between Multitasking and Multi-threading.


A. Multi-tasking means that the OS allows more than one task to run (be executed) concurrently, regardless of whether the task use the same program or different programs. Multi-threading is the system environment, where multiple tasks share the same program under the multi-tasking environment. Programs are shared by several tasks, and for each task the program work as if it executes the instructions only for that task.


7. Briefly describe the function of each of the various CICS modules.


A. Terminal Control. It is the interface between the CICS application program and the Operating System's Tele-Communication Access Method VTAM, TCAM or BTAM). Terminal control lets you send text to and receive text from the terminal that initiated the task. An application program that uses terminal control directly must process complicated strings of control characters and data sent to and received from the terminal.


Basic Mapping Support. To relieve the programmer from building complicated strings of control characters to send data to and receive data from terminals, BMS is used that acts as interface between the program and terminal control. BMS lets you create a map that specifies the format of data as it appears on the terminal display.


File Control. File control acts an interface between the Application program interface and the VSAM files. The application program interface acts as the interface between the file control and application program. When a File control receives a request, it passes on to the appropriate VSAM File, which in turn would manage the data storage.


Program Control. This service manages programs executing within a task as an execution of an application for a particular user. API acts as the interface between the application program and the individual CICS services.


Transient Data Control. It provides the convenient way to use simple sequential files called destinations. Whenever a record is written to a destination it is added to the end. A task reads the first from destination, which gets deleted.


Temporary Storage Control. It provides the simplest method for storing data outside your CICS program's working storage area. Data is stored on TSQ's. If the amount of storage is small it can be stored on main memory else a disk.


Interval Control. This service lets you implement time dependent applications. It provides a method of starting a task that's an alternative to trans-id. It can be used to specify a task to start at a specific time. Storage Control. It allocates storage space to application programs. Since most programs keep all their data in working storage, which is allocated automatically, you will not use storage control commands frequently.


Task Control. It lets you control the execution of tasks. You can use it to suspend your task temporarily to prevent it from taking exclusive control and monopolizing the CICS resources and also take control over TSQ's.


Dump control service provides the transaction dump that shows the content of main storage used by the program. You can also use dump control to create dump at specific points without terminating the program for analysis.


Trace control. It maintains the Trace table that indicates the sequence of CICS operations performed within a task.


Journal Control module provides a standardized method of creating Output files called Journals, which are used to restore files in the event of a system failure.

The different table used by the above mentioned modules are TCT (term_id), FCT (specify which operations are allowed on the file), PCT(trans-id, programs), DCT, TST, ... PPT, ... JCT, and others are SNT, SRT(sys. recovery).


8. Describe the differences between operation of Pseudo-Conversational and a conversational program.


A. In a conversational mode, the program accomplishes the conversation by simply sending a message to the terminal, and waiting for the user to respond, and receiving the response from the terminal. The system that sits idle without allowing an other operation while waiting for the data is called a conversational program.

In a Pseudo-Conversational program, a program attempts a conversation with a terminal user, it terminates the task after sending a message with a linkage for the next task. When the user completes the response the next task is automatically initiated. Pseudo-conversational program's uses the CICS resources such as control tables efficiently.


9. Briefly describe the functions of each of the following tables - PCT, PPT, FCT.


A. CICS creates internal control tables mentioned below based on the Resource definitions created by the system programmers. There are two ways a programmer can create a resource definition. By using special assembler macro instruction or by using the Resource definition online (RDO). RDO is even called as CEDA as it is the transaction used to initiate RDO. RDO is used to define the resources needed such as program name, BMS, Trans-id, file info...


Program Control Table - The primary function of the PCT is to register the control information of all CICS transactions. PCT contains a list of valid Trans-id paired with the name of a program CICS will load when the transaction is initiated with that transaction identifier. It identifies priority and security level (RSLC) of transaction.


Processing Program table - The Primary function of PPT is to register all CICS application programs and BMS mapsets. The PPT keeps track of which applications are loaded on the CICS address Space (storage). CICS uses this information to determine whether new copy of the program need to be loaded from Disk or it exists on storage. It contains information such as Location in memory, Library address of the disk and language being used.


File Control Table - The Primary function of FCT is to register the control information of all files, which are used under CICS. FCT contains the name and type of each file and in addition lists the file control operations that are valid for each file. It lists whether the existing records can be read sequentially or randomly, deleted or modified. Others control tables used are TCT to register terminals, DCT, TST, RCT, SIT, SRT and SNT.


10. Describe the basic eight steps of a CICS program development according to Doug Lowe.



Step1: Develop a complete set of program specifications. The minimum the specifications should include program overview, a screen layout for each map being used, a listing of copy members of each file used by the program. Others that are needed are include decision tables, editing rules, ...


Step2: Design the program. Most standard COBOL programs are designed around a basic looping structure that controls the overall program execution. In a pseudo-conversational CICS program there is no basic looping structure, Instead CICS invokes your program whenever there is an interaction with a user. CICS program is to be designed to respond appropriately for each type of user action.


Step3:Create the necessary CICS table entries. Before you can test a CICS program, you need to make sure that all of the CICS table entries required to support the program are in place. For most programs the entries need to be added to PPT, PCT and FCT tables.


Step4: Prepare the BMS mapset by coding the assembler language BMS macros. Incidentally many shops use mapset generator.


Step5: Code the program. Coding the CICS programs involves writing of standard COBOL code with special CICS commands to invoke CICS services.


Step6: Compile the program. By either using the Foreground command level translator or a JCL, compile the CICS application program. Under which the CICS commands are commented out and replaced by appropriate calls and move statements during the pre-compile / Translation step. In addition to translation the CICS commands the translator also inserts other code needed to process the CICS instructions. Now the Cobol Source is compiled and link-edited similar to a standard Cobol program. Under Microfocus Checker is used.


Step7: Test the program under CICS test region. Load and run the program under the test environment and check for the functionality. You can use CEMT, CEDF and CECI transactions during the test cycle.


Step8: Document the Program. After the test runs fine and everything look's Ok create the necessary documentation for the program. Use built-in helps in the program along with necessary comments wherever needed in it.


2. CICS Programming Concepts.


1. Explain the COBOL code used in a CICS program in general. (11)


A. There is no difference between the COBOL and CICS Identification Division, in which Program-Id is mandatory. The Environment division of the CICS-COBOL program needs to be empty, as the Environmental information is controlled by the CICS tables such as FCT. Beginning with VS COBOL II Release3 compiler, one can omit coding of the header also. In the Data Division, File Section is not to be defined. It contains the working storage Section and Linkage Section for all the programs. A field called COMMAREA is defined in Working-Storage Section and DFHCOMMAREA in Linkage section for all the programs. Compiler adds Execute Interface Block (DFHEIB) in Linkage section. The Procedure division is used to code the Program logic, to perform the necessary functionality.


2. Explain the COBOL code used to detect the first execution of a program in a pseudo-conversational session. How do you pass information from one task to other? How do you test the response codes?


A. Evaluate EIBCALEN variable to determine the first execution of a program in a pseudo-conversational session. If it's value is zero then it's the 1st execution of the program. The communication area is a special field, which must be at least of one byte long and is used to pass data from one program execution to the next. The next field defined after the communication area in the working-storage section is the Response field, a full-word binary item (S9(8) comp). This field is used to test the completion status of CICS (READ) command with the option RESP(Response field).


3. What COBOL feature's are not allowed under any compiler version, while coding CICS programs?


A. ACCEPT, DISPLAY, OPEN, CLOSE, READ, WRITE, REWRITE, DELETE, START, SORT, RELEASE, RETURN, EXHIBIT, TRACE, Segmentation features, and Report writer features. The CICS using COBOL II features that are not allowed under the OS/VS COBOL environment are GOBACK, STOP RUN, EXAMINE, STRING, UNSTRING and INSPECT.


4. Explain the purpose of each of the CICS transactions - CESN, CESF, CEMT, CECI and CEDF.


A. CESN - CICS Execution Sign On. Ex. CESN. Ex2. CESN USER=N6SSAGI,PW=SUNIL1.It's used for logging into the CICS System.


       CESF - CICS Execution Sign Off. Ex. CESF. EX2. CESF LOGOFF .It's used for Signing off.


CEMT - C E Master Terminal.

Ex. CEMT SET PROGRAM=(pgmname),NEWCOPY .It's used for variety of supervisory CICS functions. CEMT transaction can be used to force a new program copy as above.


To open or close a dataset as Ex2. CEMT SET DATASET(dataset) {OPEN/CLOSED}.(TSQ).


To disable a program or transaction or a program as Ex3. CEMT S PR/TRANSACTION(name) {DISABLED/ENABLED}. And even to cancel a task that is running on another terminal. Ex1 tells CICS that you have updated an application program, so it should read a fresh copy of the program from disk. You should issue this command whenever you recompile a program while CICS is running. Otherwise CICS will continue to use the older version.


The two CEMT commands in Ex3. Are very useful when a program error forces a pseudo-conversational program into a loop. The only catch is you might have to run the CEMT command from another terminal as this terminal gets locked due to the loop.


CECI - C E Command-level Interpreter. You invoke this transaction by typing the trans-id, optionally followed by the CICS command. CECI checks the syntax of the command and displays a panel telling you it is about to execute the command. When you press Enter, CECI executes the command and displays the result. CECI can be used to update the contents of the files. You use CECI often to display maps, read or write VSAM file records and so on. CECI can use it's five predefined variables namely &DFHC, &DFHW, &DFHR, &LEN and &DATA. To the right of each variable name is the variable length. The various keys used under CECI transaction are F1-HELP, F2-HEX, F3-END, F4-EIB, F5-VAR, F6-User, F9-Message.


CEDF - CE Diagnostic Facility. It invokes a debugging aid called EDF. When EDF is activated, you can run a program step by step, checking the completion of each CICS command and examine the content of WS as needed. Other CICS supplied transactions used are MAPS,


5. Define Event-Driven Design that is frequently used in CICS to follow pseudo-conversational approach.


A.      Event-driven design forces you to think in terms of events that can trigger the execution of a pseudo-conversational program and the program's Response to each Event. The various steps include Identifying the user input events and then Designing the program's response to each event, and by designing a Structure charts with alternative designs by moving the generalized process into a separate module (para) and numbering the modules.


3. Basic Mapping Support.


1. What is the importance of MDT in maps? (16)


A. An MDT on, which is a part of the attribute byte, causes data on the screen to be returned to the program when a map is received. MDT's can be turned on by Specifying FSET as part of the attribute of the BMS map, then issuing a SEND which includes the physical map. Do not overlay the BMS map's attributes with the symbolic map attributes on a SEND of map and data. Symbolic map's attributes equal to low values will not overlay the BMS attributes. Ex. ATTRB=(ASKIP,FSET).

Moving a standard attribute, which contains FSET to the Symbolic map's attribute before issuing the SEND which includes the symbolic map, such as MOVE UNPROT-FSET TO MAPFLDA.

Keying data into Unprotected field on the screen. Entering data into a field will turns its MDT On.


2. Describe how to code a Mapset with a sample of BMS Macro instructions.




































































































INITIAL='Customer Number ... ... ...'








































COLOR=GREEN, INITIAL='Name And Address ... ... ...'





















































Other Attributes used with the ATTRB field on the BMS Macro are NUM instead of PROT. The above Macro defines a constant field, an alphanumeric data entry field with ATTRB=UNPROT, An Alphanumeric Display only field, User message area. A numeric data entry field QTY should have ATTRB=NUM, for a numeric display only field has the ATTRB=(NORM,PROT) with PICOUT='zz,zzz,zz9.99'.


3. Explain the function of Modified Data tag. List the Extended attributes with stress on highlighting.


A. Last bit of the attribute byte indicates MDT. If the user keys in any data into the field, it turns the MDT ON indicating that the data is modified. To save transmission time , 3270 terminal sends a field over the TC line only if the MDT is on. Otherwise, the field value is not transmitted. The extended attributes of a field include extended Color (Red, blue, pink, green, turquoise, yellow, white), extended highlighting (Blinking, Reverse Video, Underline), Validation (Must fill, Must enter, Trigger), and Programmed symbols (Up to six alternative user defined char-sets).


4. What is the special byte described at the end of the Unprotected fields in BMS maps called?


A. The Special byte unnamed fields on a Map are called stopper fields. The others are Unnamed fields (Literal's) are used for Titles, Field identifiers and messages and the Named (variables) Output fields and Named Input fields. There's a stopper field at the end of every named field.




5. Define BMS Map, Mapset, Physical Map, Symbolic map and Map definition macros.


A. BMS Map. The primary objective of Basic Mapping Support system is to free the Application Program from device dependent codes and Format. A screen defined through BMS is called a Map. There are two type of maps.


 Physical Map: It is the assembly language program, which are created and placed in a load (program) library. It controls the screen alignment plus sending and receiving of constants and data from and to the terminal, and has the terminal information.


Symbolic Map: It defines the map fields used to store variable data referenced in a COBOL program. They may be placed by BMS into a Copy library and be added to the Cobol program at the compile time.

Representation of one screen format is called Map. A group of maps, which are link-edited together is called a Mapset. BMS maps are generated by using the following, BMS Macros: DFHMSD - To define the Mapset, DFHMDI - To define a map in a mapset, and DFHMDF - To define a field in map.


6. Describe the Two primary functions of attribute bytes in a 3270 display. What are the three standard attributes?


A. The IBM3270 screen is a field-oriented display. In other words the screen is logically divided into a number of user defined fields. The location and characteristics of the screen fields are determined by special characters called the attribute bytes. The attribute byte takes one position on the screen immediately to the left of the field. The standard attributes used in general are Protection, Intensity and Shift. The Attribute byte Bit positions - 0th-1st bits indicate none. 2nd-3rd bits indicates the protection and shift (If 00-Unprotected Alphanumeric, 01-Unprotected Numeric, 10-Protected Stop and 11-Protected Skip). 4th-5th bits indicate the intensity (00-Normal, 01-Normal, 10-bright, 11-No-display). 6th must always be '0'. 7th bit indicates MDT (0-field has not been modified, 1-field is modified).


7. Describe the DFHMSD, DFHMDI and DFHMDF Macros briefly along with it's options.


A. DFHMSD Macro is used to define the Mapset. The name of the Mapset is the label typed before the macro name. The various parameters used to define the DFHMSD Macro are. TYPE specifies whether a Physical map (=MAP), or Symbolic map (=DSECT), or both (=&SYSPARM) need to be generated. TYPE=FINAL indicates the end. LANG specifies the programming language in use (=ASM),(=COBOL),(=PLI). MODE specifies whether the Mapset is for input (=IN), output (=OUT), or both (INOUT). TERM specifies the terminal type, ( =ALL), (=3270), (=3270-1)indicates 3270 model 1terminal with 40 char lines, (=3270-2) indicates 3270 model 2 terminal with 80. CTRL specifies the control options, the common ones in use are (=FREEKB), (=ALARM). STORAGE=AUTO specifies the symbolic maps will occupy separate storage locations, Otherwise they will overlay the same storage locations, i.e. a redefines clause will be used for symbolic map items. MAPATTS specifies the Physical map extended attributes, COLOR and HILITE are the most common. DSATTS specifies which extended attributes need to be supported by Symbolic maps. EXTATT specifies whether extended attributes are allowed to be specified. =YES indicates that support for all extended attributes should be provided in both physical and symbolic maps, =MAPONLY generate support only for physical maps. TIOAPFX=YES should be specified for all COBOL maps, it generates a 12 byte filler item at the beginning of the symbolic map.


DFHMDI Macro is used to define Map's within a Mapset. The label on the DFHMDI macro is the Map's name. The various parameters used with DFHMDI are SIZE=(lines,columns) (usually 24,80) specifies the map size. LINE specifies the starting Line number. COLUMN specifies, starting column number (usually it's 1 as Line). JUSTIFY (left,right,last,first). CTRL specifies the control options to be used similar to DFHMSD as (FREEKB or ALARM).


DFHMDF Macro is used to define Field's within a Map. It may or may not be preceded by a label name to indicate the field name. The various parameters used are POS=(line,column) specifying the position of the field. ATTRB=(BRT/NORM/DRK,PROT/ASKIP/UNPROT,NUM,IC,FSET) specifies the attribute fields, NUM is used to specify the field as numeric and is right justified filled with zeroes, IC specifies the cursor to be located at the start of the data field, while FSET specifies the MDT bit On in the attribute byte of data field. COLOR specifies the color of the field (=Color (Red, blue, pink, green, turquoise, yellow, white)). INITIAL specifies the initial value of the field, during the MAP SEND (='literal'). PICIN specifies the input format while PICOUT specifies the output format, usually used with numeric strings (='picture-string') ex. (='ZZ,ZZZ,Z99.99').


8. Describe the function of each of the Fields generated in the Symbolic map.


A. The Symbolic map is used to send and receive data to and from the screen. When you assemble a Mapset the symbolic maps are created and placed in a COBOL Copy library. Every Symbolic map consists of two 01 levels generated with labels FilednameI and FieldnameO. These items overlay each other as the FieldnameO redefines FieldnameI. Variables under FieldnameI are used for Input while the other are used for output. The first variable is a filler of 12 bytes long generated because of TIOAPFX=YES parameter of the Mapset. In the 1st 01 level of the symbolic map, for each field macro coded with a label, five data-name's would be created with one-char suffix to the label in addition to the Input field. And Output field in 2nd 01 level. A sample Symbolic map, with a single field is.



02 FILLER PIC X(12). ------ > 1ST Field of the Symbolic map.


02 NAMEF PIC X(01).


03 NAMEA PIC X(01).

02 FILLER PIC X(02) (if ext. Attrib. allowed)

02 NAMEI PIC X(25). ------ > RECEIVE INTO I


02 FILLER PIC X(12). ------ > 1ST Field of the Symbolic map.

02 FILLER PIC X(03). ------ > SEND FROM O

02 NAMEC X(1). 02 NAMEH X(1)

02 NAMEO PIC X(25). ( || if ext. Attributes. allowed)


The variable with suffix 'L' is a binary half word field that contains the length of the data sent to program. Variable with suffix 'F' is a single char field that contains X'80', if the user made a change to the field, but no data was transmitted; otherwise it contains low values. 'F' indicates whether <ERASE EOF> Key is used. Variable with suffix 'A' is a single char field containing the attribute byte of the field for the output operations. Occupies the same storage location as the 'F' field. Variable with suffix 'C' is a single character field that contains the attribute for extended color, generated only if DSATTS=COLOR is specified in DFHMSD Macro. Variable with suffix 'H' is a single character field that contains the attribute for extending highlighting, generated only if DSATTS=HILIGHT is specified in DFHMSD Macro. Variable with Suffix of 'I' indicates the input field while the variable with suffix 'O' indicates the Output field.


9. How do you use extended attributes ?


A. Define EXTATT=YES and the correct terminal type. For CICS V1.7 or later use MAPATTS and DSATTS.


10. What are the 3 working storage fields used for every field on the map? What other fields are generated?


A. Length field, Flag Field and Attribute field. In addition Input & Output field are also created. Others are extended Color & Extended Highlighting attributes created only if MAPATTS and DSATTS are specified.


11. What are the two outputs created as a result of generation of a Map?


A. The map copybook (symbolic map) saved in copy lib and the load module (making the physical map).


12. How do you protect a field from being overlaid? What is an attribute Byte?


A. Using Protected attribute. The Attribute byte defines the display/transmission of field.

13. Name the Copybook supplied by IBM, with all modifiable attribute bytes that can be used with symbolic maps.



14. Describe the Basic function of the following CICS commands. RETURN, XCTL, SEND MAP, RECEIVE MAP, READ and ABEND.


A. RETURN command is used to pass control from program to other or to program being executed to the higher level (CICS to end the session). The Options of RETURN command are TRANSID(name), COMMAREA(data-area), and LENGTH(length of Commarea).


XCTL command is used to transfer control from the current to the program specified through the PROGRAM(program-name) option, Other options that can be specified are COMMAREA and LENGTH.  


SEND MAP command is used to send data from the program to the terminal screen by using the various options such as MAP to specify the physical map name, MAPSET for Physical Mapset name, FROM(data-area) for symbolic map definition, MAPONLY/DATAONLY to specify if only Physical or Symbolic maps are to be sent, The ERASE/ERASEAUP to specify if the all data or only the unprotected field data on the screen need to be erased before the map is sent, and finally the CURSOR is used to specify the cursor position.


The RECEIVE MAP command receives input data from the terminal, the options MAP, MAPSET and INTO are used similar to the SEND MAP options, INTO is used instead of from.


The READ command is used to read data from files. The DATASET option is used to specify the filename that needs to be defined in FCT, INTO(data-area) field specifies the data area to be used, RIDFLD(data-area) for a keyed field specifies the key of a record to be read, RRN or RBA when specified, this field is interpreted as Relative Record Number or R Byte Address, the UPDATE option specifies that the program intends to update the file with a subsequent REWRITE or DELETE command.


The ABEND command is used to terminate the program abnormally, If you specify ABCODE(name) the system will generate a storage dump with the abcode-name to identify it.


15. How do you place the cursor on the particular position on the screen (map)?


A. Define the field with IC in the BMS map. Move -1 to the length attribute of the field and use the CURSOR option without displacement value. (symbolic positioning). Use the CURSOR(nnn) option with SEND MAP, where nnn = (row-1)*80+(col-1) (physical positioning).


16. What is MDT? What are FSET, FRSET?


A. Modified Data Tag - Bit in the attribute byte indicating modification of field on screen. Changes on Input operation. FSET - is an attribute that sets the MDT On to ensure that the field is transmitted. Happens on an Output operation. FRSET. Resets MDT. Until this happens, field continues to be sent.


17. Do you receive the attribute byte in the symbolic map? When?


A. Yes, On EOF.


18. How do you make your BMS maps case sensitive?


A. Use ASIS option on RECEIVE MAP command ???


19. What is effect on RECEIVE MAP when a PF Key is pressed and when a PA Key s pressed.


A. PF keys wake up (Initiate) the task and transmit modified data, PA keys only wake up (initiate) the task.


20.   Can you use Occurs in a BMS map? If you do, what are the issues related to it's use?


A. Yes. But cannot use group by clause???


21.   How is the storage determined in the symbolic map, If you have multiple maps in a Mapset?


A.      Storage for maps redefine the first. This means largest map has to be the first.


22. What is the meaning of the BMS length of the field = 0 ?


A. Data was not entered in the field


23. Can you simply check length=0 for checking, if a field was modified?


A. No, Not if ERASE EOF was used.


24. What does the BUFFER option in RECEIVE mean?


  1. It brings the entire data-stream from the terminal buffer.


25.   What are the different steps you go through too create a BMS executable?


A.      Assemble to create CSECT and Link


4. Command Level CICS


1. When you compile a CICS program the (pre-)compiler puts an extra chunk of code. Where does it get included and that is it called? What is its length? (41)


A. DFHEIBLK, DFHCOMMAREA are added in the Linkage section of the program.


2. What is the content of the PPT entry?


A. Length, Source, Use count, Lang, Res count DFHRPL number. With entries of Mapset's and Programs.


3. Explain Handle AID command. What are it's disadvantages over using of EIBAID?


A. HANDLE AID command is used to pass control to various parts of the program based on the Attention Key (pressed by user). It does not detect the AID key by itself, but uses the RECEIVE MAP command, so it is always coded alongside (before) the RECEIVE MAP command. This is a disadvantage, as Receive Map that increase the traffic over the network may not be needed during various situations such as termination of program.


4. How is the Error Processing done in CICS system application programs?


A. Check RESP or EIBRESP after the call or use the HANDLE CONDITION (unstructured) command. The Handle Condition command is to be coded prior to the CICS command used for I/O handling such as RECEIVE MAP (map fail), LINK, XCTL (pgmiderr), READ, WRITE, REWRITE, DELETE, UNLOCK (notopen/duprec/ notfnd).


5. Explain the usage of DFHCOMMAREA in a CICS program.


A. DFHCOMMAREA in the Linkage section is used to pass the data in working storage commarea from one to program to another program. It should be defined with as at least one byte long. As the working storage section is freshly allocated for every execution.


6. Explain Execution Interface Block.


A. EIB is a CICS area that contains information related to the current task, which can be used for debugging the program. The most widely used variables are EIBDATE, EIBTIME, EIBAID, EIBCALEN, EIBCPOSN, EIBRESP, EIBRSRCE (resource), EIBFN (recent CICS command code), EIBTRMID and EIBTRNID.


7. Give a Sample FCT, PPT and PCT entries using the assembler code Macro (not RDO - 'CEDA').








8. Explain the notion of Logical levels and Describe the effects of RETURN, XCTL and LINK commands.


A. The CICS Terminal control is at the highest level and is considered to be running at logical level 0. The first Task initiated by entering a Trans-id is considered to be logical level 1, as this is first program stored in the main storage.

If a ProgramA from level one calls another ProgramB using a LINK command, the ProgramB is said to be in logical level 2 as both ProgramA and ProgramB are stored in main storage.


However if ProgramC is called by using the XCTL command from ProgramA, then ProgramC is said to be logical level 1, as the ProgramA is removed from the main storage after loading ProgramC. The options used with LINK and XCTL commands are PROGRAM, COMMAREA and LENGTH.


RETURN command is used to pass control from one logical level to the one above it. A RETURN command at level 1 can have the options TRANSID, COMMAREA, and LENGTH, to initiate a new transaction, once the control is passed to the CICS. The RETURN command at all the other logical levels should be issued with no options.


9. How do you handle the '_' usually set by Initialize option of field macro, after the Receive Map command.


A. By the COBOL II Inspect verb as: INSPECT <FieldI> REPLACING ALL '_' BY SPACE.


10. What is purpose of ASSIGN command, explain in brief.


A. ASSIGN command can be used to determine which extended attributes are supported by the terminal. IBM manual documents more than 60 options. The most commonly used options are COLOR(data-area), HILIGHT(data-area), SCRNHT(data-area) for screen height, and SCRNWD(data-area) for screen width. The system returns the one-byte field(data-area), set to High-Value (X'FF') if the terminal supports and a low-value, if not or else the length indicating the screen height or width, based on the option used.


5. CICS and Data Base Handling (DB2 / IMS / VSAM Datasets)


1. What are the important tables used in the CICS-DB2 environment. (51)


A. CICS manages it's communication with DB2 with special interface modules called CICS/DB2 Attachment Facility. When a CICS program issues a SQL statement, CICS requests the attachment facility to establish a connection with DB2 called a thread. The information about the CICS transaction and DB2 is entered in Resource Control Table (RCT). The plan information is referenced through the RCT Entries.


2. Explain Deadlock.


A. A Dead lock is a situation that occurs when two tasks are waiting for a resource that the other is holding. UNLOCK can be used to release the lock created by using the UPDATE option, when it is no more needed to be updated.


3. Can you access a QSAM file on CICS? Describe the various CICS commands used for VSAM handling.


A. No, QSAM files can not be accessed by CICS. The various CICS commands used for file handling are READ, WRITE, REWRITE and DELETE. The various options of READ command are DATASET, INTO, RIDFLD, RRN RBA, LENGTH, UPDATE. The Options of WRITE command are DATASET, FROM, RIDFLD, RRN, RBA, and LENGTH. The options of a REWRITE command are DATASET, FROM, and LENGTH. The options of DELETE command are DATASET, RIDFLD and RRN / RBA. UNLOCK command uses DATASET as the only option. RESP option can be used with all the commands to check the system response, similar to HANDLE CONDITION.


4. What types of Files can be used by CICS. Why?


A. VSAM, ISAM, and BDAM files on disk can be accessed by CICS, as they are all of random access type.


5. What are the various commands used to browse through a dataset?


A. STARTBR, READNEXT, READPREV and RESETBR. The options used are DATASET, RIDFLD, RRN/RBA, GENERIC, and KEYLENGTH for the 3 commands, and INTO, LENGTH for READNEXT and READPREV command, and EQUAL/GTEQ for STARTBR only. RESP can be used with any. ENDBR is used to end the browse operation.


6. Do you have to Handle condition every time to check the status during file handling.


A. No. HANDLE CONDITION is to be coded only at the beginning of the program before the first read command. If you need to change the Handle condition after a few reads or write, use PUSH and POP commands accordingly. If needed a few conditions also can be ignored by using the IGNORE CONDITION command coded before the File handling commands. If Ignore Condition is used, EIBRCODE can be used to check the return condition if needed.


7. What are the possible exceptions occurs during the file browsing process.




8. Explain Path related to Alternative index.


A.      CICS allows users to handle VSAM KSDS files with an Alternative Index. A VSAM catalog entry needs called Path, which establishes relationship between the alternate index and it's base cluster, needs to be defined, before one can process the base cluster using an alternative Index. You specify the path name rather than the file name in the Dataset option of the file control commands, when you wish to access the files through Alternative Index.


9.       Explain DB2 Translation process under CICS - COBOL.


A.      During the translation process, the DB2 SQL statements are translated into a form called a Plan, which DB2 can understand immediately. This plan is stored in the DB2 system, with a simple call to the plan left in the COBOL code, during the BIND process. To create a load module with CICS and DB2, the DB2 pre-compilation and translation need to be done, before the CICS translator is run on the CICS-DB2-COBOL program.


COBOL-CICS-DB2 Source Program ---> DB2 Pre-Compiler ---> EXEC SQL statements are commented and replaced by appropriate CALL and MOVE instructions (DB2 Pre-compiled source program) + Database Request Module (DBRM).

The DBRM is used by BIND process to create the PLAN. The DB2 Pre-compiled source listing is processed by CICS translator, which comments the EXEC CICS commands with appropriate CALL and MOVE instructions. The translated source is then Compiled and finally Link-Edited, with other load-modules by including DSNCLI module that provides the interface to CICS-DB2 attachment facility.


9.       Explain the differences in coding a COBOL-DL/I program and a COBOL-CICS-DL/I program.


A. DLIUIB is copied immediately after DFHCOMMAREA in Linkage Section. A PCB pointer need to be declared immediately, followed by the structure of the PCB. In the Procedure Division, the first reference to the DL/I, should be to Schedule the PSB with a DL/I Call using 'PSB' as the function code, and the last DL/I call is run with 'TERM' as the function code. After the 'PSB ' schedule call, SET ADDRESS of PCB-POINTERS to UIBPCBAL, and SET ADDRESS OF PCB declared in the linkage section to the PCB_POINTER declared in the Linkage section.


11. Explain CICS Run.


A. CICS is to be initiated as a high priority batch job to be run on the OS. During the Initialization process VSAM or sequential files are opened according to entries in FCT, Terminal environment is established based on TCT entries, Resident programs are loaded into memory, if the programs have resident=yes option set, in PCT. A sample CICS initial batch job is



12. Explain Mass insert and GENERIC keywords.


A. The MASSINSERT option is used along with the WRITE command, to inform the system to write a bunch of inter-related records at a time. In order to decrease the I/O s with a better utilization of the VSAM CI 's. The GENERIC option is used on file handling commands, when the length of key field is a subset of the whole key along with the LENGTHKEY option.


13. Can you issue SQL COMMIT from a CICS program?


A. Yes.


14. What is the other way of terminating a transaction?


A. EXEC CICS SYNCPOINT. Assuming it is a LUW. This will not end the transaction.


15. What is an ASRA abend ?


A. Any data exception problem SOC7, SOC4 etc.


16. What is an AEY9 abend ?


A. DB2/IDMS Database is not up.


17. What are the situations under which NEWCOPY is required ?


A. When a program has been used in CICS atleast once and then changed and recompiled.


18. What is 2 phase commit? Confirm the answer.


A. It occurs when a programmer Issue's an Exec CICS Syncpoint command. This is called a two phase Commit because CICS will first commit changes to the resources under its control like VSAM files, before DB2 changes are committed. Usually CICS signals DB2 to complete the next phase and release all the locks.



19. What is an AICA abend?


A. Runaway Task.


20. How would you resolve an ASRA abend?


A. In COBOL II start with CEBR, and get the offset/instruction.


21. How do you rollback data written to an ESDS file?


A. Define the file as recoverable. in cases where records have been inserted into the file, you may need to run a batch program to logically delete the inserted records.


22. I have done a STARTBR on a VSAM dataset. Can I do another START BR without doing an ENDBR ?


A. No.


23. When an XCTL is done, does the trans-id change? Is a new task created? Does it cause implicit SYNCPOINT to be issued ?


A. No. No. Yes.


24. What is the DSNC transaction used for ?


A.      DSNC is a CICS Abend Code, which specifies that there is a problem in the CICS/DB2 attachment facility. The CLOTCFLG field in the LOT control block contains a hexadecimal describing the abend code, such as no threads...


6. Temporary Storage and Transient Data Queue's


1. What are the differences between TSQ and a TDQ? (75)


A. (1) In Temporary Storage Queues Data is read randomly, While in Transient Data Queues data must be read sequentially. (2) In a TSQ data can be read any number of times as it remains in the queue until the entire Queue is deleted. In TDQ data item can be read once only. To reuse the TDQ it must be closed and reopened. (3) Data can be changed in TSQ, but not in TDQ. (4) TSQ can be written to Auxiliary or Main Storage, while TDQ is written to Disk. Temporary storage is a holding place, while Transient data is always associated with destination. The (5) TSQ name is defined dynamically, while a TDQ name need to be defined in the DCT. Note: An application uses TSQ 's to pass info' from task to task, while a TDQ to accumulate records before processing or send data for external use, such as a print operation or other.


2. Explain the commands used for handling Temporary Storage queues under CICS, with their options.


A. The WRITEQ TS command is used to Write data into a TSQ. The Options used are QUEUE(name), FROM(d-area) , LENGTH(value), ITEM(item-value), REWRITE and Main/Auxiliary. The last three are optional. The Item value field is to be defined as S9(4) comp. The READQ TS is used to read the TSQ, its options are QUEUE(name), INTO(data area) ,Length(value), ITEM(item-value)/ NEXT. The Item-value is the number of the TS Record in Q'.


3. If I create a TSQ from one transaction, can I read it from another transaction?


A Yes. As long as they run in the same region.


4. Do you require a table entry for a TSQ? Is there any entry for TSQs in CICS tables?


A. If recovery for the TSQ, is needed. It's entered in TST (Temporary Storage table). Yes in the DFHTST.

5. I have TSQ with 15 items. I want to delete the 10th item. How do I do that?


A. By using the ITEM(10) option with DELETE TS command.


6. What is meant by an Indirect destination?


A. An indirect Destination lets a single TDQ be identified by more than one destination Id. The DCT entry for an indirect destination simply specifies the name of the destination defined elsewhere in it. TYPE=INDIRECT option is used during the DCT entry. Ex. DFHDCT TYPE=INTRA, DESTID=L86P, TRANSID=PRTA, TRIGLVL=1 (results in initiating the PRTA transaction after every single entry into TDQ). Ex2. DFHDCT TYPE=INDIRECT, DESTID=PRT1,INDDEST=L86P. The advantage of indirect destinations is to use them when you have to change the destination Id frequently, there is no need for change and compilation of every program associated with it.


7. Why do use DELETEQ TD command, even though the TDQ is read destructive?


A. Depending on the DCT entry for the destination, the disk space occupied by that record may still be reserved, even though the records are not available. So in order to reclaim this space DELETQ TD command is used.


8. How do you reserve Destinations for Exclusive use under the CICS?


A. CICS does not automatically ensure that only one task writes records to a destination at one time. To control this, CICS provides ENQ and DEQ Task control commands used to make resources serially reusable. ENQ command is specified with RESOURCE (data-area/ DESTID) and LENGTH options to reserve the resource. DEQ is used to release the resource. Even, If the DEQ command is not issued, at the End of the task, the resources are released.


9. What are extra partition & intra partition TDQs?


A. Extra-partition TDQ's are datasets used for communication between CICS and other CICS/Batch regions. Intra-partition TDQ's are queues for communication within CICS region. CICS stores the Intra-partition TDQ in a dataset 'DFHNTRA' on the Disk. Extra-partition TDQ doesn't have to be a disk file, it can reside on any device that's a valid QSAM/VSAM. The DCT entry contains the destination-Id, type of TDQ, Destination, Trigger level if needed


10. How do you fire a batch job from a CICS transaction ?


A. Define an extra-partition TDQ as an internal reader and write the JCL to it. Terminate the JCL with /*EOF.


11. What is ATI? What kind of TDQ can be used? What is trigger level in the context of TDQs?

A. ATI is an acronym for Automatic Task Initiation. It's used only with Intra partition TDQ 's by specifying the number of records at which ATI occurs is called the trigger level. Not applicable for extra partition TDQ's.


7. Storage Control


1. How do you access Linkage areas in CICS. (Especially while using the OS/VS COBOL.) (86)


A. The CWA, CSA, TWA, TCTUA are accessed by using the BLL-Cells defined in Linkage area and the ADDRESS command. Ex. EXEC CICS ADDRESS CWA(BLL-CWA) END-EXEC. SERVICE RELOAD BLL-CWA. Under COBOL II BLL Cells needn't be used. Ex. Exec CICS ADDRESS CWA (Address of Comm-area) End-exec.


2. Where Does CICS receive information to store the values of Execution Interface Block (DFHEIBLK)?

A. EIB is a selection of information found in various CICS control Blocks. These control blocks are small areas of main memory that CICS/VS uses to control it's own operations. Some control blocks stand by themselves (CSA, CWA), Some are associated with terminals (TCTUA), Some are associated with Tasks (PROGA - TCA, TWA).


3. Explain the Various control blocks used by CICS in general.


A.      CSA - Common System Area. There is exactly one CSA in memory at any given time, It records which task it is executing and generally, the state of the system as a whole.

CWA - Common Work Area, is an extension of CSA, individual installations define it's own way to use CSA, normally it contains security tables and other global data.


TCTUA - Terminal Control Table User Area is created for each terminal. This installation defined control block contains the user's security level as user-id, and other info to keep running one task to the next.


TCA - Task control Area. For every task running in the system, there is one TCA with information, such as running a Program and whether or not a terminal is connected to the program, i.e. about the execution environment.


TWA - Task work area is an extension to TCA, used by program to record data associated with the task. TWA is used by System utilities for inter-program communication with-in a task.


4. Where do you code the CICS Control blocks in VS/CBL programs? How are control blocks accessed?


A. The Control blocks which are to be accessed are to be defined in the Linkage section of the COBOL program. To access the control blocks, their addresses are to be established, which involves two steps: Find out where the block of storage is located in memory (as CICS knows but not your program) and associate it with control block item defined in the linkage section. The CICS command to initiate the loading of the address of control block is ADDRESS. Ex. EXEC CICS ADDRESS TCTUA(Terminal-BLL-Pointer) END-EXEC. The Terminal-BLL-pointer needs to be defined as S9(8) COMP field, after DFHEIBLK,& DFHCOMMAREA and just before the Block Item definition in the Linkage section. The order of Address-list should match the order of Block definitions.


5. How is dynamic memory allocated within a CICS application program?


A. Use GETMAIN command. Define a BLL-pointer and define a data block in Linkage section (as for control block). However if the Address space needed for dynamic allocation is more than 4 KB, a second Address locator (BLL) is to be defined, and is assigned the value based on the first address received by using the GETMAIN command. EXEC CICS GETMAIN SET(ADDRESS OF ls-area) LENGTH(nnn) INITIMG(HEX-00) END-EXEC. Where ls-area is product record name , and HEX-00 is 1-byte init value.


6. What command is used to release the memory allocated for the program by the GETMAIN command?


A. FREEMAIN command with the name of the block.


7. How do the COBOL program knows, when any entries are changed in the address list?


A. Whenever a entry is changed in the address list, you need to inform the program by using the SERVICE RELOAD statement, so that it can update its internal registry pointers, if not informed unpredictable results arise. The Service Reload statement immediately follows the statement that changes an address list item. Many programmers code the first line as the SERVICE RELOAD ADDRESS-LIST end-exec.


8. How do you handle the Addressing of the Control blocks in CICS by using COBOL II? Compare to VS/COBOL.


A. There is no longer a need to define the Address list before the Control Block definitions in Linkage section, The addressing is entirely handled by CICS. The Length command need not be defined, as CICS checks the data item defined for it. The SERVICE RELOAD statement is no longer required as each time the address variables change the internal register automatically get updated.


9. Explain the Purpose of the CICS Transactions in addition to the information for earlier Q.


A. CEMT is used by operator to control CICS by Open or Close files, Control tuning parameters, Diagnose terminal problems (is it available for use), disable or enable transactions, Shut the CICS down.


10. What is the transaction used to Print.


A. PRNT. It's usually used to print contents of the TDQ's.

11. How many type of Destinations can be defined in the DCT? What are they?

A. Four. They are Intra-partition (I/O within CICS system), Extra-partition (for I/O outside CICS region), Indirect, and Remote. The external dataset defined through DCT can not be a VSAM file as TD can only use sequential files. Note that only Intra-partition TDQ 's can be deleted.


12. Write about CSPG. Give a List of Transactions ID 's provided by IBM for CICS system.


A. CSPG is an IBM supplied transaction code used to browse, delete and manipulate pages built by PAGING operand. CEMT, CECI, CEBR, CECA, CECS, CEDA, CEDB, CEDC and CEDF, PRNT, MAPS.


13. Can you use DYNAMIC calls in CICS ?


A. Yes, the called routine must be defined in PPT and the calling program must use CALL identifier...


14. Suppose program A passes 30 bytes to program B through commarea and program B has defined its DFHCOMMAREA to be 50 bytes. Is there a problem?


A. Yes, if B tries to access bytes 31-50.


15. What is the difference between START and XCTL ?


A. START is used to start a new task. It is a interval control command. XCTL is used to pass control to a program within the same task. It is a program control command.


16. What is the usage of language in the PPT entry?


A. Language interface and call parameters???


17. Can you have CICS code in a copybook? If yes, what happens during compilation?


A. Yes. Needs to be preprocessed.


18. I invoke a transaction from CICS. The program has a code: MOVE DFHCOMMAREA TO WS-AREA. What happens to this transaction? What happens to the other transactions?


A.      Junk may get moved in. Will cause Storage violation. ????


19. How do you handle errors in CICS programs ?


A. Check EIBRESP after the call or use the HANDLE condition.


20. What are the 3 common ways to create maps?

A. The first way is to code a physical map and then code a matching symbolic map in your COBOL program. The second way to create a physical map along with a matching symbolic map is to code only the physical map using the &SYSPARM option, CICS will automatically create a member in a COPY library. And the third way is to use a map generator such as SDF (Screen Definition Facility).


22.   What is Quasi-reentrancy?


A.      There are times when many users are concurrently using the same program, this is what we call Multi-Threading. For example, 50 users are using program A, CICS will provide 50 Working storage for that program but one Procedure Division. And this technique is known as quasi-reentrancy.


20.   How do you remove the unwanted characters as input under the CICS environment?


A. The CICS Built-in function BIF DEEDIT is used. It is most often used foe numeric editing. It can be used to remove the special characters as commas, minus... Ex. for the resulting field to be right justified, and high order positions to be filled with '0' use EXEC CICS BIF DEEDIT

FIELD(ws-data) LENGTH(nnn)




    1. Terminal Control, Interval Control and Task Control


1. Can you send a Simple message on to the terminal without defining / using any Maps? (110)


A. Yes, By using the SEND TEXT command with FROM(data-area), LENGTH(value), ERASE and FREEKB options, as needed. FREEKB option specifies the keyboard to be unlocked, If not specified press the RESET key.


2. What is the purpose of ACCUM option in the Send Map command. Explain in detail.


A. If say three maps have to be sent to the terminal (1st with title common to all, Last with messages common to all and the middle one, the map with info' pertaining to the program.) The if we use the ACCUM option with the SEND MAP, the system accumulate the maps into a Page Buffer. By using SEND PAGE, all the maps can be sent together as a single map, which decrease the I/O time between the system terminal and the CICS system.


3. How are the HEADER and TRAILER options of DFHMDI are used?


A. When a MAP is sent with HEADER=YES as an operand, previous pages are erased. A page always "reserves" enough space to hold the largest TRAILER=YES map. Define the 1st map with header=yes with Justify=First and last map with trailer=yes with justify=last and the all the other's in between with justify=next. This type of Map Definition Initial will helps to control overflow by using the HANDLE CONDITION OVERFLOW command.


4. Write about Paging.


A. PAGING operand is used with SEND MAP to accumulated pages and send them to temporary storage for later use.


5. What are the basic Terminal control commands under CICS?






6.       What is the use of the RETRIEVE command in CICS?


A.      RETRIEVE is used to retrieve data passed to a transaction by using the START command. It has the options as INTO, LENGTH, RTRANSID, RTERMID and QUEUE, which are used to receive respective data sent by START.

The CANCEL command can be used to Cancel a START request by using the REQID option.


7. When you do a START, what will the value of EIBCALEN?


A. Zero.


8. What are various Interval Control Commands used under CICS?


A. ASKTIME, FORMATTIME with the ABSTIME (data-area. S9(15)) option are the two widely used CICS commands to determine the system data and time in various formats.


9. Explain the Interval control Command START.


A. The Automatic Time Ordered Transaction Initiation (ATI) is done by using the START command. Similar to Automatic Data-Driven Transaction Initiation done by using the DCT entries. The START command has various options as


INTERVAL(hhmmss, S9(7)comp3),

TIME(hhmmss, S9(7)comp3),








LENGTH(s9(4) comp),



QUEUE(xxxxxxxx) (x-are passed to task),

REQID(a 8 byte value to cancel).


Frequently the TRANSID, TERMID and a Interval option as time are used.


10. What is the use of the Task Control command, SUSPEND in CICS?


A. The SUSPEND command is used with no options to suspend the current task, by sending it to the end of the Task queue, controlled by the Dispatcher. Normally an application gives up control whenever it issues a CICS command. In the mean time before the task is re-initiated the Dispatcher gives control to another task and so on. This allows many tasks to be operating at once, though only one of them only is really being executed by the system. For most CICS application programs needs very short CPU time utilization requirement before it executes the CICS command. However for very few of them needs a long stretch of CPU time, which could be suspended when it is taking long CPU time, to give control to dispatcher, which prioritizes and executes other tasks of high priority.


11. Explain the LOAD command.


A. It's used to retrieve and load an object program from Disk into Memory. It's used to handle large static tables. It could use a number of pointers for each 4096K size of data. It's a storage control command such as GETMAIN.


12. What are the Recovery Processing Commands used in CICS?


A. SYNCPOINT and ROLLBACK, which are used to commit or back out all the changes made during the Current LUW.


13. Identify the use of ABEND. List a few common abend codes.


A. When CICS is unable to execute a command, it generates an AB-normal task ENDing. When an Abend occurs, CICS issues a 4-char Abend code. This Abend code is sent to terminal running the task and is attached to the Abend dump created by using the Contents in Memory for that task by CICS. The common CICS Abend codes are ASRA- System runtime error(Division by 0, subscript over run ...), ABMO-BMS map not in Mapset, APCT-Call for nonexistent pgm, AExx-Exceptional conditions encountered during the run (AEIN-Duplicate records, AEIT-eof).


14. Explain, How the Abends can be handled from a CICS program.


A. The HANDLE ABEND command is used to trap and Handle errors. It has 4 possible options and only one of them can be used with this command at a time. The options are Program(...) to transfer control to the program, Label(...) to transfer control to the specified paragraph, Cancel option keeps the earlier Handle Abends from being executed. Reset option will reactivate the Handle Abend commands, which were previously cancelled.


15. Explain ABEND command and it's use. How do you read a dump?


  1. Abends can also be caused by ABEND commands in addition to the programs, used to get the system Memory Dumped. The system memory contains the address of the command, which caused the dump, the contents of program variables, and list of other processes being executed by the system. The CICS Dump dataset, created during the Abend could be printed by using the DFHDUP utility.


1st step while reading a dump is to find out the program that caused the Abend. The Relative Address of a command equals to Absolute address - Load address of the module. Actually the Abend Dump will not tell the command which caused the Abend, but the absolute address of the next command which would have been executed, if there is no abend. As your program contains CICS commands, the Link Editor adds an extra control section or CSECT to the front of the program. The Load address given is for CSECT and not the program itself. So Actual program load address = program load address from dump + length of DFHECI.


The beginning of the CICS Dump for a task is identified by Abend Code and task name. You can find the PSW, and the register content immediately after the task name. Now search for 'Program Storage', and make a note of the Program Load address.


Now search for 'Control Section' under this task, to determine the (CSECT) DFHECI length. Add the last two addresses to determine the actual load module address. The Second word of the PSW always contains the next instruction to be executed, so a make a note of it.


Now calculate the Relative address of the Next instruction to be executed before abend by subtraction. Now exit the dump and view the condensed compiler listing of the program, which shows the addresses and line numbers of all Cobol commands, which can be executed. Use this information to determine the command that caused the Abend.


16.   Explain Dynamic Transaction Backout and Emergency Restart? (125)


A.      When a Transaction terminates abnormally, CICS invoke DTB program that processes the before-images stored in Dynamic Log of the transaction to reverse any changes made to the protected resources. After DTB come to end, it is as if the transaction was never started. Emergency Restart is a procedure used to restart the CICS when it terminates abnormally. First, recovery control processes the system log, which contains a record of every update made during the previous CICS execution. Recovery control reads the system log backwards, determining which updates were made by in-flight tasks (- tasks that were active when the uncontrolled shutdown occurred). Each updated that was made by an in-flight task is copied to the restart dataset, which is then processed by the Transaction Backout program similar to DTB, for restoring the protected resources. The difference is that the transaction backout program updates made by many tasks, while DTB restores updates made by only one task.