0% found this document useful (0 votes)
181 views

CICS Tutorial

CICS (Customer Information Control System) is an online transaction processing system developed by IBM in the 1960s. It provides services to handle the special requirements for online processing and interfaces between application programs and database/data communication systems. CICS allows for multi-tasking and multi-threading to concurrently execute transactions from multiple users. It uses control programs and tables to manage resources like terminals, files, databases and more. Application programs interact with CICS using commands to send and receive data from maps which define screen layouts in a device-independent manner.

Uploaded by

Sarath Ch
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
181 views

CICS Tutorial

CICS (Customer Information Control System) is an online transaction processing system developed by IBM in the 1960s. It provides services to handle the special requirements for online processing and interfaces between application programs and database/data communication systems. CICS allows for multi-tasking and multi-threading to concurrently execute transactions from multiple users. It uses control programs and tables to manage resources like terminals, files, databases and more. Application programs interact with CICS using commands to send and receive data from maps which define screen layouts in a device-independent manner.

Uploaded by

Sarath Ch
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 57

CICS Tutorial :-

CICS

INTRODUCTION

BATCH & ONLINE SYSTEM

ONLINE SYSTEM

DEFINITION : ONLINE processing allows a user to interact with a computer and access its resources via a
terminal.

Example : Railway Reservation system.

BATCH & ONLINE SYSTEM

BATCH

ONLINE

Input

Data from card tape, disk Batched, sequential, scheduled

Data from terminal random, concurrent

Start of A job

Operator (or operating system) initiates the job. Other jobs in the same region must wait.
Once CICS is initialized, entering transaction id triggers the transaction to start.

Processing Mode

Single task single thread. Priority in job scheduling

Multi task multi thread. Priority processing.

End of job

Each job

Each transaction. Once CICS is terminated, no transactions can be entered.

Output

printed reports, output files. User must wait for batch jobs to produce reports (day, week, month)

Message terminals updated files, system Instant feed back

Resource Usage

Less
More

Example of application

Monthly sales report

Airline reservation system

WHAT IS CICS?

Customer Information Control System (CICS) was developed in 1960 by IBM 

ONLINE CONTROL SYSTEM 

General purpose data communication control system 

Provides services to handle all the special requirements for online processing

Note : Role of CICS is to interface between application programs and the DB/DC control system.

CICS SERVICES & THE OPERATING SYSTEM

Requests for file I/P, O/P

Requests for database I/P, O/P

Requests for terminal I/P, O/P

CICS CONTROL PROGRAM AND TABLES

CICS CONTROL PROGRAM

CICS CONTROL PROGRAM (IBM SUPPLIED)  

FCP (FILE CONTROL PROGRAM)

JCP (JOURNAL CONTROL PROGRAM)

KCP (TASK CONTROL PROGRAM)


PCP (PROGRAM CONTROL PROGRAM)

SCP (STORAGE CONTROL PROGRAM)

TCP (TERMINAL CONTROL PROGRAM)

TDP (TRANSIENT DATA PROGRAM)

TSP (TEMPORARY STORAGE PROGRAM)

OTHERS

CICS CONTROL TABLES

CICS CONTROL TABLES        (USER SPECIFIED)

FCT (FILE CONTROL TABLE)

JCT (JOURNAL CONTROL TABLE)

PCT (PROGRAM CONTROL TABLE)

PPT (PROCESSING PROGRAM TABLE)

TCT (TERMINAL CONTROL TABLE)

DCT (DESTINATION CONTROL TABLE)

TST (TEMPORARY STORAGE TABLE)

CICS START UP

CICS is submitted as a batch job.

CICS System Initialization program (SIP) is the main job step  

SIP loads System Initialization Table (SIT)  

SIP further loads all control programs and tables

  - Perform initial housekeeping tasks

CICS SHUTDOWN

Master terminal transaction is entered with shutdown option

CICS job produces various logs, statistics, dumps and other reports and ends  

No transaction can be executed after that


ROLE OF CICS

MULTI TASKING

More than one task can be executed concurrently.

MULTI THREADING

Tasks share the same program under the multi tasking environment.

RE-ENTRANT PROGRAM

Program when does not modify itself in any way during execution.

QUASI RE-ENTRANT

Is a reentrant program under the CICS environment.

MAPS AND DISPLAYS

INTRODUCTION TO BMS

To make the application program device independent and format independent CICS provides Basic
Mapping Support (BMS)

BMS is a standard facility, to deal with the formatted screen operations

Screen defined through BMS is called a "MAP"

PHYSICAL AND SYMBOLIC MAP

Physical Map

Primarily used by CICS

Ensures device independence in the application program

For input operations, it defines the maximal data length and starting position of each field to be read
and allows BMS to interpret an input data stream

For output operations it defines starting position, length, field characteristics

(Attribute Bytes) and default data for each field, and allows BMS to construct an output data stream.

Physical map is a program in the form of Load module    

Physical map is coded using BMS macros    


BMS macros are assembled separately and link edited into the CICS load library

SYMBOLIC MAP

1.       Ensures the device and format independence to the application programs

2.       A layout change in the formatted screen can be done independent of the application program
coding as long as field name and length remain the same

3.       Symbolic map is included in the program by issuing a COBOL COPY statement

USING MAPS IN A PROGRAM

SYMBOLIC MAP GENERATION

Symbolic map is a copy library member  

Included in application program for defining the screen fields.  

BMS Macros are coded, assembled and catalogued into a COPY library

SYMBOLIC MAP SUFFIXES

Halfward binary

  Contain the length of data entered by the terminal operator


F

One byte flag field

Contains the data entered by the operator

One byte field that contains Attribute byte

Contains data to be sent to terminal

SYMBOLIC MAP FORMAT

A 12 byte TIOA prefix is automatically provided.

When performing input functions fields suffixed with “L”, “F”, and “I” are meaningful.

When performing OUTPUT functions, the fields suffixed with “A” and “O” are meaningful.Contains the
data to be sent to the terminal.

OUTPUT MAPPING

“MAP ONLY”

    EXEC CICS SEND


          MAP (“mapname1’)

          MAPSET (‘mapset1’)

          MAPONLY

    END-EXEC

  

“DATA ONLY”

    EXEC CICS SEND

          MAP (‘mapname1’)

          MAPSET (‘mapset1’)

          DATA ONLY.

    END-EXEC.

1.       MAP ONLY option.

o        Use the physical map only.

o        Field headings, attribute bytes, and the location of where all information is to be placed is sent.

