Sunteți pe pagina 1din 59

c 

› 

ñ ñ



ñ ñ

ñ ñ
CICS is a database/data communication (DB/DC) system.
Interface between operating system and application program.
CICS allows data to be transmitted from the terminal to the host computer, have data processed, access
files/data bases, and then have transmitted back to term


ñ ñ

ñ ñ
CICS is a database/data communication (DB/DC) system.
Interface between operating system and application program.
CICS allows data to be transmitted from the terminal to the host computer, have data processed, access
files/data bases, and then have transmitted back to terminal.
Provides control services necessary for online processing.


ñ ññ
There are 3 components of CICS. They are
Data communication services.
Data management services.
CICS management services.
ñ !
An interface between the terminals and printers with CICS via telecommunication access method
(TCAM or VTAM)
Free application programs from terminal hardware through BMS (Basic Mapping Support) which
provides
Device independence
Format independence
Multi-region operation (MRO), through which more than one CICS region of a system can communicate.
Intersystem communication (ISC), through which one CICS reign of a system can communicate with
other CICS region in other system.
" !
An interface with databases accesses methods such as DB2, DL/1 and VSAM.
An interface with error-checking and reporting facilities.
ñ ñ !
Program control, such as load and release of application programs.
Storage control, such as acquiring and freeing of storage.
Task control, such as scheduling based on task priority.
Transient data control

g 
     
c  › 
Temporary storage control
Dump control
Trace control
Journal control
# !
Interfaces with programming language such as COBOL and Assembler.
A Screen Definition Facility (SDF).
An Execution Diagnostic Facility (EDF).

ñ ñ"ñ $%&%$
In macro level programming, application programs use assembler-macro type CICS macros for
requesting CICS services.
ñ ññ "" $%&%$
In command level programming, CICS commands are used to request CICS services.
It simplifies programming, eliminating need to learn the internal structure & operation of CICS.
Here CICS automatically acquires a Unique copy of the working storage section of the application
program for each task. Therefor the application program does not have to acquire Dynamic Work
Storage ( DWS ) for each task.
In the case of application program is altered by the program itself during the execution of a program for
a task , the information of the program alteration will be kept in the Task Global Table ( TGT ) which is a
part of the program. This is how the Quasi rentrancy is ensured automatically thus taking away this
responsibility from the programmer and thus making his life easy.
' ñ ñ
ͻ Multi tasking
ͻ Multi threading
ͻ Quasi-reentrancy
ͻ Pseudo-conversation
ͻ Priority processing
ͻ Security processing
ͻ Recovery processing
ͻ Transaction driven

ñ$
ñ
CICS command language translator converts CICS commands into the statements, which can be,
understand by the compiler. It replaces CICS commands with host language CALL statements.



g 
    
c  › 

ñ(& $ %




 % 'ñ ñ##$ ñ
# ) "
The identification division should contain:
Program-id
Other commands, such as below, are optional, but recommended
AUTHOR
DATE-WRITTEN
DATE-COMPILED
REMARKS

%  *+
Only the header is required
No other entries, such as CONFIGURATION SECTION, INPUT-OUTPUT SECTION, FILE CONTROL, or
SELECT, are needed.
 *+
FILE SECTION (including FD, RD and SD ) not required.
WORKING-STORAGE SECTION is required. The length of working storage plus the length of task global
table (TGT) must not exceed 64k bytes.
LINKAGE SECTION optional.

# 
ACCEPT, CURRENT DATE, DATE, DAY, DISPLAY, EXHIBIT, STOP RUN, TRACE are not allowed.
Any I/O statements (OPEN, CLOSE, READ, WRITE, REWRITE, DELETE, and START) are not allowed.
REPORT WRITER, SORT features are not allowed.
A CICS application program must end with the CICS RETURN command or GOBACK command.
The CALL statement is allowed if the called program does not issue any CICS commands.
ñ  $%ñ
' ñ ñ
IDENTIFICATION DIVISION
PROGRAM-ID
REMARKS ABOUT THIS PROGRAM

g 
    
c  › 
ENVIRONMENT DIVISION
CONFIGURATION SECTION
INPUT- OUTPUT SECTION
DATA DIVISION
FILE SECTION
WORKING -STORAGE SECTION
LINKAGE SECTION
PROCEDURE DIVISION
'ñ ñ#  !
,: Develop a complete set of program specifications
-: Design the program
.! Create the necessary CICS table entries.
/!Prepare the BMS mapset
0: Code the Program
1! Compile the program
2! Test the program under CICS

ñ
$# ) "3
$%

ñ ññ#ñ ññ
4
Terminal Control Program (TCP) Terminal Control Table (TCT)
Task Control Program (KCP) Program Control Table (PCT)
Storage Control Program (SCP) --------------
File Control Program (FCP) File Control Table (FCT)
Basic Mapping Support (BMS) Terminal Control Table (TCT)
Program Control Program (PCP) Processing Program Table (PPT)
Temporary Storage Program (TSP) ----------------
Transient Data Program TDP) Destination Control Table (DCT)
Dump Control (DCP) --------------
Journal Control (JCP) Journal Control Table (JCT)
Interval Control (ICP) ----------------------
inal.

ñ
% ñ
EXEC CICS SEND
FROM(data-area)
LENGTH(data-value)
ERASE
WAIT
END-EXEC.

g 
    
c  › 
Writes data to a terminal from an application program.

LENGTH (half word binary field S9(4) COMP) indicates the length of the message to be sent.

With wait option, CICS will not return control to the application program until write operation has been
completed.

ERASE option erases all data on the screen prior to sending the message.
Exceptional condition to the SEND command.

LENGERR : An out of range or negative length value is specified.

%ñ% &%ñ
EXEC CICS RECEIVE
INTO(Data-Area) / SET (pointer-ref)
LENGTH(data-area)
ASIS
END-EXEC.

Reads data from a terminal into the application program.


When ASIS is specified, the message is received containing both upper and lower case data.
LENGTH indicates the length of the message to be received.
If input message is longer than the value specified in the data-area for LENGTH, the message is
truncated to that length, the data-area is updated to actual length of the input message received and
the LENGERR exception is raised.
LENGTH data-area must be defined as half word binary (S9(4) COMP).

%#
ñ

Produces hard copy of data currently displayed on the terminal


Format is:-
EXEC CICS ISSUE
PRINT
END-EXEC.

%ñ #
Used to copy a screen image of the terminal into the another terminal
Format is
EXEC CICS ISSUE
COPY
TERMID(name)

g 
    
c  › 
END-EXEC.
TERMID indicates the 1 to 4 character terminal id of the terminal to which the screen image is to copied.


%
 %
' % 5 6

Attention Identifier (AID) indicates which method the terminal operator had used to initiate the transfer
of information from the terminal device to CICS.

For 3270 terminals, ENTER KEY, CLEAR key, up to 3 attention keys (PA1-PA3) and 24 function keys (PF1-
PF24).

No data is transmitted when PA1, PA2, PA3 and clear keys are used. Should be used only when
application does not required input from terminal.

The following is an example of using AID information in a program.

IF EIBAID = DFHPF3
PERFORM END-ROUTINE
IF EIBAID = DFHPA1
PERFORM CANCEL-ROUTINE
IF EIBAID = DFHENTER
PERFORM NORMAL-ROUTINE
GO TO WRONG-EKY-ROUTINE

(ñ
Used to specify the label to which control is to be passed when the specified AID is received. Format is

EXEC CICS HANDLE AID


Option (Label)
END-EXEC

Options - ENTER, CLEAR PA1-PA3, PF1-PF24


Label - Name of the paragraph to which control is passed
ANKEY - Branches to the label for any key depressed other than the ones already specified in the
command.

Upto 16 options in a command can be is sued.

EXEC CICS HANDLE AID


PF3(END-ROUTINE)
PA1(CANCEL-ROUTINE)
ENTER(NORMAL-ROUTINE)

g 
    
c  › 
ANYKEY (WRONG-KEY-ROUTINE)
END-EXEC

EXEC CICS RECEIVE <=== This could be receive MAP


INTO (TERM-AREA)
LENGTH (MSG-LEN)
END ʹ EXEC

Execution Result: At the completion of the RECEIVE command, control will be passed to the appropriate
routine based on the key pressed, just the same as in the previous page IF EIBAID=DFHPF3


"
 ñ"## )##

Basic mapping support is CICS facility to deal with formatted screen operations.
Interface between CICS & the application program.

Makes the application program device and format independent.


A screen defined through BMS is called a map.

BMS map is nothing but a program written in assembler language.


A group of maps, which are linkedited together, is called a mapset.

Mapset must be registered in PPT.

Using Maps in a Program: Symbolic map should be copied into the program.

"# "

BMS provides assembler macros to define BMS mapsets, maps and fields with in maps

DFHMSD To define a map set


DFHMDI To define a map
DFHMDF To define a field

"

Col 1-7 Label


Col 8-13 Operation code
Col 16 onwards operands (Parameters separated by commas)

g 
    
c  › 
Col 72 Continuation ͙..X is used for this purpose
The continuation line must start in Col 16 or Onwards.

"

DFHMSD TYPE=DSECT or MAP <͙͙ A mapset


DFHMDI -------------- <͙͙.. A map
DFHMDF --------------
DFHMDF -------------- }fields

