CICS Frequently Asked Questions and Answers
Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com
CICS Frequently Asked Questions and Answers
What is the meaning for CICS?
Answer:
Customer Information Control System.
What is CICS ?
Answer:
CICS is a telecommunications monitor software product from IBM.
The IBM mainframe operating systems are batch and time-sharing.
CICS supports the development and execution of online applications.
It does this by communicating with terminals and sending and receiving fomatted data.- accessing files and database
CICS itself is batch job running on the operating system with high priority.
CICS does scheduling of programs that run under the CICS region.
How do you place the cursor on a particular position on the screen?
Answer:
Move -1 to the length attribute of the field and use the CURSOR option.
Define the field with IC in the BMS map.
Answer:
Use CURSOR(n m)??
What are the two outputs created as a result of generation of a map?
Answer:
The map copybook and the load module.
What is the difference between physical map and symbolic map?
Answer:
The physical map is the load module and the symbolic map is the data structure.
How do you protect a field from being overlaid?
Answer:
What is the attribute byte?
Defines the display/transmission of field. most cases is an output field from the program.
How do you use extended attributes ?
Answer:
Define EXTATT=YES and the correct terminal type.
What are the 3 working storage fields used for every field on the map?
Answer:
Length, attribute and input/output field.
What is MDT? What are FSET, FRSET ?
Answer:
Modified Data Tag.
Bit in the attribute byte indicating modification of field on screen.
Happens on an input operation.
SET.
Sets MDT on to ensure field is transmitted.
Happens on an output operation.
FRSET.
Resets MDT. Until this happens, field continues to be sent.
What is the use of DSECT parameter in BMS?
Answer:
Is the parameter to generate a symbolic map.
Do you receive the attribute byte in the symbolic map?
Answer:
On EOF yes.
What is effect on RECEIVE MAP when
Answer:
PF key is pressed? Data transmission may happen,
PA key is pressed? Data transmission will not happen.
What are SEND MAP MAPONLY & SEND MAP DATAONLY ?
Answer:
MAPONLY
- to send the map alone, without any data.
Eg: used for sending Menu screens.
DATAONLY
- to send data alone, without sending the screen layout again.
Eg: used for refreshing the screen data.
What is the difference between a PF key & a PA key ?
Answer:
PF keys wake up the task and transmit modified data,
PA keys only wake up the task.
Name the macros used to define the following:
Answer:
MAP MAPSET FIELD
DFHMSD
DFHMDI
DFHMDF
Can you define multiple maps in a BMS mapset?
Answer:
Yes.
How is the storage determined in the symbolic map, if you have multiple maps?
Answer:
Storage for maps redefine the first.
This means largest map has to be the first.
What is the meaning of BMS length of field = 0?
Answer:
Data was not entered in the field
Can you simply check if length = 0 for checking if a field was modified?
Answer:
No, not if ERASE EOF was used.
What do you do if you do not want characters entered by the user to be folded to uppercase ?
Answer:
Use ASIS option on RECEIVE.
What does the BUFFER option in RECEIVE mean ?
Answer:
Brings the entire datastream from the terminal buffer.
What are the steps you go through to a create a BMS executable?
Answer:
Assemble to create CSECT and Link
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?
Answer:
DFHEIBLK,
DFHCOMMAREA
List all the CICS tables and explain their contents.
Answer:
Sigla
Descrição
Função
PPT
Processing Program Table
Program and Cics Maps are registered here.
SIT
System Initialization Table
Parameters used by the system initialization process.
In particular, the SIT identifies (by suffix characters) the versions of CICS system control programs and CICS tables that you have specified are to be loaded.
PCT
Program Control Table
Transaction Id are registered here.
JCT
Journal Control Table
FCT
File Control Table
All VSAM file names are registed here
SNT
Sign on Table
All Used id’s & password which requires login access to CICS region should be registered in sign-on-table
DCT
Data Control Table
TDQ are registered here
SRT
System Recovery Table
A list of codes for abends that CICS intercepts
RCT
Resource Control Table
DB2 plans are registered here
TCT
Terminal Control Table
Terminals are registered here
I have written a CICS program.
What tables should I setup to run this program?
Answer:
PPT, PCT, (FCT, DCT, RCT (if needed)).
In which table would you make an entry for a BMS map?
Answer:
PPT
What is the content of the PPT entry?
Answer:
Length, Source, Use count, Lang, Res count DFHRPL number<
For a CICS-DB2 program, how is the plan referenced?
Answer:
Uses a RCT table.
How is dynamic memory allocated within a CICS application program?
Answer:
Use a GETMAIN
What is the use of a TDQ, TSQ?
Answer:
Temporary data stores.
If I create a TSQ from one transaction, can I read it from another transaction?
Answer:
Yes.
As long as they run in the same region.
What are extra partition & intra partition TDQs?
Answer:
Extra partition TDQs are datasets used for communication b'n CICS and other CICS/Batch regions.
Intrapartition TDQs are queues for communication within regn.
What is MDT ?
Answer:
Bit in the attribute byte indicating modification of field on screen.
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.
What is DFHCOMMAREA ?
Answer:
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.
What is Execution Interface Block (EIB) ?
Answer:
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.
What are the important tables used in the CICS-DB2 environment ?
Answer:
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.
What are the various commands used to browse through a dataset ?
Answer:
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.
What is 2 phase commit ?
Answer:
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.
What are ASRA, AICA, AEY9 abend ?
Answer:
ASRA - Any data exception problem SOC7, SOC4 etc
AICA - Runaway Task.
AEY9 - DB2/IDMS Database is not up.
What are the differences between TSQ and a TDQ ?
Answer:
(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.
(5)The 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.
What are Extra partition & Intra partition TDQs ?
Answer:
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
How is an Abend handled in a CICS program ?
Answer:
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.
What is Quasi-reentrancy ?
Answer:
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.
Is there any entry for TSQs in CICS tables?
Answer:
Yes in the DFHTST.
What is the use of DCT?
Answer:
Destination Control Table used to define TDQs
What is ENQ, DEQ ?
Answer:
Task control commands to make resources serially reusable.
Can you issue SQL COMMIT from a CICS program?
Answer:
Yes
What is the other way of terminating a transaction?
Answer:
EXEC CICS SYNCPOINT.
Assuming it is a LUW. This will not end the Xn.
What are the situations under which NEWCOPY is required ?
Answer:
When a program has been used in CICS atleast once and then changed and recompiled.
What is 2 phase commit?
Answer:
What is EXEC CICS RETRIEVE ?
Used by STARTed tasks to get the parameters passed to them.
Name some important fields in the EIB block ?
Answer:
EIBRESP, EIBCALEN, EIBRRCDE, EIBTASK, EIBDATE, EIBTIME
Can you use DYNAMIC calls in CICS ?
Answer:
Yes, the called routine must be defined in PPT and the calling program must use CALL identifier.
How do you handle errors in CICS pgms ?
Answer:
Check EIBRESP after the call or use the HANDLE condition.
Suppose pgm A passes 30 bytes to pgm B thru commarea and pgm B has defined its DFHCOMMAREA to be 50 bytes .
Is there a problem?
Answer:
Yes, if B tries to access bytes 31-50.
What is the difference between START and XCTL ?
Answer:
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.
What is an AICA abend?
Answer:
Runaway Task.
How would you resolve an ASRA abend?
Answer:
In COBOL II start with CEBR, and get the offset/instruction.
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?
Answer:
Junk may get moved in.
Will cause Storage violation.
When you do a START, what will the value of EIBCALEN?
Answer:
Zero.
How are VSAM files Read in CICS pgms?
Answer:
File Control Commands. Random, Sequential, forward and backward.
How will you access a VSAM file using an alternate index?
Answer:
Thru the path. Define path as an FCT and use normal File control commands.
How do you rollback data written to an ESDS file?
Answer:
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.
I have done a START BROWSE on a VSAM dataset.
Can I do another START BROWSE without doing an END BROWSE?
Answer:
No
Can you access QSAM (seq ) files from CICS ?
Answer:
Yes
What do we do by using CICS?
Answer:
CICS is normally used for Real-time or Online processing when that particular processing cannot wait for batch processing normally done at the end of the day for most installations.
What are the eight steps for a CICS program development?
Answer:
Get the complete specification
Get related sourcebooks and subprograms
Design the program
Update the CICS Tables
Code and compile the map definition
Code the program
Compile the program
Test the program.
In a CICS development, do you compile the map or program first?
Answer:
The map needs to be compiled first.
What is a transaction id or code?
Answer:
A transaction is mostly a four letter unique predefined unit of work, a terminal work will use to invoke a specific map and the associated program.
What is a PCT and how it is used?
Answer:
A PCT is a short name for Program Control Table, which contains the trans-id and the associated program which will be invoked when the trans-id is used.
What is a PPT and how it is used?
Answer:
A PPT contains a valid list of program names and it also indicates the storage address if the program has already been loaded.
CICS uses PPT to determine whether it will load a new copy of the program if the program is invoked.
Have you ever heard of SNT in CICS Processing?
Answer:
Yes, it contains the names of all valid users of the system.
What is the use of DFHCOMMAREA and where it is located?
Answer:
It helps to transfer data between two transactions and it is located in the LINKAGE SECTION.
Are you familiar with CEMT and CSMT functions? What does these transactions do for you?
Answer:
These are normally supervisory functions, where they can be used to cancel tasks running at a different terminals.
CSMT is used to update PPT. But I never had much chance to use them.
What transaction will you use to debug a CICS Program?
Answer:
CEDF, which means CICS Execution Diagnostic facility.
What XCTL and LINK command is used for?
Answer:
XCTL command transfers control to another program without setting up a return mechanism whereas the LINK command transfers control to next logical lower level with a return mechanism.
Why the EXEC CICS HANDLE command is used?
Answer:
It is used to specify what action the program needs to take when certain exceptional conditions occur.>
Why the EXEC CICS RETURN command is used?
Answer:
It is used simply to return control to CICS with no option and the terminal session ends.
What are the parameters will you use to code a SEND MAP command?
Answer:
SEND MAP(name of the map)
MAPSET(name of the mapset which contains the specific map)
FROM(specifies the symbolic map)
MAPONLY(specifies dataonly needs to be sent)
DATAONLY(specifies that only data from the symbolic map needs to be sent)
ERASE/ERASEUP
CURSOR
How do you terminate each CICS commands?
Answer:
EXEC CICS
intermediate commands
END-EXEC.
How do you obtain the storage dump from CICS?
Answer:
CICS automatically adds the storage dump to a special file called dump data set.
When the CICS is terminated, the dumps are automatically printed.
The DSN can be found from the respective installation personnel.
What is the meaning for AEI9 CICS abend?
Answer:
MAPFAIL.
What are the following entities represent?
Answer:
EIBAID It is an one character field that indicates which attention key was used for the last RECEIVE command.
EIBTRMID This field supplies the name of the terminal running the task.
EIBCALEN This field represents the length of the communication area passed to my program.
If no commarea is passed, it is set to zero.
How do you logoff from a CICS transaction?
Answer:
Blank the screen, then type CSSF LOGOFF.
Explain the differences between a Transaction and a Task.
Answer:
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.
Distinguish between Multitasking and Multi-threading.
Answer:
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.
What is the differences between operation of Pseudo-Conversational and a conversational program ?
Answer:
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.
What is a PROGRAM CONTROL TABLE (PCT) ?
Answer:
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.
What is a PROCESSING PROGRAM TABLE (PPT) ?
Answer:
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.
What is FILE CONTOL TABLE (FCT) ?
Answer:
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.
What are the the basic steps of a CICS program development ?
Answer:
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,...
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.
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.
Prepare the BMS mapset by coding the assembler language BMS macros or using mapset generator.
Code the program.
Coding the CICS programs involves writing of standard COBOL code with special CICS commands to invoke CICS services.
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.
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.
What is a BMS Map ?
Answer:
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 ,Symbolic Map
What is a Physical Map ?
Answer:
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.
What is a Symbolic Map ?
Answer:
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.
What is a Map Set ?
Answer:
A group of maps, which are link-edited together is called a Mapset.
What are the BMS Macros to generate Maps ?
Answer:
DFHMSD - Data Facility Hierarchical Map Set Definition. It is used to define a mapset
DFHMDI - Data Facility Hierarchical Map Definition Information. It is used to define a map.
DFHMDF - Data Facility Hierarchical Map Data Field. It is used to define a Field in the map.
What are the 3 working storage fields used for every field on the map?
What other fields are generated ? Answer:
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.
What is the IBM supplied Copybook, with all modifiable attribute bytes that can be used with symbolic maps ?
Answer:
DFHBMSCA
How do you place the cursor on the particular position on the screen (map)?
Answer:
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).
What is trigger level in the context of TDQs?
Answer:
For intrapartition TDQs specify the # records at which ATI happens.
Not applicable for extra partition TDQs.
How do you fire a batch job from a CICS txn ?
Answer:
Define an extrapartition TDQ as an internal reader and write the JCL to it.
Terminate the JCL with /*EOF.
What is ATI? What kind of TDQ can be used?
Answer:
Automatic Task Initiation. Intra partition TDQ.
Do you require a table entry for a TSQ?
Answer:
If recovery is needed.
Is there any entry for TSQs in CICS tables?
Answer:
Yes in the DFHTST.
What is the use of DCT?
Answer:
Destination Control Table used to define TDQs
What is the other way of terminating a transaction?
Answer:
EXEC CICS SYNCPOINT.
Assuming it is a LUW.
This will not end the Xn.