2.       DATA ONLY

o        Use the symbolic map only

o        only the data in the symbolic map is sent to the screen.
3.       Neither “ MAPONLY NOR DATAONLY"

      EXEC CICS SEND

            MAP (‘map-name1’)

            MAPSET (‘mapset1’)

      END-EXEC

o        The physical map and the data from symbolic map is sent to the terminal.

Other options of SEND command.

ERASE: Current screen is erased before the map specified appears on the screen

ERASEAUP: erase all the unprotected fields.

FREEKB: to free the keyboard

ALARM: to make an alarms sound.

FRSET: to reset MDT to zero

CURSOR: to place the cursor in a specified field

CURSOR POSITIONING

Static positioning

If IC option is specified in the ATTRB field of DFHMDF macro the cursor will be placed at this field.

Dynamic / symbolic positioning.

Place (-1) into the field length field (“L” suffix). Cursor will be placed in the field.

Dynamic / Relative positioning.

Cursor (data-value) option is used.


Data-Value will have the value at which the cursor has to be positioned.

E.g.. EXEC CICS SEND

                     MAP (…..)

                     MAPSET (…..)

                     CURSOR (100)

                     ERASE

            END-EXEC.

MAPFAIL condition will caused in RECEIVE MAP command.

If the data to be mapped has a length of zero.

If the operator presses any key (clear, PA, PF, ENTER, Keys) without entering any data.

ACCESSING AND DISPLAYING MAP FIELDS

MAP STORAGE AREAS

Placing maps in the Program

Any of the three plans for redefinition of maps may be used with either of the 2 alternatives for placing
maps in your program.

WORKING - STORAGE SECTION

Copying a symbolic description map structure here makes the area automatically available whenever the
program is invoked.

LINKAGE SECTION

Copying a symbolic description map structure here does NOT mean the storage will be available. Some
methods for providing storage are passing a COMMAREA, acquiring temporary storage with the SET
option, or using a GET MAIN command.

SEND / RECEIVE
Sending from the Symbolic description map