DFHMDI -------------- <͙͙.. A map


DFHMDF -------------- field
DFHMDF -------------- field

DFHMDI -------------- <͙͙.. A map


DFHMDF -------------- field
DFHMDF -------------- field

DFHMSD TYPE = FINAL


END

"

The DFHMSD macro is used to define a mapset and its characteristics or to end a mapset definition. The
map set name (1-7 characters) must be specified as the symbol to the DFHMSD macro.

The following are some of the commonly used options of the DFHMSD macro

TYPE = To define the map type.


DSECT For symbolic map
MAP For physical map
&SYSPARM used to assemble both physical map and symbolic map in one run

FINAL To indicate the end of the mapset coding

MODE

IN For the input map


OUT For output map
INOUT For the input output map

g 
    
c  › 
LANG= To define the language of application program (COBOL, ASM, PLL or RPG)
STORAGE=AUTO
To acquire a separate symbolic for each map area in a Mapset. STORAGE parameter is coded when
more than one map is defined in a Mapset. It indicates how storage will be allocated to the symbolic
map. Each symbolic map will have its own storage area STORAGE=AUTO is specified. If the STORAGE
parameter is omitted the Maps will be Redefining the same storage area.

TIOAPFX=YES To reserve the prefix space (12 bytes) for BMS commands to access TIOA properly in
order to skip over control characters. Failure to include this operand would cause the Map to mis
aligned when it is sent. It should be always YES for COBOL Maps.

CNTL = To define device control requests


FREEKB To unlock the keyboard
FSET To reset MDT to zero
ALARM To set an alarm at screen display ( at each output time ) time
PRINT To indicate the mapset to be sent to the printer.

TERM=ALL / 3270 / 3270-1 / 3270-2


Required if other than 3270 terminal is used. This ensures device independence by means of providing
suffix
SUFIX=nn To specify the user provided suffix number. This must correspond
to the TCT parameter.

Following is the basic example of DFHMSD macro

MAPAMEN DFHMSD TYPE=&SYSPARM X


MODE=INOUT X
LANG=COBOL X
STORAGE=AUTO X
TIOAPFX=YES X
CNTL=(FREEKB,FRSET,PRINT)

"

The DFHMDI macro is used to define a map and its characteristics in a mapset.
The Basic format of DFHMDI is
MAP DFHMDI SIZE = (line, column)
LINE = number
JUSTIFY=LEFT/RIGHT

g 
    
c  › 
Size is used to define the size of the map

LINE and COLUMN indicates the starting position of the maps

JUSTIFY is used to specify the map to be LEFT justified or right justified.

The combination of Size , Line ,column and justify makes a variety of maps such as follows

SIZE=(05,20),LINE=01,COLUMN=01,JUSTIFY=LEFT ͙͙͙͙͙͙͙.. a
SIZE=(05,20),LINE=06,COLUMN=20,JUSTIFY=LEFT ͙͙͙͙͙͙͙.. b
SIZE=(05,20),LINE=15,COLUMN=80,JUSTIFY=RIGHT ͙͙͙͙͙͙͙.. c

In addition to above parameters DFHMDI macro has the same options as specified in the DFHMSD
macro.

MAPAMEN DFHMDI SIZE=(24,80) X


LINE=1, X
COLUMN=1 X
JUSTIFY=LEFT

'

The DFHMDF macro is used to define in a map and its characteristics.


The Basic format of DFHMDF macro is

