CICS Tutorial $
CICS Tutorial $
CICS stands for Customer Information Control System. CICS was developed in
1968 by IBM in United States. CICS allow users to develop and execute online application in
an MVS environment. CICS has become the most commonly used server for Internet
applications.
CICS is a transaction processing system which is also called as Online Transaction Processing
(OLTP) Software. CICS is a data communication system that can support a network of many
hundreds of terminals.
Audience
This tutorial is designed for software programmers with a need to understand the CICS
concepts starting from scratch. This tutorial will give you enough understanding on CICS from
where you can take yourself to higher level of expertise.
Prerequisites
Before proceeding with this tutorial, you should have a basic understanding COBOL
programming skills. A basic knowledge of MVS and TSO/ISPF subsystem will help you in
understanding the CICS and move fast on the learning track.
CICS - Overview
CICS is a DB/DC system which is used in online applications. CICS was developed because
Batch operating system can execute only batch programs. CICS programs can be written in
COBOL, C, C++, Java, etc. These days, users want information within seconds. So as to
achieve this goal we need a system which can process information online. CICS allows users
to communicate with back-end system to get the desired information. Examples of online
programs are online banking system, flight reservation, etc. Following image shows how a all
the components are related to CICS:
Functions of CICS
The main functions performed by CICS in an application are as follows:
Features of CICS
The features of CICS are as follows:
● CICS is an operating system in itself as it manages its own processor storage, has its
own task manager which handles execution of multiple programs, provides its own file
management functions.
● CICS provides on-line environment in batch operating system. Jobs submitted are
executed immediately.
● CICS is a generalized transaction processing interface.
● It is possible to have 2 or more CICS regions at the same time as CICS runs as a batch
job in the operating system at the back-end.
CICS - Environment
CICS itself acts as an operating system. It's job is to provide an environment for online
execution of application programs. CICS runs in one region or partition or address space. CICS
handles scheduling for programs running under it. CICS runs as a batch job and we can view it
in the spool by issuing the command PREFIX CICS*. There are five major services which are
provided by CICS. All these services together perform a task.
Following are the services which we will be discussing in detail step by step:
● System Services
● Data Communication Services
● Data Handling Services
● Application Programming Services
● Monitoring Services
System Services
CICS maintains control functions to manage the allocation or de-allocation of resources with in
the system which are as follows:
● Task Control - Task control provides task scheduling and multitasking features. It takes
care of the status of all CICS tasks. Task Control allocates the processor time among
concurrent CICS tasks. This is called multitasking. CICS tries to prioritize the response
time to the most important task.
● Program Control - Program Control manages loading and releasing of application
programs. As soon as a task begins, it becomes necessary to associate the task with
the appropriate application program. Although many tasks may need to use the same
application program, CICS loads only one copy of the code into memory. Each task
threads its way through this code independently, so many users can all be running
transactions that are concurrently using the same physical copy of an application
program.
● Storage Control - Storage Control manages acquiring and releasing of main storage.
Storage control acquires, controls, and frees dynamic storage. Dynamic storage is used
for input/output areas, programs, etc.
● Interval Control - Interval Control offers timer services.
Monitoring Services
The fundamental explanation of Monitoring Services is as follows:
CRT Monitor
CRT monitor displays the output or the input fields of the application program. Following image
shows a 3278 Model of CRT monitor with following characteristics:
● Non-AID Keys - All other keys for alphabets, numeric, punctuation etc. are Non-Aid
keys. When the user types text, numbers etc. using non-aid keys CICS will not even
know if the user is typing anything or not.
● AID Keys - AID keys are known as Attention Identifier Keys. CICS can detect only AID
keys. After typing all the input, only when the user presses one of the AID keys, CICS
takes control. AID Keys : ENTER, PF1 to PF24, PA1 to PA3, CLEAR. AID keys are
further divided into two categories:
● PF Keys - PF keys are known as function keys. PF keys allows transfer of data from
terminal to CICS. PF Keys are ENTER and PF1 to PF24.
● PA Keys - PA keys are known as Program Access keys. PA keys does not allow
transfer of data between terminal and CICS. PA Keys are PA1 to PA3 and CLEAR.
Transaction
The fundamental explanation of Transaction is as follows:
Task
The fundamental explanation of Task is as follows:
LUW
The fundamental explanation of LUW is as follows:
Application
An application is a series of logically grouped programs to form several transaction which is
used to complete a specific task for the end user.
CICS - Nucleus
The five CICS system components described earlier are a convenient grouping of CICS system
programs, each of which performs its own specialized functions. The core portion of CICS
known as the CICS Nucleus consists of IBM-supplied CICS Control Programs and Control
Tables.
Control Programs
CICS nucleus is constructed by the control programs and corresponding control tables
provides unique advantages. It makes CICS system highly flexible and thus easy to maintain
also. Following are the important control programs of CICS:
TCP
The fundamental explanation of TCP is as follows:
KCP
The fundamental explanation of KCP is as follows:
FCP
The fundamental explanation of FCP is as follows:
SCP
The fundamental explanation of SCP is as follows:
Control Tables
CICS consists of IBM-supplied CICS control programs and tables. These tables need to be
updated accordingly with the application information for successful execution of CICS
application program. Following are the important Control Tables:
TCT
The fundamental explanation of TCT is as follows:
PCT
The fundamental explanation of PCT is as follows:
PPT
The fundamental explanation of PPT is as follows:
Transaction
When transaction identifier TP02 is entered on the CICS terminal, first it checks if there is a
program associated with this Transaction identifier in the PCT table. If it finds, then it checks in
the PPT table to find the location of Program to execute it. If the program is already available in
the memory it starts executing that particular program, if not, it loads the program to the
memory from secondary storage and then starts executing it.
Transaction Life Cycle
Transaction life cycle has the following steps:
Step 1
The terminal operator initiates the transaction by typing a 1 to 4 character transaction-id and
pressing the ENTER key.
Step 2
The TCP periodically checks all terminals for input. When a message is received it does the
following:
Step 3
The KCP takes control from the TCP and does the following:
Step 4
The PCP takes control from the KCP and does the following:
Step 5
The Application program takes control from the PCP and does the following:
● Requests the TCP to place the message into the program’s WORKING STORAGE
area.
● Requests the FCP to retrieve records from the files.
Step 6
The FCP takes control from the Application program and does the following:
Step 7
The KCP does the following:
Step 8
The FCP returns control to the Application program.
Step 9
The Application program does the following:
Step 10
The PCP returns control to KCP requesting it of end the task.
Step 11
The KCP instructs the SCP to free all the storage allocated to the task (except TIOA).
Step 12
The TCP does the following:
CICS - Transactions
CICS transactions are used to do multiple operations in CICS region. We will be discussing the
important CICS transactions supplied by IBM in detail.
CESN
The fundamental explanation of CESN is as follows:
CEMT
The fundamental explanation of CEMT is as follows:
Example
One can overwrite the status of the file displayed to change it. Following example shows how
to close a file:
CEMT
CECI
The fundamental explanation of CECI is as follows:
Example
Following example shows how to send mapped output data to terminal. We will be discussing
about MAPS in upcoming modules.
CEDF
The fundamental explanation of CEDF is as follows:
Example
Following example shows how to check details for a Abend code:
CMAC abend-code
CESF
The fundamental explanation of CESF is as follows:
Example
Following example shows how to log off from CICS region:
CESF LOGOFF
CEBR
The fundamental explanation of CEBR is as follows:
Example
Following example shows how to invoke CEBR command:
CEBR queue-id
CICS Concepts
Each command could be achieved by executing a series of CICS macros. We will discuss
some basic features which will help us to understand better:
Multitasking
This feature of operating system allows more than one task to be executed concurrently. The
task may be sharing the same program or using different programs. CICS schedules the task in
its own region.
Multi-threading
This feature of the operating system allows more than one task to be executed concurrently
sharing the same program. For multi-threading to be possible an application program should be
Re-entrant program under operating system or Quasi-reentrant under CICS.
Re-entrancy
A Re-entrant program is one which does not modify itself and can re-enter to itself and
continue processing after an interruption by the operating system.
Quasi-reentrancy
A Quasi-reentrant program is re-entrant program under CICS environment. CICS ensures
re-entrancy by acquiring a unique storage area for each task. Between CICS commands, CICS
has exclusive use of the CPU resource and executes other CICS commands of other task.
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.
CICS - COBOL
Basics
CICS programs are written in COBOL language in Mainframes. We will be discussing about
writing a simple COBOL-CICS program, compiling it and then executing it.
CICS Program
We will be writing a simple COBOL-CICS program which displays some message on CICS
output screen. This program is to demonstrate the steps involved in executing a COBOL-CICS
program. Following are the steps to code a simple program:
Step 1
Login to Mainframes and open a TSO Session.
Step 2
Create a new PDS in which we will be coding our program.
Step 3
Create a new member inside the PDS and code the following program:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 WS-MESSAGE PIC X(40).
01 WS-LENGTH PIC S9(4) COMP.
PROCEDURE DIVISION.
A000-MAIN-PARA.
MOVE 'Hello World' TO WS-MESSAGE
MOVE '+12' TO WS-LENGTH
EXEC CICS SEND TEXT
FROM (WS-MESSAGE)
LENGHT(WS-LENGTH)
END-EXEC
EXEC CICS RETURN
END-EXEC.
Step 4
After coding the program, we need to compile it. We can compile the program using following
JCL:
//SAMPLE JOB(TESTJCL,XXXXXX),CLASS=A,MSGCLASS=C
//CICSCOB EXEC CICSCOB,
// COPYLIB=ABC.XYZ.COPYLIB,
// LOADLIB=ABC.XYZ.LOADLIB
//LIB JCLLIB ORDER=CICSXXX.CICS.XXXPROC
//CPLSTP EXEC DFHEITVL
//TRN.SYSIN DD DSN=ABC.XYZ.PDS(HELLO),DISP=SHR
//LKED.SYSIN DD *
NAME HELLO(R)
//
Step 5
Open a CICS session.
Step 6
We will now install the program using the following command:
Program Compilation
Following image shows the steps used in compiling a COBOL-CICS program:
Translator
The function of translator is to checks for syntax errors in CICS commands. It translates them
into equivalent COBOL statements.
Compiler
The function of compiler is to expands COBOL copy books. It checks the source code for
syntax errors and compiles.
Linkage Editor
The function of Linkage Editor is to link different object modules to create a single load module.
CICS - BMS
BMS is known as Basic Mapping Support. An application consists of formatted screens which
are used for communication between terminal and CICS programs. For this communication we
use CICS terminal input/output services. We use BMS to create screen designs with proper
positions and attributes. Following are the functions of BMS:
Formatted Screen
The screen shown below is a Menu Screen and can be designed using BMS. Following are the
key points of below screen:
● The screen could have a Title, date and any other information that needs to be
displayed.
● The Option 1, 2 and 3 are the Unnamed fields which are the titles of the screen.
● In Selection field we need to provide input. This input is then sent to CICS program for
further processing.
● At the bottom of the screen Action keys are displayed.
● All the fields and the screen itself is defined with BMS macros. When the whole map is
defined, we can use JCL to assemble it. We will see learn more in the upcoming
modules.
BMS Basic Terms
Following are the basic terms which we will be using in upcoming modules:
Map
Map is a single screen format which can be designed using BMS macros. It can have name
from 1 to 7 chars.
Mapset
Mapset is a collection of maps which are linked edited together to form a load module. It should
have a PPT entry. It can have name from 1 to 7 chars.
BMS Macros
BMS map is a program which is written in Assembly language to manage screens. The three
macros that are used to define the screen are as follows:
DFHMSD
DFHMSD macro generates Mapset definition. It is macro identifier which shows that we are
starting a mapset. The mapset name is the load module name and an entry in PPT table must
be present. Following table shows the list of parameters which can be used in DFHMSD:
Parameter Description
LANG LANG=ASM/COBOL/PL1
It decides the language of the DSECT structure, for copying into the
application program.
STORAG If STORAGE=
E
AUTO - To acquire a separate symbolic map area for each mapset
BASE - To have the same storage base for the symbolic maps of from more
than one mapset
TIOAPFX TIOAPFX=YES/NO
YES - To reserve the prefix space (12 bytes) for BMS commands to access
TIOA properly. Required for the CICS command level.
Example
DFHMDI
DFHMDI macro generates map definition. It shows that we are starting a new map. Mapname
is followed by the DFHMDI macro. Mapname is used to send or recieve map. Following table
shows the parameters which we use inside DFHMDI macro:
Parameter Description
SIZE SIZE=(Line,Column)
This parameter gives the size of the map. BMS allows us to build a screen
using several maps, and this parameter becomes important when we are
using more than one maps in a single mapset.
JUSTIFY It is used to specify the entire map or the map fields to be left or right
justified.
YES - To reserve the prefix space (12 bytes) for BMS commands to access
TIOA properly. Required for the CICS command level.
Example
DFHMDF
DFHMDF macro is used to define field names. The field name is mentioned against which
DFHMDF macro is coded. This field name is used inside the program. We do not write field
name against constant field which we do not want to use inside the program. Below table
shows the list of parameters which can be used inside DFHMDF macro:
Parameter Description
POS This is the position on the screen where the field should appear. A field starts
with its attribute byte, so if you code POS=(1,1), the attribute byte for that
field is on line 1 in column 1, and the actual data starts in column 2.
LENGTH This is the length of the field, not counting the attribute byte.
INITIAL This is the character data for an output field. We use this to specify labels
and titles for the screen and keep them independent of the program. For the
first field in the menu screen, for example, we will code: INITIAL='MENU'.
JUSTIFY It is used to specify the entire map or the map fields to be left or right
justified.
ASKIP - Autoskip. Data cannot be entered in this field. The cursor skips to
the next field.
PROT - Protected field. Data cannot be entered into this field. If data is
entered, it will cause the input-inhibit status.
UNPROT - Unprotected field. Data can be entered and this is used for all
input fields.
NUM - Numeric field. Only numbers (0 to 9) and special characters('.' and '-')
are allowed.
FSET - Field set. MDT is set on so that the field data is to be sent from the
terminal to the host computer regardless of whether the field is actually
modified by the user.
PICIN PICIN applies to the data field which is used as input like PICIN = 9(8).
PICOUT PICIN applies to the data field which is used as output like PICOUT = Z(8).
Example
DFHMDF POS=(01,01), X
LENGTH=7, X
INITIAL=‘SCREEN1’, X
ATTRB=(PROT,NORM)
STDID DFHMDF POS=(01,70), X
LENGTH=08, X
ATTRB=(PROT,NORM)
CICS - MAP
BMS receives the data entered by the user and then it formats it into symbolic map area. The
application program has access only to data present in symbolic map. Application program
process the data and the output is sent to symbolic map. BMS will merge the output of
symbolic data with physical map.
Physical Map
The fundamental explanation of physical map is as follows:
● Physical Map is a load module in the load library which contains information about how
the map should be displayed.
● It contains the details about the attributes of all the fields in the map and their positions.
● It contains the display format of the map for given terminal.
● It is coded using BMS macros. It is assembled separately and link edited into the CICS
library.
Symbolic Map
The fundamental explanation of symbolic map is as follows:
● A Symbolic Map is a Copy book in the library, the Copy book is then used by CICS
application program to send and receive the data from terminal.
● It contains all variable data which is copied into program's WORKING-STORAGE
section.
● It has all the named fields. Application programmer uses these fields to read and write
data into the map.
Stopper Field
If we place a stopper field after the named unprotected field then while entering the value, once
the specified length is reached the cursor will stop its positioning. Following example shows
adding how to add a stopper field:
Attribute Byte
The attribute byte of any field stores information about the physical properties of the field. The
below diagram and the table explains the significance of each bit.
01 - Unprotected Numeric
10 - Protected Stop
11 - Protected Skip
01 - Normal
10 - Bright
11 - No-display ( Dark )
Send Map
The send map command writes formatted output to terminal. It is used to send the map to the
terminal from the application program. Following syntax shows how to send a map to terminal:
Following table shows description of parameters which are used in send map command:
Parameter Description
Map-name It is the name of the map which we want to send and is mandatory.
Mapset-na It is the name of the map set that contains the mapname. The mapset name
me is needed unless it is the same as the map name.
FROM It is used if we have decided to use a different DSECT name, we must use
the option FROM (dsect-name) along with SEND MAP command.
MAPONLY It means that no data from your program is to be merged into the map and
only the information in the map is transmitted.
DATAONLY It is the logical opposite of MAPONLY. We use it to modify the variable data
in a display that has already been created. Only the data from your program
is sent to the screen. The constants in the map are not sent.
ERASE It causes the entire screen to be erased before what we are sending is
shown.
FRSET Flag Reset turns off the modified data tag in the attribute byte for all the
fields on the screen before what you are sending is placed there.
CURSOR It can be used to position the cursor on the terminal screen. Cursor can be
set by moving -1 to the L part of the field and then sending the map.
FREEKB The keyboard is unlocked if we specify FREEKB in either the map or the
SEND command.
FORMFEE It causes the printer to restore the paper to the top of the next page before
D the output is printed.
Receive Map
When we want to receive input from a terminal, we use the RECEIVE MAP command. The
MAP and MAPSET parameters have exactly the same meaning as for the SEND MAP
command. Following syntax shows how to receive a map:
Mapset Execution
Following steps shows development and execution of mapset:
CICS - Interface
Block
Application program needs an interface to CICS. EIB is known as Execute Interface Block
which contains the useful information required during execution of program.
● File I/O statements like Open, Read, Write, Rewrite, Close, Delete and Start. All file I/O
in CICS is handled by the file control module and they have their own set of statements
like READ, WRITE, REWRITE and DELETE which we will be discussing in upcoming
modules.
● File Section and Environment Division is not required.
● COBOL statements that invoke operating system functions like Accept, Date/Time
cannot be used.
● Do not use DISPLAY, MERGE, STOP RUN and GO BACK.
● Execute Interface Block is a control block which is loaded automatically by CICS for
every program.
● The EIB is unique to a task and it exists for the duration of task. It contains a set of
system related information corresponding to the task.
● EIB contains information about transaction identifier, time, date, etc which is used by
CICS during execution of application program.
● Every program that executes as part of the task has access to the same EIB.
● The data in EIB at run time can be viewed by executing the program in CEDF mode.
EIB Fields
Following table shows the lists of fields which are present in EIB:
Example
Following example shows a non conversion program which is simply displaying "HELLO
WORLD" on CICS terminal as output:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-MESSAGE PIC X(30).
PROCEDURE DIVISION.
********************************************************
* SENDING DATA TO SCREEN *
********************************************************
MOVE 'HELLO WORLD' TO WS-MESSAGE
EXEC CICS SEND TEXT
FROM (WS-MESSAGE)
END-EXEC
********************************************************
* TASK TERMINATES WITHOUT ANY INTERACTION FROM THE USER*
********************************************************
EXEC CICS RETURN
END-EXEC.
Conversion Program
Sending a message to the terminal and receiving a response from the user is called a
conversation. An online application achieves a conversation between user and application
program by a pair of SEND and RECEIVE command. The key points of conversion program
are as follows:
● The system sends a message to the screen and waits for the user’s response.
● The time taken by user to respond is known as Think Time. This time is considerably
high, so this is a major drawback of conversion programs.
● The user provides the necessary input and presses a AID key.
● The application processes the user’s input and sends the output.
● The program is loaded into the main storage at the beginning and is retained till the task
ends.
Example
Following example shows a conversion program which is taking input from user and then
simply displaying the same input on CICS terminal as output:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-MESSAGE PIC X(30) VALUE SPACES.
PROCEDURE DIVISION.
MOVE 'ENTER MESSAGE' TO WS-MESSAGE
********************************************************
* SENDING DATA FROM PROGRAM TO SCREEN *
********************************************************
EXEC CICS SEND TEXT
FROM (WS-MESSAGE)
END-EXEC
********************************************************
* GETTING INPUT FROM USER *
********************************************************
EXEC CICS RECEIVE
INTO(WS-MESSAGE)
END-EXEC
EXEC CICS SEND TEXT
FROM (WS-MESSAGE)
END-EXEC
********************************************************
* COMMAND TO TERMINATE THE TRANSACTION *
********************************************************
EXEC CICS RETURN
END-EXEC.
CICS - Pseudo
Programming
As of now, we have covered Non-conversion and conversion programs. Conversion programs
have major drawback as the think time is considerably high. So due to this pseudo conversion
programming came into the picture. We will now discuss more about pseudo conversion
programs.
● The system sends a message to the screen and terminates the transaction, specifying
the transaction to be started when the user input is received.
● The system allocates the resources used by this transaction to other transactions
running in the system. So we can utilize the resources in pseudo conversion program till
the user gives the input.
● The system polls the terminal input at regular intervals of time. When the input is
received, it is processed and the output is displayed.
● The application program is loaded into the main storage when needed and released
when not in use.
DFHCOMMAREA
The fundamental explanation of DFHCOMMAREA is as follows:
Example
After sending the map, the task ends and waits for user response. At this stage the data needs
to be saved, because though the task has ended, the transaction has not. When this
transaction is to be resumed it would require the prior status of the task. User enters the input.
This now has to be received by the RECEIVE MAP command and then validated. Following
example shows how to declare COMMAREA and DFHCOMMAREA:
WORKING-STORAGE SECTION.
01 WS-COMMAREA.
05 WS-DATA PIC X(10).
LINKAGE SECTION.
01 DFHCOMMAREA.
05 LK-DATA PIC X(10).
Pseudo Code
Following is the logic of pseudo code which we use in pseudo programming:
Example
******************************************************************
* PROGRAM TO DEMONSTRATE PSEUDO-CONVERSATION *
******************************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-MESSAGE PIC X(30).
01 WS-COMMAREA PIC X(10) VALUE SPACES.
LINKAGE SECTION.
01 DFHCOMMAREA PIC X(10).
PROCEDURE DIVISION.
MOVE DFHCOMMAREA TO WS-COMMAREA
IF WS-COMMAREA = SPACES
******************************************************************
* TRANSACTION GETTING EXECUTED FOR THE FIRST TIME *
******************************************************************
MOVE 'HELLO' TO WS-MESSAGE
EXEC CICS SEND TEXT
FROM (WS-MESSAGE)
END-EXEC
MOVE 'FIRST' TO WS-COMMAREA
******************************************************************
* TASK ENDS AS A RESULT OF RETURN. IF AID KEY PRESSED, NEXT *
* TRANSACTION SHOULD BE TP002. DATA PASSED FROM WS-COMMAREA TO *
* DFHCOMMAREA *
******************************************************************
EXEC CICS RETURN
TRANSID('TP002')
COMMAREA(WS-COMMAREA)
END-EXEC
******************************************************************
* IF COMMAREA IS NOT EMPTY , THEN TP002 HAS BEEN EXECUTED ONCE *
* ALREADY, USER INTERACTION IS FACILITATED BY RECEIVE *
******************************************************************
ELSE
EXEC CICS RECEIVE
INTO(WS-MESSAGE)
END-EXEC
EXEC CICS SEND TEXT
FROM (WS-MESSAGE)
END-EXEC
******************************************************************
* TASK ENDS AS A RESULT OF RETURN, NO NEXT TRANSACTION SPECIFIED *
* TO BE EXECUTED *
******************************************************************
EXEC CICS RETURN
END-EXEC
END-IF.
● The resources are best utilized. Resources are released as soon as the program is
suspended temporarily.
● It looks as if it is in conversational mode.
● It has better response time.
Return Statements
Following are the two types of return statements which are used in CICS:
Return-1
When the below unconditional return statement is issued the task and transaction (program) is
terminated.
Return-2
When the below conditional return i.e return with TRANSID statement is issued, the control
returns to CICS with the next transid to be executed. The next transaction, starts when the user
presses an AID key.
DFHAID
DFHAID is a copybook which is used in application programs to include CICS pre-coded set of
variable. Following content is present in the DFHAID copybook:
01 DFHAID.
02 DFHNULL PIC X VALUE IS ' '.
02 DFHENTER PIC X VALUE IS ''''.
02 DFHCLEAR PIC X VALUE IS '_'.
02 DFHCLRP PIC X VALUE IS '¦'.
02 DFHPEN PIC X VALUE IS '='.
02 DFHOPID PIC X VALUE IS 'W'.
02 DFHMSRE PIC X VALUE IS 'X'.
02 DFHSTRF PIC X VALUE IS 'h'.
02 DFHTRIG PIC X VALUE IS '"'.
02 DFHPA1 PIC X VALUE IS '%'.
02 DFHPA2 PIC X VALUE IS '>'.
02 DFHPA3 PIC X VALUE IS ','.
02 DFHPF1 PIC X VALUE IS '1'.
02 DFHPF2 PIC X VALUE IS '2'.
02 DFHPF3 PIC X VALUE IS '3'.
02 DFHPF4 PIC X VALUE IS '4'.
02 DFHPF5 PIC X VALUE IS '5'.
02 DFHPF6 PIC X VALUE IS '6'.
02 DFHPF7 PIC X VALUE IS '7'.
02 DFHPF8 PIC X VALUE IS '8'.
02 DFHPF9 PIC X VALUE IS '9'.
02 DFHPF10 PIC X VALUE IS ':'.
02 DFHPF11 PIC X VALUE IS '#'.
02 DFHPF12 PIC X VALUE IS '@'.
02 DFHPF13 PIC X VALUE IS 'A'.
02 DFHPF14 PIC X VALUE IS 'B'.
02 DFHPF15 PIC X VALUE IS 'C'.
02 DFHPF16 PIC X VALUE IS 'D'.
02 DFHPF17 PIC X VALUE IS 'E'.
02 DFHPF18 PIC X VALUE IS 'F'.
02 DFHPF19 PIC X VALUE IS 'G'.
02 DFHPF20 PIC X VALUE IS 'H'.
02 DFHPF21 PIC X VALUE IS 'I'.
02 DFHPF22 PIC X VALUE IS '¢'.
02 DFHPF23 PIC X VALUE IS '.'.
02 DFHPF24 PIC X VALUE IS '<'.
Example
Following example shows how to use DFHAID copybook in application program:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY DFHAID.
PROCEDURE DIVISION.
A000-AIDKEY-PARA.
EVALUATE EIBAID
WHEN DFHAID
PERFORM A000-PROCES-PARA
WHEN DFHPF1
PERFORM A001-HELP-PARA
WHEN DFHPF3
PERFORM A001-EXIT-PARA
END-EVALUATE.
Cursor Positioning
There are two ways to override the position specified in the map definition.
● One way is to specify the screen position relative to line and column number in the
CURSOR option on the send map command.
● Other way is to move -1 to symbolic map variable suffixed with L. Then, send the map
with a CURSOR option in SEND MAP.
Example
Following example shows how to override the cursor position for the NAME field:
MOVE -1 TO NAMEL
EXEC CICS SEND
MAP ('map-name')
MAPSET ('name-field')
ERASE
FREEKB
CURSOR
END-EXEC.
Dynamically Modifying Attributes
While sending a map, if we want to have different attributes for a field other than specified in
the map, then we can override that by setting the field in the program. Following is the
explanation to override attributes of a field:
01 CICS-ATTRIBUTES.
05 ATTR-UXN PIC X(01) VALUE SPACE.
05 ATTR-UXMN PIC X(01) VALUE 'A'.
05 ATTR-UXNL PIC X(01) VALUE 'D'.
05 ATTR-UXMNL PIC X(01) VALUE 'E'.
05 ATTR-UXBL PIC X(01) VALUE 'H'.
05 ATTR-UXMBL PIC X(01) VALUE 'I'.
05 ATTR-UXD PIC X(01) VALUE '<'.
05 ATTR-UXMD PIC X(01) VALUE '('.
05 ATTR-U9N PIC X(01) VALUE '&'.
05 ATTR-U9MN PIC X(01) VALUE 'J'.
05 ATTR-U9NL PIC X(01) VALUE 'M'.
05 ATTR-U9MNL PIC X(01) VALUE 'N'.
05 ATTR-U9BL PIC X(01) VALUE 'Q'.
05 ATTR-U9MBL PIC X(01) VALUE 'R'.
05 ATTR-U9D PIC X(01) VALUE '*'.
05 ATTR-U9MD PIC X(01) VALUE ')'.
05 ATTR-PXN PIC X(01) VALUE '-'.
05 ATTR-PXMN PIC X(01) VALUE '/'.
05 ATTR-PXNL PIC X(01) VALUE 'U'.
05 ATTR-PXMNL PIC X(01) VALUE 'V'.
05 ATTR-PXBL PIC X(01) VALUE 'Y'.
05 ATTR-PXMBL PIC X(01) VALUE 'Z'.
05 ATTR-PXD PIC X(01) VALUE '%'.
05 ATTR-PSN PIC X(01) VALUE '0'.
05 ATTR-PSMN PIC X(01) VALUE '1'.
05 ATTR-PSNL PIC X(01) VALUE '4'.
05 ATTR-PSMNL PIC X(01) VALUE '5'.
05 ATTR-PSBL PIC X(01) VALUE '8'.
05 ATTR-PSMBL PIC X(01) VALUE '9'.
05 ATTR-PSD PIC X(01) VALUE '@'.
05 ATTR-PSMD PIC X(01) VALUE "'".
CICS - File
Handling
CICS allows us to access file data in many ways. Most file accesses are random in online
system as the transactions to be processed are not batched and sorted into any kind of order.
Therefore CICS supports the usual direct access methods: VSAM and DAM (Direct Access
Method). It also allows us to access data using database managers.
RANDOM ACCESS
Following are the commands which are used for random processing:
● READ
● WRITE
● REWRITE
● DELETE
Read
READ command reads data from a file using primary key. Following is the syntax of READ
command:
Parameter Description
FILE File name is the name of the file which we want to read. This is the CICS
symbolic file name which identifies the FCT entry for the file. File names
can be up to 8 characters long and should be enclosed in quotes if they
are literals.
INTO Data area is the variable into which the record is to be read, usually a
structure in working storage. The INTO is required for the uses of the
READ command.
RIDFLD It has the name of the data area containing the key of the record which we
want to read.
LENGTH It specifies the maximum number of characters that may be read into the
data area specified. It must be a halfword binary value (PIC S9(4) COMP).
After the READ command is completed, CICS replaces the maximum
value we specify with the true length of the record. For this reason, we
must specify LENGTH as the name of a data area rather than a literal and
must re-initialize this data area if we use it for LENGTH more than once in
the program. An longer record will raise an error condition.
Example
Following is example for reading a record from 'FL001' file where Student-id is the primary key:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-STD-REC-LEN PIC S9(4) COMP.
01 WS-STD-KEY-LEN PIC S9(4) COMP.
01 WS-STD-REC-KEY PIC 9(3).
01 WS-STD-REC PIC X(70).
PROCEDURE DIVISION.
MOVE +70 TO WS-STD-REC-LEN.
MOVE ‘100’ TO WS-STD-REC-KEY.
MOVE 3 TO WS-STD-KEY-LEN.
EXEC CICS READ
FILE ('FL001')
INTO (WS-STD-REC)
LENGTH (WS-STD-REC-LEN)
RIDFLD (WS-STD-REC-KEY)
KEYLENGTH (WS-STD-KEY-LEN)
END-EXEC.
● GENERIC - It is used when we does not know the complete key value. For example, we
want a record whose primary key starts with ‘10’ and the rest of the key can be
anything. Although the key length is 3 characters, we are mentioning only 2. It is
important to mention the key-length which gives the length for which it needs to do the
matching. The first record that satisfies the criteria will get picked up.
● UPDATE - It specifies that we intend to update the record in the current transaction.
Specifying UPDATE gives your transaction exclusive control of the requested record. It
should be used when we want to rewrite the record.
● EQUAL - It specifies that we want only the record whose key exactly matches that
specified by RIDFLD.
● GTEQ - It specifies that we want the first record whose key is greater than or equal to
the key specified.
Exception Description
NOTFND Record that is being searched does not exist in the dataset.
LENGERR Mismatch between the length specified in command and actual length
of the record.
NOTAUTH If the user does not have enough permissions to use the file.
DUPKEY If more than 1 record satisfy the condition on the alternate key.
Write
Write command is used to add new records to a file. The parameters used in Write command
are same as we described before. Data is picked from the data area mentioned in FROM
clause. Following is the syntax for Write command:
EXEC CICS WRITE
FILE(name)
FROM(data-area)
RIDFLD(data-area)
LENGTH(data-value)
KEYLENGTH(data-value)
END-EXEC.
Example
Following is the example to write a record in 'FL001' file where Student-id is the primary key
and a new record with 101 student id will be written in the file:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-STD-REC-LEN PIC S9(4) COMP.
01 WS-STD-KEY-LEN PIC S9(4) COMP.
01 WS-STD-REC-KEY PIC 9(3).
01 WS-STD-REC PIC X(70).
PROCEDURE DIVISION.
MOVE +70 TO WS-STD-REC-LEN.
MOVE ‘101’ TO WS-STD-REC-KEY.
MOVE 3 TO WS-STD-KEY-LEN.
MOVE '101Mohtahim M TutorialsPoint' TO WS-STD-REC.
EXEC CICS WRITE
FILE ('FL001')
FROM (WS-STD-REC)
LENGTH (WS-STD-REC-LEN)
RIDFLD (WS-STD-REC-KEY)
KEYLENGTH (WS-STD-KEY-LEN)
END-EXEC.
Exception Description
LENGERR Mismatch between the length specified in command and actual length
of the record.
NOTAUTH If the user does not have enough permissions to use the file.
DUPKEY If more than 1 record satisfy the condition on the alternate key.
Rewrite
REWRITE command is used to modify a record that is already present in a file. Prior to this
command the record must be read with a READ UPDATE command. The parameters are
same as described before. Following is the syntax for Rewrite command:
Example
Following is the example to write a record in 'FL001' file where Student-id is the primary key
and a new record with 101 student id will be written in the file:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-STD-REC-LEN PIC S9(4) COMP.
01 WS-STD-KEY-LEN PIC S9(4) COMP.
01 WS-STD-REC-KEY PIC 9(3).
01 WS-STD-REC PIC X(70).
PROCEDURE DIVISION.
MOVE +70 TO WS-STD-REC-LEN.
MOVE ‘101’ TO WS-STD-REC-KEY.
MOVE 3 TO WS-STD-KEY-LEN.
EXEC CICS READ
FILE ('FL001')
INTO (WS-STD-REC)
LENGTH (WS-STD-REC-LEN)
RIDFLD (WS-STD-REC-KEY)
KEYLENGTH (WS-STD-KEY-LEN)
UPDATE
END-EXEC.
MOVE '100Mohtahim M TutorialsPnt' TO WS-STD-REC.
EXEC CICS REWRITE
FILE ('FL001')
FROM (WS-STD-REC)
LENGTH (WS-STD-REC-LEN)
END-EXEC.
Exception Description
LENGER Mismatch between the length specified in command and actual length of the
R record.
NOTAUT If the user does not have enough permissions to use the file.
H
Delete
DELETE command is used to delete a record that is present in a file. Prior to this command the
record must be read with a READ UPDATE command. The parameters are same as described
before. Following is the syntax for Delete command:
Following is the syntax to delete a record directly without reading it with Update option:
Example
Following is the example for Group Delete. This can be done using Generic option, where all
the records that satisfy the generic criteria will be deleted. NUMREC will hold the number of
records deleted. The field mentioned here should be a S9(4) comp.
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-STD-REC-LEN PIC S9(4) COMP.
01 WS-STD-KEY-LEN PIC S9(4) COMP.
01 WS-STD-REC-KEY PIC 9(3).
01 WS-STD-REC PIC X(70).
01 WS-NUM-REC-DEL PIC S9(4).
PROCEDURE DIVISION.
MOVE '11' TO WS-STD-REC-KEY.
MOVE 2 TO WS-STD-KEY-LEN.
EXEC CICS READ
FILE ('FL001')
RIDFLD (WS-STD-REC-KEY)
KEYLENGTH (WS-STD-KEY-LEN)
GENERIC
NUMREC (WS-NUM-REC-DEL)
END-EXEC.
Exception Description
NOTFND Record that is being searched doesn't exist in the dataset (DELETE
with RIDFLD).
NOTAUTH If the user does not have enough permissions to use the file.
SEQUENTIAL ACCESS
Following are the commands which are used for sequential processing:
● STARTBR
● READNEXT / READPREV
● RESETBR
● ENDBR
STARTBR
The fundamental explanation of STARTBR is as follows:
Syntax
Following is the syntax of STARTBR command:
READNEXT / READPREV
The fundamental explanation of READNEXT / READPREV is as follows:
● When we issue a STARTBR command, it does not make the records available. It just
tells from where to start reading the file. To get the first record and sequence after that,
we need to use the READNEXT command.
● The FILE, INTO and LENGTH parameters are defined in the same way as they are in
the READ command. We only need the FILE parameter because CICS allows us to
browse several files at once and this tells which one we want to read next.
● RIDFLD points to a data area into which CICS will "feed back" the key of the record it
just read.
● The READPREV command is almost like READNEXT, except that it lets us proceed
backward through a data set instead of forward.
Syntax
Following is the syntax of READNEXT / READPREV command:
RESETBR
RESETBR command allows us to reset our starting point in the middle of a browse. It
establishes a new browsing point.
Syntax
Following is the syntax of RESETBR command:
ENDBR
When we have finished reading a file sequentially, we terminate the browse using ENDBR
command. It tells CICS that browse is being terminated.
Syntax
Following is the syntax of ENDBR command:
EXEC CICS ENDBR
FILE ('name')
END-EXEC.
CICS - Error
Handling
There are many types of abends and errors which one can face while using CICS application.
Errors can be because of both hardware of software issues. We will be discussing about errors
and error handling in this module.
CICS Errors
Following are the CICS errors which can arise during execution of CICS applications:
● Some expected CICS errors arises when the conditions are not normal in CICS system.
For example, if we are reading a particular record and record is not found then we get
"Not Found" error. Mapfail is a similar error. Errors in this category are handled by
explicit logic in the program.
● Logical errors arises because of some reasons like division by zero, illegal character in
numeric field or transaction id error.
● Errors that are related to hardware or other system conditions are beyond the control of
an application program. For example, getting input/output error while accessing a file.
Error Handling Commands
CICS provides several mechanisms to identify the errors and to handle them in our programs.
Following are the commands which are used to handle the expected CICS errors:
● Handle condition
● Handle Abend
● Abend
● Ignore Condition
● Nohandle
Handle Condition
Handle condition is used to transfer the control of program to a paragraph or a procedure label.
If the condition name specified in the exception block arises the particular para will be given
control and then we can handle that condition. HANDLE CONDITION can handle only
conditions related to CICS not the ordinary program Abends like as data exceptions. It can
handle conditions that are related only to CICS. It can not handle the ordinary program Abends
like as data exceptions. Following it the syntax of Handle Condition:
Example
Following is the example of Handle condition:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
PROCEDURE DIVISION.
EXEC CICS HANDLE CONDITION
DUPKEY(X0000-DUPKEY-ERR-PARA)
NOTFND(X000-NOT-FOUND-PARA)
ERROR(X0000-GEN-ERR-PARA)
END-EXEC.
X0000-DUPKEY-ERR-PARA.
DISPALY 'Duplicate Key Found'.
X0000-NOT-FOUND-PARA.
DISPLAY 'Record Not Found'.
X0000-GEN-ERR-PARA.
DISPLAY 'General Error'.
Handle Abend
If a program abends due to some reasons like input-output error, etc, then it can be handled
using Handle Abend CICS command. Following is the syntax of Handle Abend command:
Program name or label name is used to transfer the control to the program or paragraph if
abend occurs. CANCEL is used to cancel previous HANDLE CONDITIONS. RESET is used to
re activate the previously cancelled HANDLE ABEND.
Example
Following is the example of Handle Abend:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
PROCEDURE DIVISION.
EXEC CICS HANDLE ABEND
LABEL (X0000-HANDLE-ABEND-PARA)
END-EXEC.
X0000-HANDLE-ABEND-PARA.
DISPLAY 'Program Abended'.
Abend
Abend command is use to terminate the task intentionally. Using Abend command we can set a
user defined abend code. Following is the syntax of Abend command:
Example
Following is the example of Abend command. It will abend when the program reaches this
paragraph with the user defined abend code, like in below example it will abend with abend
code D100:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
PROCEDURE DIVISION.
EXEC CICS ABEND
ABCODE(D100)
END-EXEC.
Ignore Condition
Ignore condition is used when we want no action should be taken if a particular abend or error
happens which is mentioned inside the Ignore Condition. Following is the syntax of Ignore
Condition:
Example
Following is the example of Ignore Condition. It will not abend the program even if program
throws length error as we have mentioned LENGERR inside Ignore condition.
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
PROCEDURE DIVISION.
EXEC CICS IGNORE CONDITION
LENGERR
END-EXEC.
Nohandle
Nohandle can be specified for any CICS command . This will cause no action to be taken for
any exceptional conditions that may occur during the execution of the CICS command. This
command temporarily deactivates all the other handle conditions. If an exception arises during
execution of the command the control will be transferred to the next statement after the
Command. It can be used with Read, Write, Delete, etc. Following is the syntax of Nohandle:
EXEC CICS
program statements
NOHANDLE
END-EXEC.
Example
Following is the example of Nohandle command. We are using it with a Read statement. If
Read statement fails, it will not abend the program.
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
PROCEDURE DIVISION.
EXEC CICS READ
FILE('FILE1')
INTO(WS-FILE-REC)
RIDFLD(WS-STDID)
NOHANDLE
END-EXEC.
CICS - Control
Operations
CICS Program Control Program (PCP) manages the flow of application programs. All the
application programs must have an entry in the Processing Program Table. Following are the
commands which are used for program control services:
● XCTL
● Link
● Load
● Release
● Return
● XCTL command is used to pass the control from one program to another at same level.
● It does not expect the control back.
● It is similar to GO TO statement.
● A XCTL program can be a pseudo-conversational.
Example
Following is the example of XCTL command to pass control to another program:
IDENTIFICATION DIVISION.
PROGRAM-ID. PROG1.
WORKING-STORAGE SECTION.
01 WS-COMMAREA PIC X(100).
PROCEDURE DIVISION.
EXEC CICS XCTL
PROGRAM ('PROG2')
COMMAREA (WS-COMMAREA)
LENGTH (100)
END-EXEC.
This command transfers the control to be passed to program 'PROG2' with 100 bytes of data.
COMMAREA is an optional parameter and is the name of the area containing the data to be
passed or the area to which results are to be returned.
Link
The fundamental explanation of Link is as follows:
● Link command is used to transfer the control to another program at lower level.
● It expects the control back.
● It is similar to perform and control will be passed back to the instruction following this.
● A Linked program can not be pseudo-conversational.
Example
Following is the example of Link command to pass control to another program:
IDENTIFICATION DIVISION.
PROGRAM-ID. PROG1.
WORKING-STORAGE SECTION.
01 WS-COMMAREA PIC X(100).
PROCEDURE DIVISION.
EXEC CICS LINK
PROGRAM ('PROG2')
COMMAREA (WS-COMMAREA)
LENGTH (100)
END-EXEC.
Load
Load command is used to load a program or a table. Following is the syntax of Load command:
EXEC CICS LOAD
PROGRAM ('name')
END-EXEC.
Release
Release command is used to release a program or a table. Following is the syntax of Release
command:
Return
Return command is used to return the control to next higher logical level. Following is the
syntax of Return command:
ASKTIME
ASKTIME is used to request for current time and date or time stamp. We then move this value
to working storage variable inside the program. Following is the syntax of ASKTIME command:
CICS - Temporary
Storage
There are different scratch pads which are available in CICS for saving data or to transfer the
data between transactions. There are five storage areas which are provided by CICS, which we
will be discussing in this module.
COMMAREA
The fundamental explanation of COMMAREA is as follows:
● The COMMAREA behaves like a scratch pad that can be used to pass data from one
program to another program either within the same transaction or from different
transactions.
● It should be defined in the LINKAGE SECTION using DFHCOMMAREA name.
● Any transaction in the CICS region can access Common Work Area and hence the
format and use of it must be agreed upon by all transactions in the system that decides
to use it.
● There is only one CWA in the entire CICS region.
● Transaction Work Area is used to pass data between the application programs that are
executed with in the same transaction.
● TWA exists only for the duration of transaction.
● Its size is defined in the Program Control Table.
WRITEQ TS
This command is used to add items to an existing TSQ. Also, we can create a new TSQ using
this command. Following is the syntax of WRITEQ TS command:
READQ TS
This command is used read the Temporary Storage Queue. Following is the syntax of READQ
TS:
DELETEQ TS
This command is used delete the Temporary Storage Queue. Following is the syntax of
DELETEQ TS:
● Transient Data Queue is transient in nature as it can be created and deleted quickly.
● It allows only sequential access.
● The contents of the queue can be read only once as it gets destroyed once a read is
performed and hence the name Transient.
● It cannot be updated.
● It requires an entry in DCT.
WRITEQ TD
This command is used to write Transient data queues and they are always written to a file.
Following is the syntax of WRITEQ TD command:
DELETEQ TD
This command is used delete the Transient data queue. Following is the syntax of DELETEQ
TD:
CICS -
Intercommunication
The mutual communication between two or more systems is known as Intercommunication.
Benefits of Intercommunication
The important benefits of Intercommunication are as follows:
Basic Terminologies
One must have the knowledge of basic terminologies used in the CICS system. Following are
the basic terms:
Local System
A local system is a system that initiates a request for intercommunication.
Local Resource
A local resource is a resource that lies on the local system.
Remote System
A remote system is a system that is initiated as a result of an intercommunication request.
Remote Resource
A remote resource is a resource that lies on the remote system.
MVS Sysplex
MVS Sysplex is a configuration of multiple MVS operating systems. They works as a single
system by sharing functions and programs.
CICSPlex
CICSPlex is commonly described as a set of interconnected CICS regions that process
customer workload. A CICSPlex is set of interconnected CICS regions that own Terminals,
Applications, Resources, etc.
Intercommunication Methods
There are two ways in which CICS can communicate with other systems:
● MRO - Multi Region Operation is used when two CICS regions within the same
MVSPLEX needs to communicate with each other.
● ISC - Inter System Communication is used when a CICS region in a LOCAL server has
to communicate with a CICS region in the REMOTE server.
CICS - Status
Codes
While working with CICS you may encounter abends. Following are the common abend codes
with their description which will help you to resolve the issues:
Code Description
CICS - Interview
Questions
Q: What’s the CICS command used to access current date and time?
A: For Skipper field use ASKIP and for stopper field use PROT.
Q: How do you set the MDT option to ‘ON’ status, even if data is not entered?
A: Mention FSET option in DFHMDF or set it dynamically in the program using FIELD+A
attribute field.
Q: Which CICS service transaction is used to gain accessibility to CICS control tables?
Q: What is a mapset?
A: Mapset is a collection of maps which are linked edited together to form a load module. It
should have a PPT entry. It can have name from 1 to 7 chars.
A: The CICS translator converts the EXEC CICS commands into call statements for a specific
programming language.
Q: What are the differences between an EXEC CICS XCTL and an EXEC CICS LINK
command?
A: The XCTL command transfer control to an application program at the same logical level and
do not expect to control back, while the LINK command passes control to an application
program at the next logical level and expects control back.
A: The EIBRCODE tells the application program if the last CICS command was executed
successfully or not.
Q: What is the effect of including the TRANSID in the EXEC CICS RETURN command?
A: The next time the end user presses an attention key, CICS will start the transaction
specified in the TRANSID option.
A: To specify the paragraph or program label to which control is to be passed if the “handle
condition” occurs.
Q: What is the difference between the INTO and the SET option in the EXEC CICS
RECEIVE MAP command?
A: 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.
Q: What is the difference between getting the system time with EIBTIME and ASKTIME
command?
A: The ASKTIME command is used to request the current date and time. Whereas, the
EIBTIME field have the value at the task initiation time.
A: The TCT defines the characteristics of each terminal with which CICS can communicate.
Q: What is a deadlock?
A: Deadlock occurs when a task is waiting for a resource held by another task which, in turn, is
waiting for a resources held by the first task.
A: MRO is the mechanism by which different CICS address spaces with in the same CPU can
communicate and share resources.
A: A program is considered reentrant if more than one task can execute the code without
interfering with the other tasks execution.
A: The common work area is a storage area that can be accessed by any task in a CICS
system.
Q: What is the meaning and use of the EIBAID field?
A: EIBAID is a key field in the execute interface block; it indicates which attention key the user
pressed to initiate the task.
Q: What is BMS?
A: BMS is Basic Map Support. It allows you to code assembler level programs to define
screens.