SEND MAP (`MAP1')

MAPSET(`SET1')

MOVE `MAP1' TO MAPVAR

MOVE `SET1' TO SETVAR

SEND MAP (MAPVAR)

MAPSET(SETVAR)

FROM (MAP1O)

SEND MAP Coding Alternatives You can code the SEND MAP command to locate the symbolic
description map in several ways:

Using constants in the name field for MAP and MAPSET(FROM is not required)

Using variables in the name field for MAP and MAPSET (This makes FROM a required parameter)

Using only the MAP parameter. In this case the name in the MAP option must be the MAPSET name.

RECEIVING into the symbolic description map

RECEIVE MAP(`MAP1')

MAPSET(`SET1') ... MAP1 I

Move `MAP1' to MAPVAR

Move `SET1' to SETVAR ..... MAP1 I

RECEIVE MAP (MAPVAR)

MAPSET(SETVAR)

INTO (MAP1 I)

Receive MAP (`SET1') ... SET1 I


RECEIVE MAP coding alternatives You can code the RECEIVE MAP command to locate the symbolic
description map in several ways:

Using constants in the name field for map and mapset (INTO/SET is not required) This is the most
commonly used format.

Using variables in the name field for MAP and MAPSET. This makes INTO (database) or SET a required
parameter.

Using only the MAP parameter. In this case the name in the MAP option must be the MAPSET name.

Linkage Section.

    01 DFHCOMMAREA

    01 LST

        02 PTR-2-LIST PIC S 9(8) COMP.

        02 PTR-2-BMS PIC S 9(8) COMP.

RECEIVE MAP (`MAP1') MAPSET (`SET1')

SET (PTR-2-BMS) ..... MAP1 I

Using the SET option requests CICS to get the storage and return a pointer to it. The symbolic description
map must be in the LINKAGE SECTION.

OUTBOUND FUNCTIONS

SEND

MAP (`MAPA') MAPSET (`SETA')

[ERASE/ ERASEAUP]

[FREEKB]

[ALARM]
[FRSET]

[PRINT]

ERASE

Erase Buffer, place cursor in upper left corner then write

ERASEAUP

Erase all the unprotected fields before the Write

FREEKB

Unlock Keyboard after the write

ALARM

Active alarm with the write

FRSET

Set all MDT currently on to off

PRINT
Start the 3270 print operation.

Control Functions:

Typically the first type of command in the program is a SEND MAP. Certain control functions may be
included in that command.

ERASEAUP will clear out each field whose attribute is unprotected. It will NOT alter any attribute
settings.

If you do not free the keyboard using FREEKB, the operator will have to press the RESET key before
entering data.

If you code FRSET, all attribute bytes currently having Modified Data Tags (MDT) set on will be set off.
Selective resetting of the MDT's must be done another way.

When sending data to a 3270 screen the actual printing from the buffer will occur when the PRINT
function is requested.

Attributes :

The `A' suffixed field is an attribute field which controls the following:

PROTECTED/UNPROTECTED

ASKIP

NUM

MDT

Non Display (dark)DISPLAY (normal/bright)

If the color or highlighting of a field has to be changed, additional symbolic fields are needed which are
called the EXTENDED ATTRIBUTES.

EXTENDED ATTRIBUTES

DSATTS (for symbolic map) and MAPATTS (for physical map) support the extended attribute
characteristics
The MAPATTS allows you to set up the physical map with any of the characteristic(s) coded.

The DSATTS will create appropriate suffixed labels for the attribute characteristic(s) coded.

INBOUND FUNCTIONS - AID/CURSOR CONTROL

Attention Identifier (ID) and Cursor:

On a RECEIVE, CICS updates the EIB with the following information:

The screen cursor position relative to zero is placed is EIBCPOSN.

The name of the input key the terminal operator pressed is placed in the field EIBAID.

EIBAID/CURSOR

WORKING-STORAGE SECTION.

                    COPY DFHAID.

                    ......

PROCEDURE DIVISION.

                    IF EIBAID = DFHPF12 THEN

                    ......

                    IF EIBAID = DFHENTER THEN

                    ......

                    IF EIBCPOSN LESS THAN 80 THEN

                    ......

When you first enter your program as a result of a transaction id, you can test EIBAID and/or EIBCPOSN.
This may be done prior to issuing a RECEIVE command, if so chosen.

AID/CURSOR - SAMPLE CODING (CONTROL)

If the operator uses any PA key or presses the CLEAR key, no data is transmitted

EIBAID is useful when function keys are defined for the user.

for eg. PF12 may be the exit function

           PF3 may be an update function etc.


  Thus testing for the type of AID will alter the logic flow.  

EIBCPOSN can be used to determine where the cursor was positioned on the screen. This information is
especially useful with screens containing an action bar.

CURSLOC

Sample Map

MAPSETA DFHMSD TYPE=&SYSPARM, MODE= INOUT,

                                    TERM=ALL, LANG=COBOL, TIOAPFX=YES, 

                                    STORAGE=AUTO

 MAP1       DFHMDI SIZE=(24,80), LINE=1, COLUMN=1,

                                   CURSLOC=YES

                   DFHMDF POS(2,1), LENGTH=4, INITIAL=`NAME', 

                                    ATTRIB=ASKIP

 NAME       DFHMDF POS(2,6),LENGTH=20, 

                                    ATTRB=(UNPROT, IC)

                    DFHMDF POS(2,27), LENGTH=1,

                                    ATTRB=PROT

CURSLOC= YES allows you to determine after a RECEIVE MAP command, which map field had the cursor
in it.

CURSLOC=NO is the default.

CURSLOC=(NO/YES) may be coded on the DFHMSD or the DFHMDI macro. If coded on the DFHMSD
macro, it will provide a default for all the maps in that mapset.  

When CURSLOC=YES, BMS will set the `F' suffix field to X'02' indicating that field contained the cursor. If
the cursor is in a field for which there is no symbolic label i.e. a DFHMDF with no label the program will
not be notified.  
Note : The `F' suffix field continues.

To be used to indicate the operator pressed the erase to end of fixed (EOF) key by being set to X'80'.

Therefore, if CURSLOC=YES it is possible to have both these conditions occur for the same field, in which
case the `F' suffix field will contain a X'82'.

EDITING

Map field Definition PICIN/PICOUT

Built in function De-edit command.

When data is sent out via the `O' suffix fields or received into the `I' suffix fields you may want a
definition other than PIC x. PICIN AND PICOUT allows the user to use other COBOL PICS such as $,Z etc.

If the date contains special characters, you may want to remove them using the BIF DEEDIT command.

PIC IN/PIC OUT

If PICIN/PICOUT is not coded in the macro, the pic generated is always PIC X (length of field)

By using PICIN/PICOUT BMS can be forced to generate the appropriate PIC.

PICIN tells BMS how to move data into the `I' suffix field.

PICOUT tells COBOL how to edit your data move to the `O' suffix field.

FIELD EDIT BUILT-IN FUNCTION

Amount

BIF

Amount

$5431.80

EDIT
00543180

EXEC CICS

BIF DEEDIT

FIELD (amount)

LENGTH (8)

END-EXEC.

BIF DEEDIT is used to remove the special characters from the input field.  

The Amount field displayed has a dollar sign and a decimal point  

By using BIF DEEDIT dollar sign and decimal point is removed. Thus the number can be used for
arithmetic operations.

COBOL compiler requires LENGTH specification:  

VS COBOL-II uses the implied length of the data-area used in the field parameter.

CICS PROGRAM COMPONENTS

OBJECTIVES

Structure of CICS Application Program  

CICS Management Functions  

Starting a Task

Conversational& Pseudoconversational transactions

CICS Program preparation  

CICS Program testing & Debugging  

CICS commands

Passing Data across tasks

STRUCTURE OF CICS APPLICATION PROGRAM

Identification Division
Program - ID required

Other comments as below, are optional but recommended.

Author

Date-Written

Date-compiled

Remarks

Environment Division

Only header is required

Other requirements:

COBOL statements and CICS commands should be coded

The following COBOL statements are prohibited.

ACCEPT, CURRENT-DATE, DATE, DAY, DISPLAY, EXHIBIT, STOP RUN, TRACE

Any I/O Statements(OPEN, CLOSE, READ, WRITE, REWRITE, DELETE, START)

REPORT WRITER feature

SORT feature

CALL statement is allowed if the called program does not issue any CICS commands or inhibited COBOL
statements mentioned above.

TERMINATION STATEMENTS

Notes :This is not the way to terminate a CICS program. CICS has a command for that purpose.
Nevertheless, COBOL and VS COBOL II have three statements to conclude programs.

Control must not be allowed to pass beyond the last statement of a CICS Program.

STOP RUN in COBOL uses operating system facilities, and therefore, is discouraged.
EXIT program is ignored if the program has not been called.

CICS RETURN COMMAND and/or GOBACK statement is recommended.

CICS MANAGEMENT FUNCTIONS

Transactions

Task

Program

Transactions  

An exchange between a terminal and a data base representing an application process. For example, an
inquiry or a deposit and balance update

Task  

A specific instance of a transaction i.e. a unique unit of work.

Program  

Prepared statements compiled or assembled into an executable module of machine instructions.

CONVERSATIONAL TRANSACTION

Program uses a pair of SEND and RECEIVE commands.  

Program waits until the user responds.  

Resources are held until the user responds.  

Very inefficient way of conversing with the user.

PSEUDO CONVERSATIONAL TRANSACTION


The task is terminated after a message is sent with a linkage for the next task. CICS provides a facility
(COMMAREA) to made it easier to accomplish this.

When the user completes response (by pressing enter) reset task is automatically initiated by CICS.

The task receives the message from the terminal & processes it.

This is a multitask operation from system's point of view.

PROGRAM PREPARATION

Running the DB2 precompiler first is the preferred method. DB2 precompiler precedes another process,
binding, not mentioned here.

Output of the DB2 precompiler can serve as input to the translator.  

Output of the translator will be input to the compiler.  

Messages or warnings are provided on all the listings.

TRANSLATOR recognizes EXEC CICS and EXEC DLI statements. They are commented out and replaced
with statements in the appropriate language. Here, COBOL MOVE instructions and a CALL are inserted
and passed on to the COBOL compiler.  

DB2 Precompiler is supplied by the relational data base managers, DB2 and SQL/DS. It recognizes EXEC
SQL statements which it will comment out and replace with in our case. COBOL PERFORM and CALL
statements.

Output of the transaction is i/p to the compiler  

The o/p of the linkage editor is executable. The load module is placed in the CICS online program library.

Messages or warnings are provided on all the listings. The compiler listing is or limited use if the
translator listing would not process all commands.

TESTING

CEMT set program (prg1) New comp

  Or

  CEMT S PR (prg1) N

After making changes to a program the new version replaces old version, but CICS which is currently
executing has no way of knowing this automatically. The CICS processing program table PPT still points
to the old-version.
To avoid testing with the old version, you must use the CICS-provided CEMT transaction to update the
pointer to the program.

COMMON FORMAT

A CICS command consists of a keyword phrase, delimiter, function, options and their argument values.  

Be careful about periods. Avoid them after END-EXEC. Where you don't really want them.

For eg. within an If .... then ... else statement

The translator will place a period into the generated code if a period follows end-exec.

ARGUMENT VALUES

data - value

PIC S9(4) comp Halfword binary

PIC S9(8) comp Fullword binary

PIC X(15) character string constants permitted

data - area

COBOL data name

(Not a constant)

eg :-

01

Record-area.
 

05

Fld 1

05

Fld 2

name

COBOL data name Character string

label

Paragraph name

hhmmss

PIC S9(7) comp 3

Packed decimal
pointer-ref

BLL cell

Usage pointer

RECEIVE COMMAND

    EXEC CICS RECEIVE

         INTO (data area)

         LENGTH(ml)

    END-EXEC  

RECEIVE command is used to receive incoming data from the terminal to which this CICS transaction is
associated.

A receiving area must be defined in working storage section and has to be specified in the INTO
parameter.

Length field must be defined in working storage section as a S9(4) comp. It has to be specified in length
option.

SEND COMMAND

    EXEC CICS SEND

         FROM (data area)

         LENGTH(ln)

    END-EXEC

The data to be sent must be stored in working storage section, and this field name has to be specified in
the FROM parameter.

Length must be specified the same as that of the Receive command.


 

EXCEPTIONAL CONDITIONS

RESP option

Define a full word binary field S9(8) comp in the working storage section as the response field.

Place RESP option with the response field in any CICS command.

After command execution, check the response code in the response field with DFHRESP (xxxx)where
xxxx is

NORMAL for normal completion or Any exceptional condition

HANDLE CONDITION

Handle condition command is used to transfer control to the procedure label specified if the exceptional
condition, specified occurs.

Remains active until the end of program or another handle condition request overrides it.

IGNORE CONDITION

Ignore condition command causes no action to be taken if the condition specified occurs in the
programs.

Request by the IGNORE CONDITION command is valid until the subsequent HANDLE CONDITION
command for the same condition.

NO HANDLE OPTION

If NOHANDLE option is specified in any CICS command, no action will be taken for any exceptional
condition occurring during execution of this command.

Eg : EXEC CICS SEND


              From (...)

             Length (...)

             NOHANDLE

        END-EXEC

FORMATTING TIME AND DATE

ASKTIME Command

used to request the current date and time

EIBDATE and EIBTIME fields have the values at the task initiation time.

FORMAT EXEC CICS ASKTIME END-EXEC

FORMAT TIME COMMAND

Used to receive the information of data and time in various formats.

Format

  [YYDDD (data - area)]

[YYMMDD (data - area)]

[YYDDMM (data - area)]

[MMDDYY (data - area)]

[DDMMYY (data - area)]

[DATESEP(data - value)]

[DAY OF WEEK (data - area)]

[DAY OF MONTH (data - area)]

[MONTH OF YEAR (data - area)]

[YEAR (data - area)]

[TIME (data - area)]


[TIMESEP (data - value)]

DATESEP represents data separator (default is "/").  

TIMESEP represents time separator (default is ":").  

The data area for the ABSTIME option of ASKTIME and FORMATTIME commands must be a 15-digit
packed decimal data type.

DELAY COMMAND

used to delay the processing of a task for the specified time interval or until the specified time.

FORMAT

      EXEC CICS DELAY

            INTERVAL (002000)

            TIME (152000)

      End - EXEC

Task will be suspended for 20 minutes if INTERVAL is specified or until 15:20:00 if TIME is specified.

COMMAREA

Passing data via the COMMAREA 

pseudo conversational task to task 

Linking program to program

PSEUDO CONVERSATIONAL

Pseudo conversational technique is uses the multiple transaction identifiers(pct entries) and multiple
program (pct entries). It performsthe terminal conversation in the following way:

A conversational program is logically and physically divided into separte programs after sending a
message and before receving the message. For each separate program, a unique cics trasction identifier
is assigned. before terminating the program, each program issues the RETURN command with the next
transaction identifier which is associated with the next program, unless it is the least return to CICS
itself. in this way, a series of terminal conversations can be carried out continuously.
PASSING DATA TO NEXT TASK

Notes :

The first time commarea is passed, it must begin as an area of storage in the working storage section of
the program passing it.

A commarea parameter in the RETURN will pass the area to the program associated with the
subsequent transaction. In this case, itself.

The subsequent program (in this case the same program) must define access to all the commarea that
was passed to it.

PAYROLL as both the sender and the receiver of the COMMAREA needs the working storage definition to
send and the linkage section DFHCOMMAREA to receive.

PAYROLL must therefore be able to distinguish between FIRST TIME into the program. When there is no
COMMAREA and subsequent times in. Where one exists in the Linkage section. The EIB field, EIBCALEN
indicates the length of the commarea.

EIBCALEN

First time into the program no commarea exists, therefore EIBCALEN = 0

While returning the control to CICS the working storage is loaded and this is sent via the commarea
parameter in the RETURN Transid.

On subsequent entry, commarea exists and is automatically made addressable by CICS in the linkage
section of DFHCOMMAREA

PASSING DATA USING LINK

To pass control from one program to another and then return to the original like executing a subroutine.

The link command passes control to another program defined in CICS PPT expecting that the program
will return to the linking program instruction following the LINK command. This happens when the
linked program issues a RETURN command.

Data may be passed using the commarea.  

The commarea is shared between the two program regains control may changes made to the commarea
by the linked program are accessible.  
The two programs executive under the same task.  

The working storage section for the linking program is retained. Working storage for the linked program
is automatically released after its RETURN command is executed.

To pass control from one program to another and then return to the original like executing a subroutine.

The link command passes control to another program defined in CICS PPT expecting that the program
will return to the linking program instruction following the LINK command. This happens when the
linked program issues a RETURN command.

Reading External Data

Functional overview

DIRECT RETRIEVAL

VSAM DATA STRUCTURES

DIRECT RETRIEVAL

RELATIONAL TABLE ROW

BROWSE

VSAM DATA STRUCTURE

BROWSE

RELATIONAL TABLE ROWS

Entry for VSAM file has to be there in FCT (File Control Table)

Each entry contains all descriptive information for the file it represents. So, programmer need not define
the physical organization and other attributes of the files.

The File parameter coded in the program must be the same as the file name in the FCT.

Interface between CICS and Relational Database is called CICS attachment Facility. Statement are coded
in SQL language in the application program to Communicate data requests to the database.

TOPICS

DIRECT RETRIEVAL

VSAM FILE RECORD


RELATIONAL TABLE ROW

BROWSE

VSAM FILE RECORDS

SET OF RELATIONAL TABLE WORKS

VSAM DATA STRUCTURES

CICS uses the following VSAM structures

Key sequenced data set (KSDS)

Entry sequenced dataset (ESDS)

Relative record dataset (RRDS)

PROGRAM ORGANIZATION

File attributes are defined in the FCT for each file

Files are opened by CICS

Immediately after system initialization if specified in the FCT.

In response to a file access request from an application if the file is closed

In response to a master terminal CEMT request from an operation.

Application program is not responsible for open / close of files

RECORD IDENTIFICATION

RECORD KEY

RELATIVE BYTE ADDRESS

RELATIVE RECORD NUMBER

PARTIAL KEY

key of the record to be read is specified in the RIDFLD. for KSDS

Key specified can be a full key or partial key

If partial key, key length has to be provided

RBA (Relative Byte Address)


Can also be used instead of actual key value

For ESDS

RIDFLD contain a 4 byte RBA

For RRDS

RIDFLD contains 4 Byte binary relative record number.

RECORD KEY DEFINITION EXAMPLE

    WORKING - STORAGE SECTION.

            05 RECKEY PIC X(6).

    PROCEDURE DIVISION.

            MOVE VALUE TO RECKEY.  

RIDFLD must be set to the value of the key of the record to be retrieved.

RIDFLD must be large enough to hold a full record key even when a partial key is used.

READ COMMAND

READ command with INTO Option. (FULL KEY)

Reads the record specified by the full key.

The data content of the record is moved into the specified data-area defined in the working storage
section.

FORMAT

    EXEC CICS READ

            DATASET (name) | FILE (name)

            INTO (data-area) |SET(ptr-ref)

            RIDFLD (data-area)

            [ LENGTH (data-values) ]

    END - EXEC.

DATASET / FILE names the file.


It must be defined in FCT.

INTO names the field in the working storage section where the data has to be placed.

RIDFLD is the key field.

LENGTH is half word binary.

It indicates maximum length of the record to be read. It is optional.

EXCEPTIONAL CONDITIONS

DUPKEY : If duplicate record is found for the specified key.

NOTFND : If the record is not found for the key specified.

LENGER R LENGERR : The specified length (in LENGTH OPTION) is shorter than the actual record length.

NOTOPEN : When file specified is not open.

The exceptional condition can be trapped using RESP option in the READ command.

ADDRESSABILITY TECHNIQUES

    EXEC CICS XCTL

            PROGRAM (PROGRAM NAME)

            RESP (EXCEPTION)

    END-EXEC.

  IF EXCEPTION = DFHRESP (PGMIDERR)  

a module given control through the use of a CICS XCTL command will not return to the program that
issued the XCTL.

The required. program name is character string constant (max 8 characters)

The PGMIDERR exception condition occurs when the name is not in the PPT.

LOGICAL LEVELS
The linked to program runs at a new logical level and returns to a logical level back to the linking
program.

The linking program and its storage area remain available.

Notes :

To quit the repeated execution simply RETURN without the TRANSID option.

Any linked program could use the same COMMAREA of the parameters so indicated.

The transid & commarea option easy enough to use to make this method practical.

PROGRAMS TO PROGRAM TRANSITION

CICS LINK 

CICS XCTL 

COBOL CALL  

Alternative to XCTL or LINK ? COBOL CALL·    

COBOL CALL passes control to other programs.

PASSING DATA USING INPUT MSG

INPUT MSG & INPUT LEN PARAMETERS USED WITH XCTL OR LINK.

Receiver uses EXEC CICS RECEIVE command

PASSING DATA USING LINK

    AREA1 PIC x (200)  (prog1)

dotted

    Linkage Section          (prog2)

        01 DFHCOMMAREA

        05 AREA2 PIC X(200)

1ST Program - COMMAREA - Length 100


Data violation as 2nd Program (receives) tries to move 200 char

PASSING A COMMAREA WITH XCTL

If data is to be passed to the XCTLed program, a COMMAREA can be used.

Data area is to be located in the Linkage Section of the receiving program.

COMMAREA used with RETURN, LINK & XCTL

ADDRESSABILITY

DFHCOMMAREA & DFHEIBLK : Addressable automatically by CICS

Dynamically acquired storage : Addressable by program

Not necessary to always do a EXEC CICS GETMAIN explicitly

CICS QUEUEING FACILITIES

Two facilities to store data that are temporary in nature.

This data is created or collected by one or more online transaction to be used later by the same
transaction or by a different transaction or even later passed to a batch program.

They are

Transient data Queue (TDQ)

Temporary storage Queue (TSQ).

TRANSIENT DATA QUEUE

They are identified by a 4 character ID called destination ID

Destination ID and other characteristics of TDQ are defined in the destination control table (DCT) by the
system programmer.

2 types of TDQ’s

Intra Partition TDQ

Extra Partition TDQ

Intra Partition TDQ - Processed only within the same CICS region

Extra Partition TDQ - Individual Sequential Files processed between the transaction of the CICS region
and the system outside of the cics region.
INTRA PARTITION TDQ

All Intra partition TDQ are stored in only 1 physical file (VSAM)  

Record from the queue can be returned sequentially.

Record can be written sequentially.

Records can be of variable length format

Several tasks can write to the same TDQ but only one task can read from TDQ.

Intra Partition TDQ is used in application such as  

Interface among CICS transaction. Applicati on program 1 TDQ Appl . Pgm 2 report

Automatic task Initiation (ATI)

Message routing

Message Broad cast.

EXTRA PARTITION TDQ

Extra partition TDQ is a separate physical file & may be a disk, tape or reporter.  

DCT determines the initial open / close status of a file while the file can be opened or closed through the
master terminal transaction during CICS session.

TDQ can be defined as an Input or output but not both.

Records are fixed, variable, blocked or unblocked.

TRANSIENT DATA OUTPUT

Appears only for Intra-partition TDQ.

Deletes all records associated with the named destination.

All associated storage is released.

EXCEPTIONAL CONDITIONS
1.       Special handling required

LENGERR - length specified is greater than the maximum record length specified in DCT

2.       Qzero - Destination empties or end of TDQ error

  Qlderr - The dest ld specified cannot be found in DCT.

TEMPORARY STORAGE

TSQ is a queue of stored records.

Created & deleted dynamically by application program.

Used as a scratch pad

Queue ID is of length 1-8 bytes

TSQ is of variable length

Records can be stored in main or auxiliary storage

The records once written remains accessible until the

entire TSQ is deleted

Records can be read sequentially or directly

Records can be re-read & updated.

WRITEQ TS

To write or re-write a record in TSQ

      EXEC CICS WRITEQ TS

          QUEUE (NAME)

          LENGTH (DATA-VALUE)

          [ITEM (DATA-AREA)

          [REWRITE]

          [MAIN | AUXILIARY]
    END-EXEC.

ITEM - If this option is coded CICS write return the item number assigned to the record just written.

REWRITE - is used to rewrite the record identified by ITEM.

 Main / Auxiliary - To specify the storage medium. Will be stored in main if auxiliary storage not
supported.

READQ TS

Can be used to read records either sequentially or directly.Syntax

      EXEC CICS READQ TS

          QUEUE (NAME)

          INTO (DATA - AREA)

          LENGTH (DATA-VALUE)

          [ITEM (DATA-VALUE) | NEXT]

          [NUMREC (DATA-AREA)]

    END-EXEC.

NEXT - to retrieve the next - logical record in the TSQ. mutually exclusive to the item option   

NUMREC - the data area is defined as PIC 9(4) comp. to find the Total no. of records in the TSQ.  

Item - for direct access specify the item no of the record.

DELETEQ TS of TSQ

EXEC CICS

        DELETEQ TS

        QUEUE (NAME)

END-EXEC.

All records is TSQ are deleted.

All associated storage is released.

 
 

EXCEPTIONAL CONDITIONS

Special handling required

Itemerr - Item number specified is not in the range of entry number assigned for the Queue.

Lengerr - Length specified is greater than the maximum record length.

error

  Q iderr - specified is Queue id not found.

TESTING & HANDLING EXCEPTIONS

COMMANDS FOR TESTING APPLICATION PROGRAMS

CECI (Command Level Interpreter) is a CICS - supplied transaction which performs syntax checking of a
CICS command. If the syntax is satisfied, it will execute the command.

CEBR (Temporary Storage Browse) is a CICS - supplied transaction which browses Temporary Storage
Queue (TSQ).

CEDF is a CICS - supplied transaction which monitors the execution of an application program as an
interactive debugging aid.

APPLICATION PROGRAM SUPPORT

RESP and NOHANDLE

IGNORE CONDITION

HANDLE CONDITION

HANDLE AID

HANDLE ABEND

COMMAND LEVEL INTERPRETER

For invoking CECI, type CECI with the CICS command to be interpreted.  

The first screen lists all the possible CICS commands.


Giving question mark (?) before the command requests a syntax check only. No execution.

Ex. CECI SEND MAP (`SPOOMPO')

                        MAPSET (`SPOOMSO')

                        ERASE

BROWSING CICS QUEUES

CEBR can be invoked while you are already in the CEDF mode.  

Press the PF5 key to display the working storage section.

Then, press PF12 key to invoke CEBR.

      CEBR allows to browse information in Temporary Storage (TS) queues.  

Help (PF1) give you a list of CEBR commands on the screen.  

TS queues are retained until purged.

EXCEPTION HANDLING

CICS to respond to exceptional conditions in one of three ways:

RESP option: -   The RESP option can be specified in any CICS command. Its function is similar to the
return code in the batch program.

Define a fullword binary field (S9(8)COMP) in the working storage section as a response field.

Place the RESP option with the response filed in a command.

After command execution, check the response code in the response field with DFHRESP (xxxx), where
xxxx is the - NORMAL

                    - Any exceptional condition

HANDLE CONDITION  This command is used to transfer control to the procedure label specified if the
exceptional condition specified occurs.

IGNORE CONDITION  This command causes no action to be taken if the condition specified occurs in the
program.

      EXEC CICS HANDLE CONDITION


          Condition (Label)

          [Condition (Label)]

          [Error (Label)]

     END-EXEC.

     or

     EXEC CICS IGNORE CONDITION

          Condition

          [Condition]

     END-EXEC.

ABEND CODE  

If an exceptional condition occurs during execution of a CICS application program and if the program
does not check the exceptional condition, CICS may continue executing the program or terminate
abnormally the execution of the program, depending on the exceptional condition and the command
involved.

OPTION FOR EXCEPTION HANDLING

CODE RESP keyword in commands: CHECK USER-SUPPLIED FIELD IN WORKING - STORAGE.  

CODE NOHANDLE KEYWORD IN COMMANDS.  

HANDLE CONDITION

COMMANDS

IGNORE CONDITION

  SYSTEM DEFAULT -- ABEND

CICS Adend Codes :-


Execute Interface Block and cics abend codes

Some of the more common CICS abends are briefly described below. These are only brief descriptions
and do not cover all possible reasons.

ASRA

This is the most common abend in CICS. It indicates a Program Check Exception, roughly equivalent to
having an S0C7 in a batch program. Check for spaces in a packed decimal numeric field and changes to
the file and record layouts.

AEIx and AEYx

There are numerous abends that start with AEI or AEY. They indicate that an exception has occured, and
RESP (or NOHANDLE) is not is use. The last character indicates the exact error

AEI0

indicates a PGMIDERR.

AEI9

is a MAPFAIL condition,

AEIO

indicates a duplicate key (DUPKEY) condition.

AEIN

indicates a duplicatebrecord (DUPREC) condition.

AEID
indicates an End of file condition.

AEIS

indicates that a file is not open (NOTOPEN)

AEIP

indicates an invalid request condition (INVREQ)

AEY7

indicates that you are not authorised to use a resource (NOTAUTH)

AICA

This abend usually occurs if your program is looping. There are CICS parameters that determine how
long a task can run without giving up control. The ICVR parameter in the CICS SIT table can be used to
specify a value for all tasks running in CICS, or you can specify a RUNAWAY value when you define a
transaction . If a program is looping then you may not get an AICA abend, because the timer can be reset
when certain events occur, eg some EXEC CICS commands may reset the timer to zero.

ATCH and ATCI

These abends indicates that the task was purged. The task may have been purged by someone issuing a
CEMT command to purge the task, or by CICS because the Deadlock timeout limit has been exceeded or
because there was not enough virtual storage available to run all the tasks in CICS (Short on Storage)

APCT

A program was not found or was disabled. Check the transaction definition to see if the program name
was misspelled. Check that the program is enabled. Check that the program is in an appropriate Load
Library (ie one defined to the current CICS system).
AKCP and AKCT

These abends indicate that a timeout of the task occurred. This may be due to a deadlock.

AFCA

A dataset could not be accessed because it was disabled.

ABM0

The specified map was not found in the specified mapset. Check that you have not misspelled the map
name.

The Execute Interface Block (EIBLK) contains a variable called EIBFN.This contains a value that tells you
what CICS command was last executed. This value can be displayed as part of an error message, to aid in
the debugging of your code or when an exception condition occurs

The values for EIBFN are show below.

 Code  Command

 0202 ADDRESS

 0204 HANDLE CONDITION

 0206 HANDLE AID

 0208 ASSIGN

 020A IGNORE CONDITION

 020C PUSH

 020E POP

 0210 ADDRESS SET

 0402 RECEIVE
 0404 SEND

 0406 CONVERSE

 0408 ISSUE EODS

 040A ISSUE COPY

 040C WAIT TERMINAL

 040E ISSUE LOAD

 0410 WAIT SIGNAL

 0412 ISSUE RESET

 0414 ISSUE DISCONNECT

 0416 ISSUE ENDOUTPUT

 0418 ISSUE ERASEAUP

 041A ISSUE ENDFILE

 041C ISSUE PRINT

 041E ISSUE SIGNAL

 0420 ALLOCATE

 0422 FREE

 0424 POINT

 0426 BUILD ATTACH

 0428 EXTRACT ATTACH

 042A EXTRACT TCT

 042C WAIT CONVID

 042E EXTRACT PROCESS

 0430 ISSUE ABEND

 0432 CONNECT PROCESS

 0434 ISSUE CONFIRMATION


 0436 ISSUE ERROR

 0438 ISSUE PREPARE

 043A ISSUE PASS

 043C EXTRACT LOGONMSG

 043E EXTRACT ATTRIBUTES

 0602 READ

 0604 WRITE

 0606 REWRITE

 0608 DELETE

 060A UNLOCK

 060C STARTBR

 060E READNEXT

 0610 READPREV

 0612 ENDBR

 0614 RESETBR

 0802 WRITEQ TD

 0804 READQ TD

 0806 DELETEQ TD

 0A02 WRITEQ TS

 0A04 READQ TS

 0A06 DELETEQ TS

 0C02 GETMAIN

 0C04 FREEMAIN

 0E02 LINK

 0E04 XCTL
 0E06 LOAD

 0E08 RETURN

 0E0A RELEASE

 0E0C ABEND

 0E0E HANDLE ABEND

 1002 ASKTIME

 1004 DELAY

 1006 POST

 1008 START

 100A RETRIEVE

 100C CANCEL

 1202 WAIT EVENT

 1204 ENQ

 1206 DEQ

 1208 SUSPEND

 1402 WRITE JOURNALNUM

 1404 WAIT JOURNALNUM

 1602 SYNCPOINT

 1802 RECEIVE MAP

 1804 SEND MAP

 1806 SEND TEXT

 1808 SEND PAGE

 180A PURGE MESSAGE

 180C ROUTE

 180E RECEIVE PARTN


 1810 SEND PARTNSET

 1812 SEND CONTROL

 1C02 DUMP

 1E02 ISSUE ADD

 1E04 ISSUE ERASE

 1E06 ISSUE REPLACE

 1E08 ISSUE ABORT

 1E0A ISSUE QUERY

 1E0C ISSUE END

 1E0E ISSUE RECEIVE

 1E10 ISSUE NOTE

 1E12 ISSUE WAIT

 1E14 ISSUE SEND

 2002 BIF DEEDIT

 4802 ENTER TRACENUM

 4804 MONITOR

 4A02 ASKTIME ABSTIME

 4A04 FORMATTIME

 5602 SPOOLOPEN

 5604 SPOOLREAD

 5606 SPOOLWRITE

 5610 SPOOLCLOSE

 5E06 CHANGE TASK

 5E22 WAIT EXTERNAL

 5E32 WAITCICS
 6A02 QUERY SECURITY

 6C02 WRITE OPERATOR

 6C12 ISSUE DFHWTO

 7402 SIGNON

 7404 SIGNOFF

 7406 VERIFY PASSWORD

 7408 CHANGE PASSWORD

 7E02 DUMP TRANSACTION

 
 

CICS FAQ’s:-

CICS FAQS

Question: what is difference between call and link ?

Answer: 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 .

Question: what are the differences between dfhcommarea and tsq ?

Answer: 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 qid is known can be accessed by other transactions also 2. commarea length is s9(4)
comp ie 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 tranfer data from one task to another while tsq is used widely
within the task as a scratch pad.

Question: What is Communication Area?

Answer: Communication Area is used to pass data between the programmer between the task.

Question: Which of the following statements correctly describe the syntax of CICS command language?
Answer:

1.       If an EXEC CICS command must be continued onto a second line a hyphen (-) must be coded in
column 7 of the continued line.

2.       If an EXEC CICS command must be continued onto a second line an 'X' must be coded in column 72
of each line to be continued.

3.       An EXEC CICS command CANNOT be coded within a COBOL IF statement,between the IF command
and the period (.) ending it.

4.       The END-EXEC delimiter is optional and never needs to be placed at the end of a CICS command.

5.       The options specified within an EXEC CICS command can be in any order. For example 'EXEC CICS
SEND FROM(MSG1) LENGTH(30) END-EXEC' can also be coded

'EXEC CICS SEND LENGTH(30) FROM(MSG1) END-EXEC'

Question: .A CICS program ABENDS with an ASRA ABEND code. What is its meaning?

Answer:

1.       A link was issued to a program whose name does not exist in the PPT (Program Processing Table).

2.       A program attempted to use a map that is not defined in the PCT (Program Control Table).

3.       A security violation has occurred. The operator is not defined with the proper authority in the SNT
(Sign-on Table) to use a particular file.
4.       A program interrupt (0C0 or 0C1 or 0C2 or ...) has occurred in a CICS program.

5.       An I/O error has occurred when attempting to use a VSAM file from a CICS program

Question: Which of the following commands, when issued by 2 different programs running at the same
time, will prevent simultaneous use of resource 'SINGLE'?

Answer:

1.       EXEC CICS PROTECT RESOURCE('SINGLE') LENGTH(6) END-EXEC.

2.       EXEC CICS HOLD RESOURCE('SINGLE') LENGTH(6) END-EXEC.

3.       EXEC CICS TASK SINGLE('SINGLE') LENGTH(6) END-EXEC.

4.       EXEC CICS EXCLUSIVE RESOURCE('SINGLE') LENGTH(6) END-EXEC.

Question: How can you accomplish braykpoint in intertest?

Answer: U-for uncondishional braykpoint, C-for condishional braykpoint,and A-for automatic braykpoint

Question: how many ways are there for initiating a transaction?what are they?

Answer: There are six ways in initiating a transaction.they are as follows.

1.       embedding four character transid on the top left most corner of the screen.

2.       making use of EXEC CICS START TRANSID ( )


3.       making use of EXEC CICS RETURN TRANSID ( )

4.       By defining the transid in DCT ( destination control table) to enable ATI (AUTOMATIC TASK
INITIATION)

5.       Making use of PLT ( program list table)

6.       By associating four character transid in PCT (program control table)

Question: which type of TDQ is read destructive?

Answer: intrapartition tdq is read destructive. extrapartition tdq is not read destrctive.

Question: The error code aeiv?

Answer: this is the error code for length,if length of the source data is more than the receiving field,this
error will occur.this is the correct answer,previously i mentioned it as program id error.sorry for the
wrong information.

Question: WHAT U MEAN BY AEIV ?

Answer: THIS IS THE ERROR CODE GIVEN BY THE SYSTEM ,IT MEANS PROGRAM ID ERROR.

Question: WHAT IS THE SIZE OF COMMAREA

Answer: THE DEFAULT COMMAREA SIZE IS 65K.

Question: What is ASRAABEND in CICS?

Answer: It occurs when program interuption takes place.e.g.: when alphanumeric string moved to
numeric data itemOR when arithmetic calculations performed on nonnumeric data itemOR when an
attempt made to read an occurance of a table beyond the defind occurances.
Question:What is a two Phase commit in CICS?

Answer: 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.

Question: Answer to ANON's question, diference between TSQ & TDQ

Answer: TDQ is read destructive, TSQ is not. TSQ can be created dynamically, TDQ cannot be created
dynamically. TSQ is temporary in nature (i:e it will be deleted when the program finishes execution,
unless it is made permanent by making a entry in the Temporary Storage Table), TDQ is not. Hope this
will suffice

Question: What is ENQ in CICS?

Answer: If any one 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.

Question: In SYMBOLIC Cursor Positioning after moving -1 to the length field also the cursor is not
positioned in that particular field.Give reasons?

Answer: You have to explicitly specify the word CURSOR between your EXEC CICS and END-EXEC in the
program.

Question: What does EIB mean?

Answer: The EIB is the EXECUTIVE INTERFACE BLOCK. It is not the EXECUTE INTERFACE BLOCK. All TP
monitors or transaction processors are know as EXECUTIVEs as they carry out process on behalf of a
program module. CICS and DB2 are excutives.

Question: How many exceptional condition can be given in a HANDLE CONDITION?

Answer: Max. of 12 exceptional conditions can be given in a single HANDLE CONDITION.


Question: What command do you issue to delete a record in a transient data queue ?

Answer: READQ TD, the read is destructive. Yes it is correct but there is a restriction.U can deletethe
records sequentially.. For example if one want to delete 10 th record directly it is not possible with this..

Question: How do you access the records randomly in TSQ ?

Answer: By specifying the ITEM option

Question: What command do you issue to delete a record in a transient data queue ?

Answer: READQ TD, the read is destructive.

Question: WHAT ARE DIFFERENT WAYS OF INITIATING TRANSACTION IN CICS

Answer: WE CAN INITIATE CICS TRANSACTION

1.       BY GIVING TRANSACTION ID

2.       BY GIVING CICS START COMMAND

3.       AUTOMATIC TASK INITIATION.

Question: What is the difference between LINK and XCTL ?

Answer: 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.

Question: What is the difference between CICS Program Control Table (PCT) and CICS Processing
Program Table (PPT) ?
Answer: 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.

Question: What are the 3 common ways to create maps?

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

Question: What is Quasi-reentrancy?

Answer: There are times when many users are concurrently using the same program, this is what we call
MultiThreading. 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

Question: What is the difference between a physical BMS mapset and a logical BMS mapset?

Answer: 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.

Question: How To Set MDT(Modified Data Tag) Thru Application Program?(Dynamically).

Answer: You have to move the following macro DFHBMFSE to the Attribute field of that particular
Variable.

Question: What CICS facilities can you use to save data between the transactions?

Answer: COMMONAREA, TSQ & TDQ.

Question: How would you release control of the record in a READ for UPDATE?
Answer: By issuing a REWRITE,DELETE, or UNLOCK command or by ending the task.

Question: How would you release control of the record in a READ for UPDATE?

Answer: By issuing a REWRITE,DELETE, or UNLOCK command or by ending the task.

Question: What is the difference between a RETURN with TRANSID and XCTL ?For example prog. A is
issuing REUTRN with TRANSID to prog B. Prog A. is issuing XCTL to prog B.

Answer: In RETURN with TRANSID the control goes to the CICS region and the user have to transfer the
control to prog. B by pressing any of the AID KEYS.In XCTL the control is directly transfer to prog. B.

Question: What is the maximum number of exceptions that can be specified with a single HANDLE
CONDITION command in CICS ?

Answer: SIXTEEN (16)

Question: WHAT WILL BE THE LENGTH OF THE EIBCALEN ,IF THE TRANSACTION IS USED TO CICS FIRST
TIME?

Answer: THE LENGTH WILL BE 0(ZERO)

Question: WHAT IS DFHEIBLK?

Answer: 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.

Question: What is the difference between the XCTL and LINK commands?

Answer: The LINK command anticipates return of control to the calling program, theXCTL command
does not. Return to the calling program will be the result of the CICS RETURN command, specifying
TRANSID(name of the calling program).

Question: What CICS command would you use to read a VSAM KSDS sequentially in ascending order?
Answer: 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 ofREADNEXT.

Question: What is the difference between pseudo-conversational and conversational?

Answer: 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.

Question: What is the COMMAREA(communications area)?

Answer: An area used to transfer data between diffrent programs or between subsequent executions of
the same program. Needs to be defined in the Linkage Section.

You might also like