CICS Interview Questions
What is CICS?
Customer Information Control System.
What does "Pseudo Conversational" mean?
The programming technique in which the task will not wait for the end-user replies on the terminal. Terminating the task every time the application needs a response from the user and specifying the next transaction to be started when the end user press any attention key (Enter, PF1 through PF24, PA1,PA2 and Clear) is pseudo-conversational processing.
What is the difference between pseudo-conversational and conversational?
Pseudo-conversational will start a new task for each input. By coding a CICS RETURN command specifying ‘TRANSID(itself). Conversational will have an active task during the duration of the data entry.
What is multitasking and multithreading?
Multitasking is the feature supported by the operating system to execute more than one task simultaneously. Multithreading is the system environment where the tasks are sharing the same programs load module under the multitasking environment. It is a subset of multitasking since it concerns tasks which use the same program.
Explain re-entrancy as applies to CICS.
Reentrant program is a program which does not modify itself so that it can reenter to itself and continue processing after an interruption by the operating system which, during the interruption, executes other OS tasks including OS tasks of the same program. It is also called a "reenterable" program or"serially reusable" program.
A quasi-reentrant program is a reentrant program under the CICS environment. That is, the quasi-reentrant program is a CICS program which does not modify itself. That way it can reenter to itself and continue processing after an interruption by CICS which, during the interruption, executes other tasks including CICS tasks of the same program. In order to maintain the quasi-reentrancy, a CICS application program must follow the following convention:
Constants in Working Storage: The quasi-reentrant program defines only constants in its ordinary data area (e.g. working Storage Section ). These constants will never be modified and shared by the tasks.
Variable in Dynamic Working Storage: The quasi reentrant program acquires a unique storage area dynamically for each task by issuing the CICS macro equivalent GETMAIN. All variables will be placed in this DWS for each task. All counters would have to be initialized after the DWS has been acquired.
Restriction on Program Alteration: The program must not alter the program itself. If it alters a CICS macro or command, it must restore the alteration before the subsequent CICS macro or command.
What is meant by program reentrance?
A program is considered reentrant if more than one task can execute the code without interfering with the other tasks' execution.
What is Quasi-reentrancy?
There are times when many users are concurrently using the same program, this is what we call Multithreading.
What is a resident program?
A program or map loaded into the CICS nucleus so that it is kept permanently in main storage and not deleted when CICS goes "Short On Storage".
Specify CICS transaction initiation process.
TCP places data in TIOA and corresponding entry into TCT.
KCP acquires the transaction identifier from TIOA and verifies if it is present in PCT.
SCP acquires Storage in Task Control Area (TCA), in which KCP prepares control data for the task.
KCP then loads the application programs mentioned in PCT by looking for it in PPT.
If resident – real storage memory location is not present in the PPT the control is passed to PCP that loads the application programs from the physical storage location address given in PPT. The control is then passed to the application program (LOAD module).
How can you start a CICS transaction other than by keying the Transaction ID at the terminal?
By coding an EXEC CICS START in the application program
By coding the trans id and a trigger level on the DCT table
By coding the trans id in the EXEC CICS RETURN command
By associating an attention key with the Program Control Table
By embedding the TRANSID in the first four positions of a screen sent to the terminal.
By using the Program List Table
What is the function of the CICS translator?
The CICS translator converts the EXEC CICS commands into call statements for a specific programming language. There are CICS translators for Assembler, COBOL, and PL/1.
Explain the term Transaction routing?
Transaction routing is a CICS mode of intercommunication which allows a terminal connected to local CICS to execute another transaction owned by a remote CICS.
Explain the term Function Request Shipping?
Function request shipping is one of the CICS modes of intercommunication which allows an application program in a local CICS to access resources owned by a remote CICS.
Explain the term "MRO" (Multi Region Operation)?
MRO is the mechanism by which different CICS address spaces within the same CPU can communicate and share resources.
What is meant by a CICS task?
A CICS task exists from the time the operator presses the enter key until the application program returns control to CICS.
What are the DB2 steps required to migrate a CICS DB2 program from source code to load module?
A DB2 precompiler processes some SQL statements and converts others. It creates a data base request module (DBRM) for the binding step. The bind process uses the DBRM to create an application plan, which specifies the techniques DB2 will use to process the embedded SQL statements. The link/edit step includes an interface to the CICS/DB2 attachment facility.
What is the CICS LOAD command?
The LOAD command retrieves an object program from disk and loads it into main storage - it's primarily used for a constant table that will be available system-wide.
What are the situations under which NEWCOPY is required?
When a program has been used in CICS at least once and then changed and recompiled.
Can you have CICS code in a copybook? If yes, what happens during compilation?
Yes. Needs to be preprocessed.
What are the databases that CICS can access?
DB2, DL/I, ORACLE
What is a two Phase commit in CICS?
This occurs when a programmer Issues a Exec CICS Syncpoint command. this is called two phase because CICS will first commit changes to the resources under its control like VSAM files. and the DB2 changes are committed. Usually CICS signals Db2 to complete the next phase and release all the locks.
Is there any entry for TSQs in CICS tables?
Yes in the DFHTST.
What is the use of DCT?
Destination Control Table used to define TDQs
Which option of the PCT entry is used to specify the PF key to be pressed for initiating a transaction?
TASKREQ=PF1
Which CICS service transaction is used to gain accessibility to CICS control tables?
CEDA
Into which table is the terminal id registered?
TCT.
What is the purpose of the Program List Table?
The Program List Table records the set of applications programs that will be executed automatically at CICS start-up time.
Which CICS system program is responsible for handling automatic task initialization?
The Transient Data Program(TDP).
I have written a CICS program. What tables should I setup to run this program?
PPT, PCT, (FCT, DCT, RCT (if needed)).
In which table would you make an entry for a BMS map?
PPT
For a CICS-DB2 program, how is the plan referenced
RCT table
What is the option of the DFHDCT macro which makes it possible to recover logically deleted records from an Intrapartition TDQ?
REUSE=YES
What is the primary function of the Sign-on Table?
Register security information of all programs
What is the difference between CICS Program Control Table (PCT) and CICS Processing Program Table (PPT) ?
PCT contains a list of valid transaction ID. Each transaction ID is paired with the name of the program ,CICS will load and execute when the transaction is invoked. On the other hand, PPT indicates each program's location which pertains to a storage address if the program has already been loaded or a disk location if the program hasn't been loaded. PPT will also be used to determine whether it will load a new copy of the program when the transaction is invoked.
Which is the program which determines whether a transaction should be restarted?
DTB
What is BMS?
BMS is Basic Map Support; it allows you to code assembler level programs to define screens.
What is a mapset?
A mapset is a collection of BMS maps link-edited together.
Mention the 5 fields available in the symbolic map for every ‘NAMED’ field in the DFHMDI macro?
FIELD+L - Return the length of text entered (or for dymanic cursor positioning)
FIELD+F - Returns X(80) if data entered but erased.
FIELD+A - Used for attributes reading and setting
FIELD+I - Used for reading the text entered while receiving the map.
FIELD+O - Used for sending information on to the MAP.
How to dynamically set the CURSOR position to a specific field?
MOVE –1 to FIELD+L field. Mention CURSOR option in the SEND command.
What are the attribute values of Skipper and Stopper fields?
ASKIP, PROT.
How do you set the MDT option to ‘ON’ status, even if data is not entered?
Mention FSET option in DFHMDF or set it dynamically in the program using FIELD+A attribute field.
What is the difference between the INTO and the SET option in the EXEC CICS RECEIVE MAP command?
The INTO option moves the information in the TIOA into the reserved specified area, while the SET option simply returns the address of the TIOA to the specified BLL cell or "address-of" a linkage-section
What is MDT?
MDT ( Modified Data Tag ) is one bit of the attribute character. If it is off ( 0 ), it indicates that this field has not been modified by the terminal operator. If it is on ( 1 ), it indicates that this field has been modified by the operator. Only when MDT is on, will the data of the field be sent by the terminal hardware to the host computer ( i.e., to the application program, in end ). An effective use of MDT drastically reduces the amount of data traffic in the communication line, thereby improving performance significantly. Therefore, BMS maps and CICS application programs should be developed based on careful considerations for MDT.
What are the three ways available for a program to position the cursor on the screen?
Static positioning - Code the insert cursor (IC) in the DFHMDF BMS macro.
Relative positioning - Code the CURSOR option with a value relative to zero(position 1,1 is zero).
Symbolic positioning - Move high values or -1 to the field length in the symbolic map(and code CURSOR on the SEND command).
Name three ways the Modified Data Tag can be set on?
The Modified Data Tag can be set on:
1. When the user enters data into the field.
2. When the application program moves DFHBMFSE to the attribute character.
3. By defining it in the BMS macro definition.
What is the function of DFHMDF BMS macro?
The DFHMDF macro defines fields, literal, and characteristics of a field.
What is the difference between FSET and FRSET?
FSET specifies that the modified data tag should be turned on before the map is sent to the screen.
FRSET turns off the attribute byte; it's used to transmit only changed data from the terminal.
What is the difference between the enter key, the PF keys and the PA keys?
The Enter and PF keys transmit data from the screen; the PA keys tell CICS that a terminal action took place, but data is not transmitted.
What do the keywords MAPONLY and DATAONLY mean?
MAPONLY is a SEND MAP operand that sends only fields with initial values to the screen. DATAONLY is the SEND MAP operand that specifies only data from the map area should be displayed.
How is the stopper byte different from an auto skip byte ?
STOPPER command will stop after completing its field , whereas AUTOSKIP command Will skip to next unprotected field after completing its field.
What are the two outputs created as a result of generation of a map?
The map copybook and the load module.
What is the attribute byte?
Defines the display/transmission of field. most cases are an output field from the program.
How do you use extended attributes ?
Define EXTATT=YES and the correct terminal type.
What is the use of DSECT parameter in BMS?
Is the parameter to generate a symbolic map.
Can you use OCCURS in a BMS map?
Yes.
Can you define multiple maps in a BMS mapset?
Yes.
What does the BUFFER option in RECEIVE mean ?
Brings the entire datastream from the terminal buffer.
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?
DFHEIBLK, DFHCOMMAREA
What is the option that is used to erase all unprotected fields during a SEND MAP operation?
ERASEAUP
What will happen, if an out-of-range or negative value is specified in the LENGTH option of the SEND command?
The OUTRAGE condition will be set
What is DFHEIBLK?
DFHEIBLK is Execute Interface Block. It is placed in the linkage section automatically by CICS translator program. It must be the first entry in linkage section. CICS places values prior to giving control to the program and we can find almost any information about our transaction.
What is a logical message in CICS?
A logical message is a single unit of output created by SEND TEXT or SEND MAP commands. BMS collects the separate output from each command and treats them as one entity. This technique may be used to build CICS reports.
If DATAONLY option is specified in the SEND MAP command what will happen?
Only the symbolic map will be send
What is the difference between a physical BMS mapset and a logical BMS mapset?
The physical mapset is a load module used to map the data to the screen at execution time. The symbolic map is the actual copybook member used in the program to reference the input and output fields on the screen.
What is Communication Area?
An area used to transfer data between different programs or between subsequent executions of the same program. Needs to be defined in the Linkage Section.
What is EIB. How it can be used?
CICS automatically provides some system-related information to each task in a form of EXEC Interface Block (EIB), which is unique to the CICS command level. We can use all the fields of EIB in our application programs right away.
The execute interface block lets the program communicate with the execute interface program, which processes CICS commands. It contains terminal id, time of day and response codes.
What is some of the information available in the EIB area?
The cursor position in the map
Transaction ID
Terminal ID
Task Number
Length of communication area
Current date and time
Attention identifier
What information can be obtained from the EIBRCODE?
The EIBRCODE tells the application program if the last CICS command was executed successfully and, if not, why not.
How and where is the TWA size set?
TWASIZE=300 in PCT table.
What does it mean when EIBCALEN is equal to zeros?
When the length of the communication area (EIBCALEN) is equal to zeros, it means that no data was passed to the application.
The DFHCOMMAREA is used to pass information from one application to another. What are some other ways that this function can be accomplished?
We can also pass information in the following ways.
- By using a temporary storage queue
- By using an intrapartition TDQ
- By using the Task Work Area
- By using TCTUA
- Through a file
How do you define Task Work Area?
By defining it on the PCT (the Program Control Table)
What is the common systems area (CSA)?
The common systems area is the major CICS control block that contains system information, including pointers to most other CICS control blocks. The CSA points to all members of STATIC storage.
What is the meaning and use of the EIBAID field?
EIBAID is a key field in the execute interface block; it indicates which attention key the user pressed to initiate the task.
How do you access storage outside your CICS program?
In COBOL storage was accessed via BLL cells using the SET option of ADDRESS commands. In COBOL II the special register, ADDRESS OF lets you reference the address of any Linkage Section field.
Name some important fields in the EIB block ?
EIBRESP, EIBCALEN, EIBRRCDE, EIBTASK, EIBDATE, EIBTIME
Before issuing an ASKTIME command what will be the values in the EIBDATE and EIBTIME fields if the EIB?
The date and time at the task initiation
What will be the length of the eibcalen ,if the transaction is used to cics first time?
The length will be 0(zero).
The EIB field which gives the last CICS command executed is
EIBRCODE
Explain how to handle exceptional conditions in CICS.
An abnormal situation during execution of a CICS command is called an exceptional condition".There are various ways to handle these exception conditions:
1. Handle Condition Command: It is used to transfer control to the procedure label specified if the exceptional condition specified occurs.
2. Ignore Condition Command: It causes no action to be taken if the condition specified occurs in the program. That is control will be returned to the next instruction following the command which encountered the exceptional condition.
3. No Handle Option: This option can be specified in any CICS command and it will cause no action to be taken for any exceptional condition occurring during execution of this command.
4. RESP Option: This option can be specified in any CICS command. If the RESP option is specified in a command, CICS places a response code at a completion of the command. The application program can check this code, then proceed to the next processing.
How many conditions can you include in a single HANDLE CONDITION command?
No more than 16 in a single handle condition. If you need more, then you must code another HANDLE CONDITION command.
What is the difference between EXEC CICS HANDLE CONDTION and an EXEC CICS IGNORE command?
A HANDLE CONDITION command creates a "go-to" environment. An IGNORE command does not create a go-to environment; instead, it gives control back to the next sequential instruction following the command causing the condition. They are opposites.
What happens when a CICS command contains the NOHANDLE option?
No action is going to be taken for any exceptional conditional occurring during the execution of this command. The abnormal condition that occurred will be ignored even if an EXEC CICS HANDLE condition exists. It has the same effect as the EXEC CICS IGNORE condition except that it will not cancel the previous HANDLE CONDITION for any other command.
When a task suspends all the handle conditions via the PUSH command, how does the task reactivate all the handle conditions?
By coding an EXEC CICS POP HANDLE command.
Which is the option of the HANDLE AID command that will pass control to the specified label when any key is pressed?
ANYKEY
Which is the AID that will not be identified in the ANYKEY option of the HANDLE AID command?
CLEAR
A HANDLE CONDITION remains active until the end of the program or until another HANDLE CONDITION command (True or False).
True
How many exceptional conditions can be given in a HANDLE CONDITION?
Max. of 12 exceptional conditions can be given in a single HANDLE CONDITION.
If no exception handling is provided in the program, what will happen ?
CICS will take the default action specified for the condition
What is the difference between getting the system time with EIBTIME and ASKTIME command?
The ASKTIME command is used to request the current date and time. Whereas, the EIBTIME field have the value at the task initiation time.
What does the following transactions do?
CEDF - CICS-supplied Execution Diagnostic Facility transaction. It provides interactive program execution and debugging functions of a CICS programs.
CEMT - CICS-supplied Extended Master Terminal transaction. It displays or manipulates CICS control environment interactively.
CEBR - CICS-supplied Temporary Storage Browse transaction. It displays the content of Temporary Storage Queue ( TSQ ).
CECI - CICS-supplied Command Interpreter transaction. It verifies the syntax of a CICS command and executes the command.
What information do you get when an EXEC CICS STARTCODE is issued?
We can able to determine if the application was started by (1) a transient data trigger level(QD), (2) a START command (S,SD), (3) user (U) or terminal input (TD), or (4) Distributed Program Link(D,DS).
What is the meaning of the SYNCPOINT command?
SYNCPOINT without the ROLLBACK option makes all updates to protected resources permanent; with the ROLLBACK option it reverses all updates.
What is a transid and explain the system transid CEMT?
Transid is a transaction identifier, a four character code used to invoke a CICS task. CEMT is the master terminal transaction that lets you display and change the status of resources - it is the primary CICS service transaction.
Why is it important not to execute a STOP RUN in CICS?
Stop run will come out from the CICS region.
Why doesn’t CICS use the COBOL Open and Close statements?
CICS automatically opens and closes files those are placed in FCT
How is dynamic memory allocated within a CICS application program?
Use a GETMAIN
What is the command which will delete a program Loaded into the main storage using LOAD command?
RELEASE
What will happen when the resource security check has failed on the program which has been specified in the PROGRAM option of the LOAD command?
INVREQ
What is ENQ in CICS?
If anyone want to restrict Trans-Id to single user, enter trans-id with ENQ. It won't allow any one else to use the same trans-id.
What is the command that is used to delay the processing of a task for a specified time interval or until a specified time?
WAIT
What are the CICS commands available for program control?
The following commands are available for the Program Control services:
LINK: To pass control to another program at the lower level, expecting to be returned.
XCTL: To pass control to another program at the same level, not expecting to be returned.
RETURN: To return to the next higher-level program or CICS.
LOAD: To load a program.
RELEASE: To release a program.
What is the difference between LINK and XCTL?
The XCTL command passes control to another program, but the resources requested by the first program may still be allocated. A task does not end until a RETURN statement is executed. While in LINK command, program control resumes its instruction following the LINK parameter. The disadvantage of LINK is that it requires that both the calling program and the called program remain in main memory even though both are no longer needed.
What is the effect of including the TRANSID in the EXEC CICS RETURN command?
The next time the end user presses an attention key, CICS will start the transaction specified in the TRANSID option.
How do you execute a background CICS transaction ?
With a START or ATI.
What is difference between call and link ?
In case of call , whenever you do changes to the called program you need to compile the calling program also. In case of link , it is not needed .
List the sequence of steps used to achieve "Modification in Skip Sequential Mode."
READNEXT command
Issue the ENDBR command
Issue the READ command with UDTAE option.
Manipulate the record (DELETE or REWRITE command)
Issue START command
Issue two READNEXT commands (One for dummy skip)
Go to step two.
How do you establish a starting position in a browse operation?
STARTBR
Mention the option used in the CICS READ command to gain accessibility directly to the file I/O area.
SET(ADDRESS OF LINKAGE-AREA
Which command is used to release a record on which exclusive control is gained?
UNLOCK
What is the difference between using the READ command with INTO option and SET option?
When we use INTO option with the READ command the data content of the record will be moved into the specified field defined in the Working Storage Section of the program. When we use SET option with the READ command , CICS sets the address pointer to the address of the record in the file input / output area within CICS, so that the application program can directly refer to the record without moving the record content into the Working Storage area defined in the program. Therefore, the SET option provides a better performance than the INTO option.
Are sequential files supported by CICS?
Yes, but not as part of the File Control Program. They are supported as extra partition transient data files.
How will you access a VSAM file using an alternate index?
Through the path. Define path as an FCT and use normal File control commands.
How do you rollback data written to an ESDS file?
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.
What is the MASSINSERT option?
MASSINSERT is a WRITE option that modifies normal VSAM split processing, leaving free space after the inserted record, so subsequent records can be inserted without splits. It is ended by an UNLOCK command.
Can you access ESDS files from CICS?
Yes.
What CICS command would you use to read a VSAM KSDS sequentially in ascending order?
First issue a STARTBR(start browse), which will position the browse at the desired record. Retrieve records by using subsequent READNEXT commands. Indicate the end of sequential processing with the ENDBR command. If the generic key is specified in the STARTBR command positioning in the file will be before the first record satisfying the generic key.For reading in descending order use the READPREV instead of READNEXT.
The READ command with INTO option will read the record specified into the data area specified
False
Which is the command used for terminating a browse operation?
ENDBR
What is temporary storage?
Temporary storage is either main or auxiliary storage that allows the program to save data between task invocations.
What is transient data?
Transient data provides CICS programs with a simple method for sequential processing, often used to produce output for 3270 printers.
What are the two types of transient data queues?
They are intrapartition, which can only be accessed from within CICS and extrapartition, which are typically used to collect data online, but process it in a batch environment.
Which transient data queue supports ATI?
INTRA-PARTITION Data queue.
What is the most common way of building queue-id of a TSQ?
TERMID+TRANSACTION-ID.
Why is a TERM ID recommended in naming a TSQ?
In order to avoid confusion and to maintain data security, a strict naming convention for QID will be required in the installation. Moreover, for a terminal-dependent task (e.g., pseudo-conversational task), the terminal id should be included in QID in order to ensure the uniqueness of TSQ to the task.
What are the differences between Temporary Storage Queue (TSQ) and Transient Data Queue (TDQ).?
Temporary Storage Queue names are dynamically defined in the application program, while TDQs must first be defined in the DCT (Destination Control Table). When a TDQ contains certain amount of records (Trigger level), a CICS transaction can be started automatically. This does not happen when using a TSQ. TDQ(extra partition) may be used by batch application; TSQ cannot be accessed in batch. The Transient Data Queue is actually a QSAM file. You may update an existing item in a TSQ. A record in a TDQ cannot be updated. Records in TSQ can be read randomly. The TDQ can be read only sequentially. Records in Temporary Storage can be read more than once, while records stored in Temporary Data Queues cannot. With TDQs it is "one read" only.
What is the use of a TDQ, TSQ?
Temporary data stores.
what are the differences between DFHCOMMAREA and TSQ ?
Both are used to save data among tasks. but 1. COMMAREA is private to that transaction only . like every transaction has its own COMMAREA created by CICS as soon as the transaction is initiated . however TSQ , if queue id is known can be accessed by other transactions also 2. COMMAREA length is s9(4) comp i.e. 65k . but TSQ can have any length.3. COMMAREA is available only during the transaction is running. TSQ if created with auxiliary option resides in aux memory and available even if main memory crashes.4.normally COMMAREA is used to transfer data from one task to another while tsq is used widely within the task as a scratch pad.
Which type of TDQ is read destructive?
Intrapartition TDQ is read destructive. extra partition tdq is not read destructive.
How do you access the records randomly in TSQ ?
By specifying the ITEM option
TSQs can be written in the Main storage or Auxiliary storage
True
Reading a record from a TSQ will logically delete the record from the Queue
True
What is an ASRA?
An ASRA is the CICS interrupt code, the equivalent of an MVS abend code.
Name and explain some common CICS abend codes?
Any AEI_ indicates an execute interface program problem - the abending program encountered an exceptional condition that was not anticipated by the coding.
APCT - the program could not be found or is disabled.
ASRA – most common CICS abend, indicating a program check, identified by a one-byte code in the Program Status Word in the dump.
AKCP - the task was cancelled; it was suspended for a period longer than the transaction's defined deadlock timeout period.
AKCT - The task was cancelled because it was waiting too long for terminal input.
What is an ASRA abend?
Any data exception problem SOC7, SOC4 etc.
What is an AEY9 abend?
DB2/IDMS not up
What is an AICA abend?
Runaway Task.
What is ASRA ABEND in CICS?
It occurs when program interruption takes place. e.g.: when alphanumeric string moved to numeric data item OR when arithmetic calculations performed on nonnumeric data item OR when an attempt made to read an occurrence of a table beyond the defined occurrences.
The error code AEIV?
This is the error code for length, if length of the source data is more than the receiving field, This error will occur.