FIELD DFHMDF POS={number/(line, column)


LENGTH=number
JUSTIFY={LEFT/RIGHT} {BLANK/ZERO}
INITIAL = character data
ATTRB= ({ASKIP/PROT/UNPROT/NUM} {BRT/NORM/DRK}
{C} {FSET}
GRPNAME=Group name
OCCURS=number
PICIN=Value
PICOUT=Value
COLOR={DEFAULT/color}
HILIGHT={OFF/BLINK/REVERSE/UNDERLINE}

Field name is optional, the length of the field name is 1-7 characters.
POS indicates starting position of the field
LENGTH specifies the length of the field

g 
     
c  › 
INTITAL specifies initial value of the field
PICIN and PICOUT determine the picture clause of symbolic map in COBOL
ATTRB defines the attribute character of the field, which defines the characteristics of the field.

Attribute Character

The attribute character is an invisible 1-byte characters which precedes a screen field and determines
the characteristics of the field.

Some of the commonly used options are


ASKIP Autoskip. The data cannot be entered into the field the cursor skips to the
next field.

#
 Protected field. The data cannot be entered into the field.
 #
 Unprotected field. The data can be entered. This should be specified for all input fields.
" Numeric field. Only numeric (0to9) and special characters (͞.͟ And ͞.͟) are allowed.

Bright display
" Normal display
7 Dark display. This is useful for the password field.
ñ Initial cursor. The cursor will be positioned in this field. If IC is specified in more than one
field of a map, the cursor will be placed in the last field.
'%
 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 filed is actually modified by the user.
# ñ  Input symbolic map fields will be assigned a picture of X unless the PICIN operand defines the
Picture differently Ex. PICIN = ͚999999͛
# ñ 
Output symbolic map fields will be assigned a picture of X unless the PICIN operand defines
the Picture differently Ex. PICOUT = ͚$ZZ,ZZZ.99͛

*
Physical map.
Symbolic map.
Physical Map & Symbolic Map

#!
It is primarily used by CICS
The primary objective of the physical map is to ensure the device independence to the application
programs.
For input operations, the physical map defines maximum data length and starting position of each field
to be read.
For output operations the physical map defines starting position, length, field characteristics (Attribute
bytes) and default data for each field
Physical map is coded using BMS macros, assembled separately, and linkedited into the CICS load
library.

g 
     
c  › 
BMS macro --> Assembly ͙.> Link edit ͙..>
Coding
Load Module ͙.> LOADLIB͙.> to be used by CICS

SYMBOLIC MAP FOR MAPAUPD

01 MAP9UPDI.
02 FILLER PIC X(12).
02 EMPNOL COMP PIC S9(4).
02 EMPNOF PICTURE X.
02 FILLER REDEFINES EMPNOF.
03 EMPNOA PICTURE X.
02 EMPNOI PIC X(6).
02 FILLER PIC X.
02 EMPNAML COMP PIC S9(4).
02 EMPNAMF PICTURE X.
02 FILLER REDEFINES EMPNAMF.
03 EMPNAMA PICTURE X.
02 EMPNAMI PIC X(20).
02 FILLER PIC X.
02 EMPSEXL COMP PIC S9(4).
02 EMPSEXF PICTURE X.
02 FILLER REDEFINES EMPSEXF.
03 EMPSEXA PICTURE X.
02 EMPSEXI PIC X(1).
02 EMPAGEL COMP PIC S9(4).
02 EMPAGEF PICTURE X.
02 FILLER REDEFINES EMPAGEF.
03 EMPAGEA PICTURE X.
02 EMPAGEI PIC X(2).
02 FILLER PIC X.
02 MESSAGEL COMP PIC S9(4).
02 MESSAGEF PICTURE X.
02 FILLER REDEFINES MESSAGEF.
03 MESSAGEA PICTURE X.
02 MESSAGEI PIC X(60).
01 MAP9UPDO REDEFINES MAP9UPDI.
02 FILLER PIC X(12).
02 FILLER PICTURE X(3).
02 EMPNOO PIC X(6).
02 FILLER PIC X.
02 FILLER PICTURE X(3).
02 EMPNAMO PIC X(20).
02 FILLER PIC X.
02 FILLER PICTURE X(3).
02 EMPSEXO PIC X(1).

g 
     
c  › 
02 FILLER PICTURE X(3).
02 EMPAGEO PIC X(2).
02 FILLER PIC X.
02 FILLER PICTURE X(3).
02 MESSAGEO PIC X(60).

4"!

It is primarily used by application program


The primary objective of symbolic map is to ensure the device and format independence to the
application program.
Symbolic map is a copy lib member
It is coded using BMS macroes, assembled separately, cataloged into a copy library (COPYLIB) At the
time of application program compile, it will be copied into the application program.

BMS macro ͙͙> Assembly ͙͙> Symbolic ͙..> COPYLIB


Coding Map
Definition

Receive Map Command

EXEC CICS RECEIVE MAP (MAP name)


MAPSET (mapset-name)
INTO (data-area)/SET/(ptr-ref)
FROM (data-area)
ASIS
END-EXEC

The receive map command is used to receive a map from a terminal.

Exceptional condition is MAPFAIL.

This happens when the user presses the ENTER key without typing data and FSET is not specified to this
field in DFHMDF macro.

"ñ

EXEC CICS SEND MAP (mapname)


MAPSET(mapset-name)
DATAONLY/MAPONLY
FROM(data-area)
LENGTH(data-value)
ALARM
CURSOR (data-value)
ERASE
ERASE UP
FREEKB

g 
     
c  › 
FRSET
END-EXEC

The send map command is used to send a map to a terminal.

CURSOR makes the application program able to position the cursor


dynamically on any part of the screen.

ERASE Erases the current screen before displaying the map to be used.

ERASE UP To erase all unprotected fields

FREEKB To free the key board.

ALARM To make an alarm sound

FRSET To reset MDT to zero for all unprotected fields of the screen.

DATAONLY Only application program data in the symbolic map is to be sent to


the terminal.

MAPONLY Only the default data from the physical map is to be sent to the
terminal. If this option is specified FROM option must not be
specified.

["
8

MDT is one bit of the attribute character. If it is off ( 0) , it indicates that this field has not been modified
by the terminal operator. If it is On (1) it indicates that the field has been modified by the operator. Only
when the MDT is on will the field will be sent by the hardware to the application program. It is used to
reduce the data traffic and there by the performance.

CNTL=FRSET sets the MDT to 0.


CNTL=FSET at DFHMDGF macro field will ensure

TERMINAL CONTROL COMMANDS

Send Control Command

EXEC CICS SEND


CONTROL
[CURSOR/(data-value)]
[ERASE/ERASEUP]
[FREE KB]
[ALARM]
[FRSET]
END-EXEC

g 
     
c  › 
The SEND CONTROL command is used by an application program to dynamically establish the device
control option without actually sending the map.

CURSOR defines the relative cursor position in the screen, starting from zero. Other options have the
same functions as described in the SEND MAP command.

Eg: CICS EXEC SEND


CONTROL Screen will be cleared.
END-EXEC

CICS EXEC SEND


MAP(͙͙) Map specified will be displayed
MAPSET(-----)
END-EXEC

ñ  # 
)
%ñ( 9%

Cursor positioning can be controlled in 3 ways


Static Positioning:
In this approach IC is placed in the ATTRB parameter of the DFHMDF macro for a particular field. If there
are more than one field with IC specified in one map, the last IC would be honored.

EMPNO DFHMDF POS=(3,16)


ATTRB=(UNPROT,FSET,IC)
LENGTH=8

Dynamic/Symbolic Positioning:

In this approach -1 will be placed into the length field (fieldname+L) of the field where we wish to place
the cursor. The send map command to be issued must have cursor option and map set must be coded
with MODE=INOUT in the DFHMSD macro.

MOVE-1 to FLDL

EXEC CICS SEND


MAP(MAPAMEN)
MAPSET (MAPAMEN)
CURSOR
ERASE
END-EXEC

FLD is field defined in the map MAPAMEN

Dynamic/Relative Positioning:

In this approach, cursor is positioned dynamically through an application program using the cursor

g 
     
c  › 
(Value) option in the SEND MAP command with the value of the relative position (Starting from zero) of
the terminal.

EXEC CICS SEND


MAP (-----)
MAPSET (------)
CURSOR (100) ͙.> Cursor will be placed at position 100 of the terminal,
relative to zero at the beginning of the screen.
ERASE
END-EXEC.

# ) "ñ
$ñ "" 
# ) "ñ
$ñ "" 
LINK
XCTL
RETURN
LOAD
RELEASE

The CICS program control program (PCP) governs the flow of control among the CICS application
programs and CICS itself.

The name of the CICS application program must be registered in the processing program table (PPT).
$:ñ
EXEC CICS LINK
PROGRAM(name)
COMMAREA(data-name)
[LENGTH(data-value)]
END-EXEC

LINK command is used to pass control from an application program at one logical level to another
application at the next logical level.

The calling(LINKING) program expects control to be returned to it.

Data will be passed to called program thru a special communication area called COMMAREA.

Passing Data Using LINK


$ñ
EXEC CICS XCTL

g 
     
c  › 
PROGRAM(name)
[COMMAREA(data-name)]
[LENGTH(data-value)]
END-EXEC

XCTL command is used to pass control from one application program to another application program at
the same logical level.

The calling (XCTLint) program does nopt expect control to be returned.

Data will be passed to called program through a special communication area called OMMAREA.
XCTL command required less overhead,performance is relatively better in comparison to the LINK
command.

XCTL is the last executed instruction in a program.

The calling program is released by the task when control goes to Called program.

Common Exceptional Conditions occur during the execution of XCTL or LINK command are

NOAUTH - A resource security check has failed.


PGMIDERR - The program specified is not found in PPT.

%;ñ%#
$ñ

%;ñ%#
$ñ

Represents error or abnormal situation during last execution of CICS command.

HANDLE CONDITION
IGNORE CONDITION
NOHANDLE - option
RESP - option

( $%ñ

EXEC CICS HANDLE CONDITION
CONDITION (LABEL)
CONDITION (LABEL)
ERROR (LABEL)
END-EXEC.
The handle condition command is used to transfer control to the procedure label specified, If the
specified exception condition occurs.

g 
     
c  › 
We can specify up to 16 conditions in one command.

Usually placed at the beginning of the program.

To turn off the handle for a condition, specify the condition without label or use IGNORE command.
If any exception condition, which is not specified in the handle command occurs, then the control will be
transfer to the label specified in ERROR condition.
Handle condition is active from the time it is encountered till
The task terminates.
Another HANDLE command for that condition occurred.Ignore command for that condition occurred


<**$% )% % .
WORKING-STORAGE SECTION.
01 WK-TIOA
05 FILLER PIC X(50).
77 WK-LEN PIC S9(4) COMP.

PROCEDURE DIVISION.

EXEC CICS HANDLE CONDITION


ERROR (GENERAL-ERR-RTN)
LENGERR (LENGERR-RTN)
END-EXEC.

MOVE 20 TO WK-LEN
EXEC CICS RECEIVE
INTO (WK-TIOA)
LENGTH (WK-LEN)
END-EXEC.

LENGERR-RTN
MOVE 14 TO WK-LEN
MOVE ͚TOO MUCH DATA͛ TO WK-TIOA
EXEC CICS SEND
FROM (WK-TIOA)
LENGTH (WK-LEN)
END-EXEC.
GOTO TER-RTN.

GENERAL-ERR-RTN.

g 
     
c  › 
MOVE 20 TO WK-LEN
MOVE ͚OTHER ERROR OCCURRED͛ TO WK-TIOA
EXEC CICS SEND
FROM (WK-TIOA)
LENGTH (WK-LEN)
END-EXEC.

RET-RTN.
EXEC CICS RETURN

END-EXEC.

) %ñ
ñ

EXEC CICS IGNORE CONDITION


CONDITION
[CONDITION]
END-EXEC.

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

Control will be returned to the next instruction following the command, which encountered the
exceptional condition.

IGNORE CONDITION command is active from the time it encountered until handle command for that
condition occurred.

We can specify up to 16 conditions in one command.

EXEC CICS IGNORE CONDITION


LENGERR
END-EXEC.
EXEC CICS RECEIVE
INTO (- - - -
LENGTH (- - - -)
END-EXEC.

At the completion of RECEIVE command, if the LENGERR condition occurs, the condition will be ignored
and the control will be passed to next statement after the RECEIVE command.

g 
     
c  › 

% ñ

EXEC CICS ABEND


[ABCODE (name)]
END-EXEC.

Used to terminate a task intentionally, causing an ABEND.


ABCODE is used to specify the user abend code (1 to 4 characters).

#(# #ñ

The PUSH and POP commands are used to suspend and reactivate all HANDLE CONDITION requests
currently in effect.

PUSH and POP commands are useful while performing a 44

A called route can use a PUSH command to suspend the existing HANDLE CONDITION requests, before
returning control to the caller, the called routine can restore the original requests using POP command.

PUSH and POP commands can also be used to suspend and reactivate respectively, the HANDLE AID
command and AHNDLE ABEND command.

' $%ñ
$# ) "5'ñ#6
' $%ñ
$# ) "5'ñ#6
FCP provides application programs with services to read, update, add and delete records in a file. FCP
makes application programs independent of the structure of the database.
Opens all the files when CICS is initialized and close them when CICS terminates.
Gets exclusive control over resources during updates. Application program is free of all definitions of file
attributes as all information is in FCT.

' $%ñ
$= 

% ñ

EXEC CICS READ


DATASET(name)
INTO(data-area) / SET (pointer-ref)
LENGTH (data-area)
RIDFLD(data-area)
KEYLENGTH (data-area)

g 
    
c  › 
GENERIC
GETQ / EQUAL
UPDATE
RBA
RRN
END-EXEC

READ command is used to read a record from a direct access dataset.

DATASET option names the file as specified in FCT.

INTO option is used to read the record into data-area specified using the full key.

The READ command with the SET using the full key is used, CICS sets the address pointer to the address
of the record in the file input/output area with in CICS. The application program directly refer to the
record without moving the record content to the working storage area. This makes the

SET option provides a better performance than the INTO option.

RIDFLD (Record Identifier Field) used to specify the key of the record.

LENGTH option specifies length of the record to be retrieved.

GENERIC option is used to read a non specific record based on the generic key (higher part of the key)

KEYLENGTH option is mandatory with GENERIC and must specify the length of the partial key. If used
without GENERIC option, it must contain actual length of the full key.

GTEQ option is used to read a non-specific record whose key is equal or grater than the full key data
specified. Default is EQUAL.

UPDATE option is used, the record is read with the intention of updating it.

RRN (Relative record number) is used to read a record sequentially or randomly in VSAM RRDS file.

RRB is used to read a record sequentially or randomly in a VSAM ESDS file.

DUPKEY : A duplicate record is found in the specified key. The first record in the file witch has that key
will be read.

NOTFND : No record with the key specified is found.

g 
     
c  › 

LENGERR : The specified length is shorter than the actual record length. The record will be truncated at
the length specified and moved into the INTO field. The actual length will be placed in the LENGTH field.

%[
%ñ

EXEC CICS REWRITE


DATASET(name)
FROM(data-area)
LENGTH(data-value)
END-EXEC.

REWRITE command is used to update an existing record.

Record to be update must have been read with the UPDATE option.

Between READ and REWRITE commands, exclusive control over the will be maintained for this task, so
that no other tasks can access this record for updates. Due to this the interval between these two
commands should be as short as possible.

 $ ñ7ñ

EXEC CICS UNLOCK


DATASET(name)
END-EXEC.

Unlock command is used to release the exclusive control from the record
The READ command with the UPDATE option normally maintains exclusive control over the record read
until

The record is updated by the REWRITE command.

The transaction is normally or abnormally completed.

How ever, there are occasions when after reading a record through the READ command with the
UPDATE option, it is found that the update is not longer required. In this case, the application program
should release the exclusive control from the record so that the other tasks can access the same record.
To achieve this UNLOCK command is used.

[
%ñ

g 
    
c  › 
EXEC CICS WRITE
DATASET (name) / FILE (name)
FROM(data-area)
LENGTH(data-value)
RIDFLD(data-area)
MASSINSERT
END-EXEC.

WRITE command is used to add a new record to the file.

LENGTH option specifies the length of the record to be written. If not used, the data-area must be
exactly equal to the record size.

MASSINSERT option is used to add a group of records whose key are ascending order into a file.

MASSINSERT option causes exclusive control over the file, the file must be released by the \

UNLOCK command after the completion of the WRITE command.

%<ññ[
%ñ

DUPREC Duplicate record is found


NOSPACE No disk space is available for the record addition.
LENGERR The length specified is greater than the maximum length specified in the VSAM cluster.

%$%
%ñ

EXEC CICS DELETE


DATASET(name)
RIDFLD(data-area)
KEYLENGTH(data-value)
GENERIC
NUMERIC(data-area)
END-EXEC.

The delete command is used to delete one record or group of records from a file.

We have three approaches in DELETE command

1. DELETE after READ-UPDATE


2. Direct DELETE

g 
    
c  › 
3. Group record DELETE approach.

 
EXEC CICS READ
DATASET(name)
INTO(data-name)
RIDFLD(data-area)
LENGTH(data-len)
UPDATE
END-EXEC.

-------------

EXEC CICS DELETE


DATASET(name)
END-EXEC.

Here Delete command is issued without the record key information.

Exceptional condition to Delete command

INVREQ : The DELETE commands without the RIDFLD option is issued without prior READ/UPDATE
command.

 %$%
%*

EXEC CICS DELETE


DATASET(name)
RIDFLD(Data-area)
END-EXEC

In this approach, the DELETE command is issued with full key information in the RIDFLD field. The record
specified will be directly deleted from the file.

Exceptional conditions to the DELETE command

DUPKEY There is more than one record with the same key.
NOTFND The record specified is not found.

) %$%
%

g 
    
c  › 
WORKING-STORAGE SECTION.

77 WK-DEL-COUNT PIC S9(4) COMP.


77 REC-A-KEY PIC X(5).

PROCEDURE DIVISION.

MOVE ͚NY͛ to REC-A-KEY

EXEC CICS DELETE


DATASET(͚FILEAAA͛)
RIDFLD(REC-A-KEY)
KEYLENGTH(2)
GENERIC
NUMERIC(WK-DEL-COUNT)
END-EXEC.

In this approach DELETE command is issued with the GENERIC option.


A group of records, which satisfy the generic key specified, will be deleted from the file.
NUMERIC specifies number of records deleted by generic specified.
The length of the data-area specified in NUMERIC option is S9(4) COMP.

Exceptional condition is DELETE command

INVREQ : The key-length specified is greater than the actual key-length of the record.

 [ )ñ "" 




 ñ
EXEC CICS STARTBR
DATASET(name) / File(name)
RIDFLD(data-area)
GENERIC / GTEQ / EQUAL
END-EXEC.

Sequential access VSAM file under CICS is called Browsing.

The STARTBR command is used to establish a browse starting position for a file.

STARTBR does not read the data.

RIDFLD indicates the starting key on the record for the browse operation.

g 
    
c  › 

)
%9

If EQUAL is specified, and if no record is found for the exact key, the exceptional condition NOTFND
occurs.

The GENERIC key could be used in the similar manner to the READ command with the GENERIC option.

Exceptional conditions to the STARTBR command.

DSIDERR : The file specified is not found in FCT


NOTFND : The specified record is not found.

% %;
ñ

EXEC CICS READNEXT


DATASET(name)/FILE(name)
INTO(data-area)
LENGTH(data-value)
RIDFLD(data-area)
END-EXEC.

READNEXT command is used to read a record of a file sequentially forward

Before READNEXT, a STARTBR command must be issued, otherwise INVREQ exceptional condition is
raised

SET option can also be used instead of INTO option.

RIDFLD data area must be the same area as the one specified for STARTBR. However the contents of the
field may be changed. (It can only be greater than the last record used). This is referred to as skip
sequential process.

Exceptional conditions associated with REDNEXT command are

DUPKEY : The key of the record is a duplicate of the next record͛s key
ENDFILE : The end of the file detected.
LENGERR : The actual record length is greater than the length specified.

% # %&ñ

g 
    
c  › 
EXEC CICS READPREV
DATASET(name) / FILE(name)
INTO(data-area)
RIDFLD(data-area)
LENGTH(data-value)
END-EXEC.

READPREV command is used to read a record of a file backward.


The STARTBR command must have been successfully completed prior to issuing READPREV command.

Exceptional conditions associated with READPREV command.

INVREQ : The GENERIC option must not be used in the STARTBR command prior to READPREV
command. If the READPREV command is issued after the Generic STARTBR command, the INVREQ
exceptional condition occurs.
NOTFND : The specified record in STARTBR or RESETBR is not found.

%%
 ñ

EXEC CICS RESETBR


DATASET(name) / (FILE(name)
RIDFLD(data-area)
GTEQ / EQUAL / GENERIC
END-EXEC.

The RESETBR command is used to re-establish another starting point with in the same browse operation
against the same file.

The RESETBR command performs exactly the same function as the STARTBR command

Must be issued only if STARTBR has been previously issued.

RIDFLD provides the area where the new key is stored.

Used to change the characteristics of the browse operation. For example from generic key positioning to
full key positioning or vice versa.

Exceptional condition associated with RESETBR

INVREQ : The RESETBR command is issued without the prior STARTBR command

g 
    
c  › 
ENDBR command

EXEC CICS ENDBR


DATASET(name)
END-EXEC.

The ENDBR operation is used to terminate the browse operation, which was initiated by prior STARTBR
command.

+ &">% '

Similar to VSAM / KSDS file. VSAM/ESDS file can be read sequentially forward or backward using
STARTBR, READNEXT and READ PREV by using RBA option.

Define a full word BINARY field S9(8) COMP for RBA ( Relative Byte address)

ISSUE STARTBR command with EQUAL and RBA options

GTEQ option is not valid for VSAM/ESDS file

EQUAL option is used instead of GTEQ option.

The other options and parameters are same as the options specified in the STARTBR command for
VSAM/KSDS

9

9
The temporary program (TSP) provides the application program with an ability to do store and retrieve
the data in a temporary storage queue (TSQ)

TSQ can be used as scratch pad memory.

TSQ can be created and deleted dynamically by an application program without specifying anything in
CICS control tables.

Temporary storage queue which are to recovered in the event of failure should be registered in TST
(Temporary Storage Table)

A TSQ is identified by the queue id (1 to 8 bytes).

A record in a TSQ can be read any number of times, they can be read both sequentially and randomly

g 
    
c  › 
and records in a TSQ can also be updated.

TSQ can be written in the main storage or in the auxiliary storage. If the TSQ is written in main storage,
accessing TSQ is very fast but TSQ in this mode is not recoverable.

TSQ which is written in auxiliary storage (external VSAM file) can be recoverable.

[
%9
ñ

EXEC CICS WRITEQ


QUEUE (name)
FROM (data-area)
LENGTH (data-value)
ITEM (data-area)
REWRITE
MAIN / AUXILIARY
NOSUSPEND
END-EXEC.

The WRITEQ command is used to write a record (item) in a TSQ.

LENGTH indicates the length of data records. It is a half word binary (S9(4) COMP)
ITEM specifies the relative position number. It is defined as a half word binary (S9(4) COMP)
MAIN : specifies main storage.
AUXILIARY : specifies auxiliary storage. This is default.
REWRITE : Option is used to rewrite a record in a TSQ, which has been read.
NOSUSPEND : If no space is detected in the TSQ for the new record, CICS will return the control to the
next statement after the WRITEQ command instead of suspending the task if NOSUSPEND is specified in
the WRITEQ command.

At the end of the write command CICS places item number of the record written into ITEM parameter.

Exceptional condition to WRITEQ are:


NOSPACE Sufficient space is not available. The default action is suspend the task untill space is
available.

% 9
ñ

EXEC CICS READQ


QUEUE (name)
INTO (data-area) / SET (data-area)

g 
    
c  › 
LENGTH (data-area)
ITEM (data-value) / NEXT
END-EXEC.

The READQ command is used to read all the records in a TSQ sequentially or to read a particular record
randomly.

INTO determines the area to which the record data is to be placed.


LENGTH indicates the length of the record to be read.
ITEM indicates item number of the record to be read.
SET option can also be used instead of INTO option.

Other options of the READQ command is

NUMITEMS Specify NUMITEMS (data-area) in READQ command. The data area defined as S9(4) COMP.
At the completion of the read command, CICS will place the actual number of the records in the TSQ
specified.

NEXT if this option is specified, task will read the next sequential record in the TSQ
specified. This option should be used very carefully.

Exceptional conditions are


QIDERR : The specified QID is not found.
ITEMERR : The specified item number is not found. For sequential read it indicates end
of the queue.

%$%
%9
ñ

EXEC CICS DELETEQ TS


QUEUE (name)
END-EXEC.

The DELETEQ command is used to delete a TSQ entirely.


Cannot delete a single item from the TSQ.

Exceptional conditions are


QIDERR : The specified QID is not found.

ñ &% 
$ #% ñ &% 
$
%ñ( 9%
ñ 
A program accomplish a conversation by simply sending a message to the terminal waiting for the user

g 
    
c  › 
to respond and receiving the response from the terminal.

This is very inefficient way of conversing because program waits until the use responds and hold the
resources unnecessarily.

#=ñ "
In this, program will not wait until the user responds. Terminating the task every time the application
needs a response from the user and specifying the next transaction to be started when the end user
presses any6 attention key (enter PF1, PF24, PA1-PA3).
From the System point of view it is a Multi Tasking operation but from the User point of view it is a
Conversational method

There are 3 types of techniques for the above.

Technique 1 : Multiple transaction identifiers and multiple programs.


It involves many PCT entries and many PPT entries.
Easy to develop but increases the number of entries.

Technique 2 : Multipe transaction Identifiers but One program.


This involves many PCT entries but will have one PPT entry
Which contains many logical but one physical file.

Technique 3 : One trasnaction Identifier and One program. This is the most
Preferred technique. This contains one PCT entry for One PPT entry.
The physical program will have many logical programs with in it.
Every time the control is RETURNED to the same Transid.
To achieve the above EIBCALEN and COMMAREA is used in the program logic.

 "
Program does not involve any conversation. The transaction in this mode is one-way transaction for
output only, such as
Report writing
Message switching.


 ñ

7# ) "

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

g 
     
c  › 

:!
A specific instance of a transaction, that is a unique unit of work. Multiple terminals may invoke the
same transaction.

#!
A program is a set of instructions to perform some unit of work (i.e. CICS task).

'* 

1. Read input message :
- TCP gets control
- Validate terminal existence from TCT
- Through SCP acquire terminal input output area (TIOA) in the dynamic storage area (DSA)
- Updates TCTTE ( Terminal Entry of TCT ) with address of TIOA
- Requests initiation of task thru KCP

2. Start the transaction :


- KCP validates transaction by searching PCT
- Acquire any area (TWA) and assigns a task sequence number
- Links TCTTE & TCA with pointers
- Passes control to program control

3. Process the input :


- PCP checks PPT for load module
- Loads the program in DSA
- Creates a copy at working storage in DSA and links to TCA
- Application program gets control & reads input message from TIOA

4. Read the record :


- Application program calls FCP / Databases

5. Prepare the output :


- Application program calls TCP and sends the formatted message.

6. End the transaction :


- Task control releases all storage associated with this task.

7. Write the output :


- TCP sends output from TIOA to terminal as soon as communication line to terminal is free.
- Releases TIOA
- Begins polling for new transaction.


g 
    
c  › 
&* ñ ñ


By a Transaction identifier entered in a terminal with Enter Key.

By a transaction Identifier associated with a Terminal for Psuedo conversation.

By a START command which initiates a transaction specified in the Parameter.

By ATI . The destination control table entry for an intra partition transient data queue can have a trigger
level parameter and the associated CICS transaction to be initiated if the trigger level is reached.
By a 3270 attention identifier. For the IBM 3270 type terminals any of the PFKEYS and PA KEYS could be
defined in PCT to initiate a CICS transaction.

"$

7 ) "$

( % )

":!
Multitasking means that the operating system allows more than
one task to be executed concurrently,regardless of whether the
tasks use the same program or different programs.

"!
Multithreading is the system environment where the tasks are sharing the
same program under the multitasking environment. Multithreading is a subset
of multitasking ,since it concerns tasks which use the same program.
Under the multithreading environment ,a program is shared by several tasks
Concurrently .For each task ,the program( ie instructions and data area)must work as if it were executing
instructions exclusively for each task.Therefore,it requires special considerations such as reentrancy.


% &$ñ
$

% &$ñ
$
CICS interval control program (ICP) provides application program with time-controlled functions, such as
the time-oriented task synchronization, providing current data and time, and the automatic initiation of
the time oriented tasks.

Available commands are


ASKTIME To request the current date and time.
FORMATTIME To select a format of date and time.
DELAY To delay the processing of task.
START To start a transaction and store data for the task.
RETRIEVE To retrieve the data stored by the start command for a transaction.

g 
    
c  › 
CANCEL To cancel the effect of the previous interval control command.

7
"%ñ
EXEC CICS
ASKTIME
END-EXEC.
Used to request current data and time.
Upon completion of the command EIBDATE and EIBTIME fields will be updated to have the current data
and time.

' "

"%ñ
EXEC CICS FORMATTIME
[YYDDD (data-area)]
[YYMMDD (data-area)]
[YYDDMM (data-area)]
[MMDDYY (data-area)]
[DDMMYY (data-area)]
[DATESEP (data-value)]
[DAYOFWEEK (data-area)]
[DAYOFMONTH (data-area)]
[DAYOFYEAR (data-area)]
[YEAR (data-area)]
[TIME (data-area)]
[TIMESEP (data-area)]
END-EXEC.

Used to retrieve the information of date and time in various formats.

The default date separator (DATSEP) is ͚/ ͛

The default time separator (TIMESEP) is ͚: ͛

%$ñ
EXEC CICS DELAY
INTERVAL (hhmmss) / TIME (hhmmss)
REQID (name)
END-EXEC.

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

EXEC CICS DELAY

g 
    
c  › 
INTERVAL (1000)
REQID (͚KLMN͛)
END-EXEC.



ñ
EXEC CICS START
INTERVAL(hhmmsss) / TIME(hhmmss)
TRANSID(name)
REQID(name)
FROM(data-area)
LENGTH(data-value)
TERMID(name)
END-EXEC.
Used to start a transaction at the specified terminal and at the specified time or interval. Date can be
passed to the to-be-initiated transaction.

TRANSID Defines the transaction Id of a transaction which is to be initiated.

TERMID Defines the terminal id of a terminal in which the transaction is initiated.

TIME & INTERVAL


Indicates the time interval of the transaction initiation.
Other options used with START command are

RTRANSID To pass the transaction id (4 bytes) of the return transaction which


initiated the new transaction.

RTERMID To pass the terminal id (4 bytes) of the return terminal where the current
transaction is being executed.

QUEUE To pass the queue id(8 bytes) of a TSQ.

%
%&%ñ
EXEC CICS RETRIEVE
INTO(data-area)
LENGTH(data-value)
RTRANSID(name)
RTERMID(name)
QUEUE(name)
END-EXEC.

g 
    
c  › 
Used to retrieve the data passed by START command RTRANSID(4 BYTES), RTERMID(4 bytes) and QUEUE
( 8 bytes) define the fields to which the transaction id, terminal id, and QID passed by the START
command are to be placed.
The CICS task control program(KCP) provides functions of synchronization of task activities and exclusive
control of resources.

Available commands are

SUSPEND To Suspend a task


ENQ To gain exclusive control over a resource.
DEQ To release exclusive control from a resource.

#% ñ
#% ñ
EXEC CICS
SUSPEND
END-EXEC.
Used to suspend a task. During the execution of this command, the task will be suspended and control
will be given to other tasks with higher priority. As soon as higher priority task have been executed
control will be returned to the suspended task.

% 9 %9
The ENQ command is used to gain exclusive control over a resource.

EXEC CICS ENQ


RESOURCE(queue-id)
END-EXEC

The DEQ command is used to free the exclusive control over the resource.

EXEC CICS DEQ


RESOURCE(queue-id)
END-EXEC.

Other options are

LENGTH : If the resource is a character string, the LENGTH parameter must


be Specified in both ENQ and DEQ commands. The half word
binay (S9(4) COMP) must have the length of character string.

NOSUSPEND : If this option is specified, even if ENQBUSY condition occurs,

g 
    
c  › 
control will be returned to the statement after the ENQ command.

Exceptional condition to ENQ command is

ENQBUSY : The resource specified is reserved to another task. The task will be
Suspended until the resource is freed by other task.

ñ ñ
 ?

Execution Diagnostic facility (CEDF)


Command Level Interpreter ( CECI)
Temporary Storage Browse (CEBR)
MASTER Terminal Transaction ( CEMT)
CICS supplied Message and Codes ( CICS )
Logoff transaction (CESF)
Logon transactions(CESN,CSSN)

ñ$  5ñ%ñ 6

It is a CICS supplied transaction checks the syntax of CICS command. If the syntax is satisfied it will
actually execute the command.

CECI SEND MAP(MAPNAME)

*5ñ% 6

It is a CICS supplied transaction used to browse the temporary storage queue (TSQ).
It is a very convenient tool if we wish to display the content of TSQ when monitoring an application
program through EDF.

"

5ñ%"
6
It is a CICS supplied transaction, which manipulates the CICS environment such as transactions,
Programs, files, TSQ and tasks.

The CEMT transaction performs the following major functions.

INQUIRE : To inquire about the status of CICS environment.


SET : To update the status of CICS environment
Opens or closes the file
Enables or disables a transaction
Issues new copy.

g 
    
c  › 

ñ ñ
$ñ ñ
The following table lists all the transactions that are supplied with CICS.

 is the transaction identifier. # indicates the program that is specified in the supplied
transaction definition.

CEBR - temporary storage browse


Use the CEBR transaction to browse temporary storage queues and to delete them. You can also use
CEBR to transfer a transient data queue to temporary storage in order to look at its contents, and to
recreate the transient data queue when you have finished. The CEBR commands that perform these
transfers allow you to create and delete transient data queues as well.

ñ%
=5ñ ñ6
Use CEBT to control an alternate CICS system in an extended recovery facility (XRF) environment.

ñ%ñ == 


Use CECI, which invokes the CICS command-level interpreter, to enter an EXEC CICS command, check its
syntax, and modify it if necessary. In most cases, you can also process the command.

ñ% =
Use CEDA to define resources to your CICS system while the system is running. With CEDA, you can
update both the CICS system definition (CSD) file and the running CICS system.

ñ% 'ñ% ;=<
The CICS execution diagnostic facility (EDF) provides two transactions that you can use for testing
application programs.

g 
    
c  › 
ñ%"
@
Use CEMT to invoke all the master terminal functions.
The master terminal program provides dynamic user control of the CICS system.
By using this function, an operator can inquire about and change the values of parameters used by CICS,
alter the status of the system resources, terminate tasks, and shut down the CICS system.

ñ%"

You can construct a CEMT request in stages, or you can enter a complete request in one go. The CEMT
transaction checks the syntax of requests and diagnoses errors. If your request is syntactically correct, it
is processed immediately. If your request cannot be processed because of severe syntax errors, the full
syntax of your request is displayed.

ñ%"
 ñ 
The DISCARD command allows you to remove an installed resource definition and its corresponding
catalog entry from an active CICS system.

ñ%"
 9 %

ñ%"
#% ' "

ñ%"
%

The SET command changes the status of one or more named instances of a resource (such as a
terminal), a particular subgroup of resources (such as a class of terminals), or all resources of a particular
type (such as all terminals).

ñ%'=
Use the CESF transaction to sign off from the CICS system.

ñ% =

ñ%
=
Use CETR to control CICS tracing activity.

 "#ñ ñ


ñ ñ# 

%
Terminate a task abnormally.
ABEND terminates a task abnormally.
CICS releases the main storage that is associated with the terminated task; optionally, you can obtain a
dump of this storage first.

g 
    
c  › 
The following example shows how to terminate a task abnormally:

EXEC CICS ABEND


ABCODE('BCDE')

ñ9 %
Acquire access to a BTS activity from outside the process that contains it.

 %
Obtain access to CICS storage areas.

ADDRESS gets access to the following areas:


ͻ The communication area that is available to the invoked program (COMMAREA)
ͻ The common work area (CWA)
ͻ The EXEC interface block (EIB)
ͻ The terminal user area (TCTUA)
ͻ The transaction work area (TWA)

$$ ñ
%
ALLOCATE requests a conversation with a remote region. CICS returns the four-byte CONVID
(conversation identifier) in the EIBRSRCE field of the EIB. The application program uses the CONVID in all
subsequent commands that relate to the conversation.
If the session is not available, the application is suspended until one is available; this is the default
action.
7
"%
Request current date and time of day.
ASKTIME updates the date (EIBDATE) and CICS time-of-day clock (EIBTIME) fields in the EIB. These two
fields initially contain the date and time of when the task started.
 )
Request values from outside the application program's local environment.

ASSIGN obtains values from outside the local application program environment. The data that is
obtained depends on the specified options. You can specify up to 16 options in one ASSIGN command.

ñ ñ%$
Cancel interval control requests.
CANCEL cancels a previously issued DELAY, POST, or START command. The effect of the cancelation
varies depending on the type of command that is being canceled, as follows:

A DELAY command can be canceled only before it expires. The task that issued the DELAY command is
suspended for the duration of the request, so that it can be canceled only by another task. You must

g 
    
c  › 
specify the REQID that is used by the suspended task. Canceling the command has the same effect as
the early expiration of the original DELAY. The suspended task becomes dispatchable, as though the
expiration time of the original has been reached.
When a START command is to be canceled, you must specify the REQID of the original command. The
effect of the cancelation is as if the original command was never made. The cancelation is effective only
before the expiration of the original command. It is not possible to cancel a START command that is
currently locally queued.


ñ &%

"%
Converts an architected date and time stamp string to the ABSTIME format.

%$
Delay the processing of a task.
DELAY suspends the processing of the issuing task for a specified interval of time or until a specified time
of day.
The following example shows how to suspend the processing of a task for five minutes, using the
INTERVAL option:
EXEC CICS DELAY
INTERVAL(500)
REQID('GXLBZQMR')
The following example shows how to suspend the processing of a task until 12:45 p.m., using the TIME
option:
EXEC CICS DELAY
TIME(124500)
REQID('UNIQCODE')
%$%
%
Delete a record from a file Ͷ VSAM KSDS, VSAM RRDS, and data tables only.

DELETE deletes a record from a KSDS, a KSDS through an alternative index path, or an RRDS. The file can
be on a local or a remote system. Note that DELETE cannot delete
records from an ESDS. Three forms of this command are available:

You identify, in the RIDFLD option, the specific record that is to be deleted.

You can delete a group of records in a similar way with a single invocation of this command. You use the
GENERIC option to identify the group.

You can use a different form of this command to delete a single record that has previously been
retrieved for update (by a READ UPDATE command). The record is deleted, instead of being rewritten,
by this command. In this case, you must not specify the RIDFLD option.

g 
     
c  › 

The following example shows how to delete a group of records in a file:

EXEC CICS DELETE


FILE('MASTFILE')
RIDFLD(ACCTNO)
KEYLENGTH(4)
GENERIC
NUMREC(NUMDEL)

%$%
%9

Delete all transient data.

%$%
%9

Delete a temporary storage queue.

%9
Schedule use of a resource by a task (dequeue).

% 
End browse of a file.

% 9
Schedule use of a resource by a task (enqueue).

' "

"%
Transform absolute date and time into a specified format.

' %%
Return a terminal or logical unit.

' %%"
Release main storage acquired by a GETMAIN command.

)%
"
Get main storage.

HANDLE ABEND
Handle an abnormal termination exit.

g 
    
c  › 
( $%
Handle attention identifiers (AIDs).

( $%ñ

Handle conditions.

) %ñ

Ignore conditions.

%%
Abend the mapped conversation with an APPC partner.

%ñ #5.-2A6
Copy data from 3270 logical unit.

%#

Print displayed data on first available printer.

B  $
Create a journal record.

$ 7
Link to another program expecting return. The external CICS interface (EXCI) provides a LINK command
that performs all six commands of the interface in one invocation. See the CICS External Interfaces Guide
for information about the EXCI.

$ 
Load a program from the CICS DFHRPL concatenation library into main storage.

# #( $%
Restore the stack.

# 


Request notification when a specified time has expired.

# )%"%)%
Discontinue building a BMS logical message.

#(( $%

g 
    
c  › 
Suspend the stack.

%
Read a record from a file.

% %;

Read next record during a browse of a file.

% # %&
Read previous record during a file browse; VSAM and data tables only.

% 9

Read data from the transient data queue.

% 9

Read data from temporary storage queue.

%ñ% &%"#
Receive screen input into an application data area.

%$%%
Release a loaded program, table, or mapset.

%%

Reset start of browse.

%
%&%
Retrieve data stored for a task.

%

Return program control.

%[
%
Update a record in a file.

% ñ
$
Send device controls to a terminal without map or text data. The keywords are separated into those
supported by minimum, standard, and full BMS.

% "#
Send mapped output data to a terminal. The keywords are separated into those supported by minimum,

g 
    
c  › 
standard, and full BMS.

% #)%
Send last page of data. Only supplied by full BMS.

% #
%

This command is available on standard and full BMS only.

% 
%;

Send data without mapping. The keywords are separated into those supported by standard and full
BMS.

 ) ''
Sign off from a terminal.

 )
Sign on to a terminal.




Start task at a specified time.




Start browse of a file.

#%
Suspend a task.

 ñ#

Establish a syncpoint.

 ñ#
 $$ñ7
Back out to last syncpoint.

 $ ñ7
Release exclusive control.
[
%&%

Wait for an event to occur.

[
%
Write a record.

g 
    
c  › 
[
%9

Write data to transient data queue.

[
%9

Write data to a temporary storage queue.


$
Transfer program control.

 '( 4:
5 '( 6

The standard attention identifier list, DFHAID, simplifies the testing of the contents of the EIBAID field
after a Basic Mapping Support (BMS) or terminal control input operation. The following table shows the
symbolic name for each attention identifier (AID) value and the corresponding 3270 function.

You can get the standard attention identifier list by including the DFHAID copybook in your application
program:

For COBOL users, it consists of an 01 statement and a set of 02 statements that must be copied into the
working storage section, as follows:

ñ # '(

For C or C++ users, it consists of a series of defined constants that are included in the application
program as follows:

#include <dfhaid.h>

For PL/I users, it consists of DECLARE statements defining elementary character variables as follows:

%include DFHAID

g 
    
c  › 
 '( 


 '("ñ4:
'4

The standard list DFHBMSCA simplifies the provision of field attributes and printer control characters.

Bit map of attributes shows a bit map of attributes to help you do this. Attributes and orders can be set
only by their constant names or by their associated graphic values (for example, "A" for unprotected and
Modified Data Tag (MDT) set).

You can get the standard attribute and printer character control list by including the DFHBMSCA
copybook in your application program.

For COBOL users, it consists of an 01 statement and a set of 02 statements that must be copied into the
working storage section, as follows:

COPY DFHBMSCA

For C or C++ users, it consists of a series of defined constants that are included in the application
program as follows:

#include <dfhbmsca.h>

For PL/I users, it consists of DECLARE statements defining elementary character variables as follows:

g 
    
c  › 

%include DFHBMSCA;

You must use the symbolic name DFHDFT in the application structure to override a map attribute with
the default. On the other hand, to specify default values in a Set Attribute (SA) sequence in text build,
you should use the symbolic names DFHDFCOL, DFHBASE, or DFHDFHI.

4#ññ$ '("ñ

g 
    
c  › 

g 
    
c  › 

g 
    
c  › 


!

1 Ignored on TXSeries for Multiplatforms.


2 Use for constructing embedded Set Attribute (SA) orders in user text or for constructing datastreams
with Start Field Extended (SFE) orders.
3 Ignored by cicsterm but can be used for transaction routing to other terminals.

4

As an alternative to using the symbolic values that are given in Table 29, you can construct attribute
bytes by using the following table. For portability of applications between EBCDIC and ASCII systems, the
value in the char column should be used. Note that existing applications that have been developed on
an EBCDIC system can use the hexadecimal values that are listed in the EBCDIC column. These should be
changed to the char values to run on CICS.

4!

! Protection

!Selector pen detectable (see note)

>!Autoskip or numeric

! High intensity

: Non-display print

g 
     
c  › 

!Modified Data Tag

(<56!

%ñ ñ: Extended Binary-Coded Decimal Interchange Code

ñ : American National Standard Code for Information Interchange

! Graphic character equivalent to hex code

ñ444!

: Unprotected

: Numeric

(: High intensity

#: Protected

: Autoskip

: Yes

%;%ñ 4:
%;%ñ :

This information describes the fields of the EXEC Interface Block (EIB). An application program can read
all the fields in the EIB of the associated task by name, but must not change the contents of any of them.

For each field, the contents and format (for each of the application programming languages, COBOL, C,
C++, or PL/I) are given. All fields contain zeros in the absence of meaningful information. Fields are listed
in alphabetic sequence.

%  

This EIB field contains the attention identifier (AID) that is associated with the last terminal control or
Basic Mapping Support (BMS) input operation from a display device such as a terminal.
'ñ  $: PIC X(1)
'ññCC: For C: cics_char_t eibaid;

g 
    
c  › 
'#$> : CHAR(1)

% 

This EIB field indicates that the request/response unit (RU) contains attach header data (X'FF').
'ñ  $!PIC X(1)
'ññCC! cics_char_t eibatt;
'#$> !CHAR(1)

% ñ$% 

This EIB field contains the length of the communication area that has been passed to the application
program from the last program, using the COMMAREA and LENGTH options. If no communication area is
passed, this field contains zeros.
'ñ  $! PIC S9(4) COMP
'ññCC : cics_ushort_t eibcalen;
'#$> : FIXED BIN(15)

% ñ "#$

This EIB field indicates, on a terminal control RECEIVE or CONVERSE command, whether the data is
complete (X'FF'). If the NOTRUNCATE option has been used on the RECEIVE or CONVERSE command,
CICS retains data in excess of the amount that is requested via the LENGTH or MAXLENGTH option.
EIBRECV is set to indicate that further RECEIVE or CONVERSE commands are required. EIBCOMPL is not
set until the last of the data has been received.

EIBCOMPL is always set when a RECEIVE or CONVERSE command without the NOTRUNCATE option is
executed.
'ñ  $! PIC X(1)
'ññCC! cics_char_t eibcompl;
'#$> ! CHAR(1)

% ñ '

This EIB field indicates that the conversational partner has issued a CONFIRM request (X'FF') and that a
response is required.
'ñ  $! PIC X(1)
'ññCC: cics_char_t eibconf;
'#$> ! CHAR(1)

% ñ#  

g 
    
c  › 

This EIB field contains the cursor address (position) that is associated with the last terminal control or
Basic Mapping Support (BMS) input operation from a display device such as a terminal.
'ñ  $! PIC S9(4) COMP
'ññCC : cics_ushort_t eibcposn;
'#$> ! FIXED BIN(15)

%  
%

This EIB field contains the date the task is started (this field is updated by the ASKTIME command). The
date is in packed decimal form (0CYYDDD+) where C shows the century with values 0 for the 1900s and
1 for the 2000s. For example, the dates 31 December 1999 and 1 January 2000 have EIBDATE values of
0099365 and 0100001 respectively.

'ñ  $! PIC S9(7) COMP-3


'ññCC!cics_char_t eibdate [4];
'#$> !FIXED DEC(7,0)

%  

This EIB field contains the symbolic identifier of the last file that was referenced by a file control request.
'ñ  $! PIC X(8)
'ññCC! cics_char_t eibds [8];
'#$> !CHAR(8)

% % ñ

This EIB field is set to X'FF' after a successful advanced program-to-program communications (APPC)
RECEIVE or CONVERSE; otherwise it is not set. (An APPC conversation allows a program to send data to,
and receive data from, a program that is running in a remote system. Programming that uses APPC
conversations is called Distributed Transaction Programming (DTP). For guidance information on DTP,
refer to the TXSeries for Multiplatforms Intercommunication Guide.)

'ñ  $! PIC X(1)


'ññCC: cics_char_t eibeoc;
'#$> : CHAR(1)

% % 

This EIB field indicates that an abnormal condition has occurred (X'FF') on an APPC conversation. The
error code is in EIBERRCD.

g 
    
c  › 
'ñ  $!PIC X(1)
'ññCC! cics_char_t eiberr;
For PL/I: CHAR(1)

% % ñ 

This EIB field when EIBERR is set, contains the error code that has been received. The following values
can be returned in the first two bytes of EIBERRCD:
'ñ  $! PIC X(4)
'ññCC! cics_char_t eiberrcd [4];
'#$> ! CHAR(4)

% '"(

This EIB field indicates that the user data just received or retrieved contains an FMH (X'FF'). This cannot
arise in TXSeries for Multiplatforms, which always sets this field toX'00'.
'ñ  $! PIC X(1)
'ññCC : cics_char_t eibfmh;
'#$> !CHAR(1)

% ' 

This EIB field contains a code that identifies the last CICS command to be issued by the task (updated
when the requested function has been completed).
'ñ  $! PIC X(2)
'ññCC: cics_char_t eibfn [2];
'#$> :CHAR(2)

% ' %%

This EIB field indicates that the application program cannot continue using the facility. The receiver must
issue a FREE command for the conversation.
'ñ  $: PIC X(1)
'ññCC: cics_char_t eibfree;
'#$> : CHAR(1)

% $%$

This field, which is used for COBOL programs only, is used to contain values that relate to handled
conditions or abends. The values are:

g 
    
c  › 
ͻ 0: RETURN or XCTL
ͻ 1: Abend
ͻ 2 to nn: A value that identifies a label for a handled condition or abend

%  


This EIB field indicates that no data has been sent by the remote application (X'FF'). A message has been
received from the remote system that conveyed only control information. For example, if the remote
application executed a SEND command with a WAIT option, any data would be sent across the link. If
the remote application then executes a SEND INVITE command without using the FROM option to
transmit data at the same time, it would be necessary to send the INVITE instruction across the link by
itself. In this case, the receiving application finds EIBNODAT set. The use of this field is restricted to
application programs that
are holding conversations across APPC links only.

'ñ  $! PIC X(1)


'ññCC: cics_char_t eibnodat;
'#> ! CHAR(1)

%  ñ %

This EIB field contains the CICS response code that is returned after the function that was requested by
the last CICS command to be issued by the task has been completed.
For a normal response, this field contains hexadecimal zeros (X'00'). For COBOL programs only, almost
all the information that is in this field can be used within application programs by the HANDLE
CONDITION command.

'ñ  $: PIC X(6)


'ññCC: cics_char_t eibrcode [6];
'#$> ! CHAR(6)

The following list shows the EIBRCODE values that correspond to the conditions that can occur for each
group of commands (as indicated by byte 0 of EIBFN), together with the names of the associated
conditions.
For some conditions, further information is provided in EIBRCODE. This is indicated by a note that
follows the list of values.
For some commands (for example, INQUIRE and SET), byte 3 of EIBRCODE contains the hexadecimal
equivalent of the value in EIBRESP. Any further information that relates to conditions that are occurring
on these commands can be found in EIBRESP2 rather than EIBRCODE. The RESP2 values are given in the
descriptions of the individual commands.

g 
    
c  › 
%  %ñ&

This EIB field indicates that the application program is to continue receiving data from the facility by
executing RECEIVE commands (X'FF').
'ñ  $! PIC X(1)
'ññCC! cics_char_t eibrecv;
'#$> : CHAR(1)

%  %9 

This EIB field contains the request identifier that is assigned to an interval control command by CICS; this
field is not used when a request identifier is specified in the application program.
'ñ  $!PIC X(8)
'ññCC!cics_char_t eibreqid [8];
'#$> : CHAR(8)

%  %#

This EIB field contains a 32-bit binary number that corresponds to the condition that has occurred..
'ñ  $! PIC S9(8) COMP
'ññCC!cics_slong_t eibresp;
'#$> !FIXED BIN(31)

%  %#-

This EIB field contains more detailed information that can help explain why the condition that is
indicated by EIBRESP has occurred. For TXSeries for Multiplatforms, this field contains meaningful values
for SET commands only. The relevant values are documented with each command as applicable.
'ñ  $: PIC S9(8) COMP
'ññCC! cics_slong_t eibresp2;
'#$> ! FIXED BIN(31)

%  $ 7

This EIB field indicates that the remote transaction has sent SYNCPOINT ROLLBACK in response to a
SYNCPOINT request (X'FF'). The transaction that issued the SYNCPOINT command has been rolled back.
'ñ  $!PIC X(1)
'ññCC! cics_char_t eibrdbk;
'#$> ! CHAR(1)

%   ñ%

g 
    
c  › 

This EIB field contains the symbolic identifier of the resource that is being accessed by the last API
command to be issued by the task.
'ñ  $: PIC X(8)
'ññCC!cics_char_t eibrsrce [8];
'#$> !CHAR(8)

%  )

This EIB field indicates that the conversation partner has issued an ISSUE SIGNAL command (X'FF').
'ñ  $!PIC X(1)
'ññCC!cics_char_t eibsig;
'#$> ! CHAR(1)

%  ñ

This EIB field indicates that CICS syncpointing is in progress and that the application should issue a
SYNCPOINT command.
'ñ  $!PIC X(1)
'ññCC! cics_char_t eibsync;
'#$> !CHAR(1)

%  

This EIB field indicates that CICS syncpointing is in progress and that the application program should
issue a SYNCPOINT ROLLBACK command (X'FF'). This field is set only in application programs that are
holding a conversation on an APPC link.
'ñ  $! PIC X(1)
'ññCC!cics_char_t eibsynrb;
For PL/I: CHAR(1)

% 
7 

This EIB field contains the task number that is assigned to the task by CICS. This number appears in trace
entries that are generated while the task is in control.
'ñ  $! PIC S9(7) COMP-3
'ññCC! cics_char_t eibtaskn [4];
'#$> !FIXED DEC(7,0)

g 
    
c  › 
% 
"%
This EIB field contains the time at which the task is started (this field is updated by the ASKTIME
command). The time is in packed decimal form (0HHMMSS+).
'ñ  $! PIC S9(7) COMP-3
'ññCC!cics_char_t eibtime [4];
'#$> ! FIXED DEC(7,0)

% 
" 
This EIB field contains the name of the principal facility that is associated with the task. For a back-end
transaction, it is the conversation identifier (CONVID). This name must be acquired if the program states
explicitly the CONVID for the principal facility.
'ñ  $!PIC X(4)
'ññCC! cics_char_t eibtrmid [4];
'#$> ! CHAR(4)

% 


This EIB field contains the symbolic transaction identifier of the task.
'ñ  $!PIC X(4)
'ññCC! cics_char_t eibtrnid [4];
'#$> : CHAR(4)

g 
    

S-ar putea să vă placă și