A Community of and for MVS Programmers













CICS Technical FAQ's

COBOL IMS VSAM
DB2 JCL CICS


Q 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.
Q 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.
Q What is 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.
Q What is a PROGRAM CONTROL TABLE (PCT) ?
A 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.
Q What is a PROCESSING PROGRAM TABLE (PPT) ?
A 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.
Q What is FILE CONTOL TABLE (FCT) ?
A 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.
Q What are the the basic steps of a CICS program development ?
A 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.
Q What is a BMS Map ?
A 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
Q What is a Physical Map ?
A 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.
Q What is a Symbolic Map ?
A 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.
Q What is a Map Set ?
A A group of maps, which are link-edited together is called a Mapset.
Q What are the BMS Macros to generate Maps ?
A 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.
Q 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.
Q What is the IBM supplied Copybook,with all modifiable attribute bytes that can be used with symbolic maps ?
A DFHBMSCA
Q 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).
Q What is MDT ?
A 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.
Q What is DFHCOMMAREA ?
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.
Q What is Execution Interface Block (EIB) ?
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.
Q What are the important tables used in the CICS-DB2 environment ?
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.
Q 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.
Q What is 2 phase commit ?
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.
Q What are ASRA,AICA,AEY9 abend ?
A ASRA - Any data exception problem SOC7, SOC4 etc
AICA - Runaway Task.
AEY9 - DB2/IDMS Database is not up.
Q What are the differences between TSQ and a TDQ ?
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.
Q 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
Q How is an Abend handled in 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.
Q 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.





Home | Help Boards | Contact Us | News | Top

2002, MVSFORUMS. All Rights Reserved.