Upload
srini8888
View
247
Download
5
Embed Size (px)
Citation preview
7/27/2019 CICS Complete
1/151
IBMMAINFRAMES.com
Complete Tutorial on CICS.
Presents
7/27/2019 CICS Complete
2/151
Copyright: IBMMAINFRAMES.com 2
PART I
INTRODUCTION TO CICS
7/27/2019 CICS Complete
3/151
Copyright: IBMMAINFRAMES.com 3
OBJECTIVES
Batch & Online systems
Why CICS?
CICS System components
CICS control program & tables
CICS startup and shutdown
7/27/2019 CICS Complete
4/151
Copyright: IBMMAINFRAMES.com 4
BATCH & ONLINE SYSTEM
ONLINE SYSTEM DEFINITION : ONLINE processing allows a user to interact with a computer andaccess its resources via a terminal Example : Railway Reservation system
Transaction file
Batch System
MASTER FILE
Batch System
REPORTS
DATABASE
OnlineSystem
Online System
Terminals
7/27/2019 CICS Complete
5/151
Copyright: IBMMAINFRAMES.com 5
BATCH & ONLINE SYSTEM
BATCH ONLINEInput Data from card tape, disk
Batched, sequential,scheduled
Data from terminalrandom, concurrent
Start of A job
Operator (or operating system)initiates the job. Other jobs inthe same region must wait.
Once CICS is initialized,entering transaction idtriggers the transactionto start.
Processing Mode
Single task single thread.Priority in job scheduling
Multi task multi thread.Priority processing.
End of job Each job Each transaction. OnceCICS is terminated, notransactions can beentered.
7/27/2019 CICS Complete
6/151
7/27/2019 CICS Complete
7/151
Copyright: IBMMAINFRAMES.com 7
WHAT IS CICS?
Customer Information Control System (CICS) wasdeveloped in 1960 by IBM
ONLINE CONTROL SYSTEM
General purpose data communication controlsystem
Provides services to handle all the specialrequirements for online processing
7/27/2019 CICS Complete
8/151
7/27/2019 CICS Complete
9/151
Copyright: IBMMAINFRAMES.com 9
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
7/27/2019 CICS Complete
10/151
7/27/2019 CICS Complete
11/151
Copyright: IBMMAINFRAMES.com 11
CICS CONTROL PROGRAMAND TABLES
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
7/27/2019 CICS Complete
12/151
Copyright: IBMMAINFRAMES.com 12
CICS CONTROL PROGRAMAND TABLES - Contd
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)
7/27/2019 CICS Complete
13/151
7/27/2019 CICS Complete
14/151
Copyright: IBMMAINFRAMES.com 14
CICS SHUTDOWN
Master terminal transaction is enteredwith shutdown option
CICS job produces various logs, statistics,dumps and other reports and ends
No transaction can be executed after that
7/27/2019 CICS Complete
15/151
Copyright: IBMMAINFRAMES.com 15
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.
7/27/2019 CICS Complete
16/151
Copyright: IBMMAINFRAMES.com 16
Chapter - 2
MAPS AND DISPLAYS
7/27/2019 CICS Complete
17/151
Copyright: IBMMAINFRAMES.com 17
INTRODUCTION TO BMS
To make the application program deviceindependent and format independent CICSprovides Basic Mapping Support (BMS)
BMS is a standard facility, to deal with theformatted screen operations
Screen defined through BMS is called a"MAP"
7/27/2019 CICS Complete
18/151
Copyright: IBMMAINFRAMES.com 18
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 andstarting position of each field to be read and allows BMS to interpretan input data stream
- For output operations it defines starting position, length, fieldcharacteristics
- (Attribute Bytes) and default data for each field, and allows BMSto construct an output data stream.
7/27/2019 CICS Complete
19/151
Copyright: IBMMAINFRAMES.com 19
PHYSICAL MAP GENERATION
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 intothe CICS load library
BMS MACRO
CODING ASSEMBLY LINK EDIT
LOADMODULE LOAD LIB
TO BE USEDBY CICS
7/27/2019 CICS Complete
20/151
Copyright: IBMMAINFRAMES.com 20
SYMBOLIC MAP
Ensures the device and format independenceto the application programs
A layout change in the formatted screen canbe done independent of the application programcoding as long as field name and length remain thesame
Symbolic map is included in the program by issuinga COBOL COPY statement
7/27/2019 CICS Complete
21/151
Copyright: IBMMAINFRAMES.com 21
USING MAPS IN A PROGRAMPROGRAM
SOURCE
TRANSLATOR
COMPILER
LINK EDIT
SYMBOLIC
MAP
Programload module
Physicalmap
7/27/2019 CICS Complete
22/151
Copyright: IBMMAINFRAMES.com 22
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 COPYlibrary
BMS
MACRO CODING ASS EMBLY SYMBOLIC MAP
DEFINITION
COPY LIB COPIED INTO CICS APPLICATIONPROGRAM USING COPY STATEMENT
7/27/2019 CICS Complete
23/151
Copyright: IBMMAINFRAMES.com 23
SYMBOLIC MAP SUFFIXES L
Halfward binaryContain the length of data entered by the terminaloperator
F One byte flag field
I Contains the data entered by the operator
A
One byte field that contains Attribute byte O
Contains data to be sent to terminal
7/27/2019 CICS Complete
24/151
Copyright: IBMMAINFRAMES.com 24
SYMBOLIC MAP FORMAT -Contd
A 12 byte TIOA prefix is automatically provided.
When performing input functions fields suffixedwith L, F, and Iare meaningful.
When performing OUTPUT functions, the fieldssuffixed with Aand O are meaningful.Containsthe data to be sent to the terminal.
7/27/2019 CICS Complete
25/151
Copyright: IBMMAINFRAMES.com 25
OUTPUT MAPPINGMAP ONLY
EXEC CICS SENDMAP (mapname 1 )
MAPSET (mapset 1 ) MAPONLY
END-EXEC
DATA ONLY EXEC CICS SEND
MAP (mapname 1 ) MAPSET (mapset 1 ) DATA ONLY.
END-EXEC.
7/27/2019 CICS Complete
26/151
Copyright: IBMMAINFRAMES.com 26
OUTPUT MAPPING
MAP ONLY option.
- Use the physical map only.
- Field headings, attribute bytes, and the locationof where all information is to be placed is sent.
DATA ONLY
- Use the symbolic map only - only the data in the symbolic map is sent to thescreen.
7/27/2019 CICS Complete
27/151
Copyright: IBMMAINFRAMES.com 27
OUTPUT MAPPING -Contd
Neither MAPONLY NOR DATAONLY EXEC CICS SEND
MAP (map -name1 ) MAPSET (mapset 1 )
END-EXEC
- The physical map and the data from symbolicmap is sent to the terminal.
7/27/2019 CICS Complete
28/151
7/27/2019 CICS Complete
29/151
Copyright: IBMMAINFRAMES.com 29
CURSOR POSITIONING
Static positioningIf 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.
7/27/2019 CICS Complete
30/151
Copyright: IBMMAINFRAMES.com 30
CURSOR POSITIONINGContd
E.g.. EXEC CICS SENDMAP (..) MAPSET (..)
CURSOR (100)ERASEEND-EXEC.
MAPFAIL condition will caused in RECEIVE MAPcommand.
- 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.
7/27/2019 CICS Complete
31/151
Copyright: IBMMAINFRAMES.com 31
ACCESSING ANDDISPLAYING MAP
FIELDS
7/27/2019 CICS Complete
32/151
Copyright: IBMMAINFRAMES.com 32
MAP STORAGE AREAS Placing maps in the Program
Any of the three plans for redefinition of maps may beused with either of the 2 alternatives for placing mapsin your program.
WORKING - STORAGE SECTION Copying a symbolic description map structure heremakes the area automatically available whenever theprogram is invoked.
LINKAGE SECTION Copying a symbolic description map structure here
does NOT mean the storage will be available. Somemethods for providing storage are passing aCOMMAREA, acquiring temporary storage with theSET option, or using a GET MAIN command.
7/27/2019 CICS Complete
33/151
7/27/2019 CICS Complete
34/151
7/27/2019 CICS Complete
35/151
Copyright: IBMMAINFRAMES.com 35
SEND / RECEIVE - ContdRECEIVING 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 symbolicdescription map in several ways:
7/27/2019 CICS Complete
36/151
7/27/2019 CICS Complete
37/151
Copyright: IBMMAINFRAMES.com 37
SEND / RECEIVE - ContdLinkage 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 storageand return a pointer to it. The symbolic description mapmust be in the LINKAGE SECTION.
7/27/2019 CICS Complete
38/151
Copyright: IBMMAINFRAMES.com 38
OUTBOUND FUNCTIONSSEND MAP (`MAPA') MAPSET (`SETA')
[ERASE/ ERASEAUP] [FREEKB] [ALARM] [FRSET] [PRINT]
ERASE-Erase Buffer, place cursor in upper left corner then write
or
ERASEAUP-Erase all the unprotected fields before the Write
FREEKB-Unlock Keyboard after the write
ALARM-Active alarm with the writeFRSET-Set all MDT currently on to off PRINT-Start the 3270 print operation.
OUTBOUND FUNCTIONS
7/27/2019 CICS Complete
39/151
Copyright: IBMMAINFRAMES.com 39
OUTBOUND FUNCTIONSControl 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 willNOT alter any attribute settings.
If you do not free the keyboard using FREEKB, the operator will have topress the RESET key before entering data.
If you code FRSET, all attribute bytes currently having Modified DataTags (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.
7/27/2019 CICS Complete
40/151
Copyright: IBMMAINFRAMES.com 40
OUTBOUND FUNCTIONS -Contd
Attributes : The `A' suffixed field is an attribute field which controls thefollowing : - 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 theEXTENDED ATTRIBUTES.
7/27/2019 CICS Complete
41/151
Copyright: IBMMAINFRAMES.com 41
EXTENDED ATTRIBUTES
DSATTS (for symbolic map) and MAPATTS (for physical map) support the extended attributecharacteristics
The MAPATTS allows you to set up the physicalmap with any of the characteristic(s) coded.
The DSATTS will create appropriate suffixed labels for theattribute characteristic(s) coded.
To illustrate the result of coding these parameters,the generated symbolic map follows.
7/27/2019 CICS Complete
42/151
Copyright: IBMMAINFRAMES.com 42
OUTBOUND FUNCTIONS The generated symbolic map:
- COPY MAPSETA, PART IWORKING-STORAGE SECTION. COPY MAPSETTA.
01 MAP1I.
02 FILLER PIC x(12). 02 NAMEL COMP PIC 39(4). 02 NAME F PICTURE x. 02 FILLER REDEFINES NAMEF.
02 NAMEA PICTURE x. 02 FILLER PIC X(5) 02 NAMEI PIC X(20).
7/27/2019 CICS Complete
43/151
Copyright: IBMMAINFRAMES.com 43
OUTBOUND FUNCTIONS -Contd
COPY MAPSETA, PART2 01 MAP10 REDEFINES MAP1I.
02 FILLER PIC x(12).
02 FILLER PICTURE x(3). 02 NAMEC PICTURE x. 02 NAMEP PICTURE x. 02 NAMEH PICTURE x.
02 NAMEU PICTURE x. 02 NAMET PICTURE x. 02 NAMEO PIC x(20).
INBOUND FUNCTIONS AID
7/27/2019 CICS Complete
44/151
Copyright: IBMMAINFRAMES.com 44
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 terminaloperator pressed is placed in the fieldEIBAID.
EIBAID/CURSOR
7/27/2019 CICS Complete
45/151
Copyright: IBMMAINFRAMES.com 45
EIBAID/CURSORWORKING-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 atransaction id, you can test EIBAID and/or EIBCPOSN. Thismay be done prior to issuing a RECEIVE command, if sochosen.
AID/CURSOR SAMPLE
7/27/2019 CICS Complete
46/151
Copyright: IBMMAINFRAMES.com 46
AID/CURSOR - SAMPLECODING (CONTROL)
If the operator uses any PA key or presses the CLEARkey, 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 isespecially useful with screens containing an action bar.
7/27/2019 CICS Complete
47/151
7/27/2019 CICS Complete
48/151
Copyright: IBMMAINFRAMES.com 48
CURSLOC - Contd
CURSLOC= YES allows you to determine after a RECEIVEMAP 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 willprovide a default for all the maps in that mapset. When CURSLOC=YES, BMS will set the `F' suffix field toX'02' indicating that field contained the cursor. If the cursor is in a field for which there is no symbolic label (i.e. aDFHMDF with no label the program will not be notified. Note : The `F' suffix field continues.
7/27/2019 CICS Complete
49/151
Copyright: IBMMAINFRAMES.com 49
CURSLOC - Contd
To be used to indicate the operator pressed theerase to end of fixed (EOF) key by being set toX'80'.
Therefore, if CURSLOC=YES it is possible to haveboth these conditions occur for the same field, in
which case the `F' suffix field will contain a X'82'.
7/27/2019 CICS Complete
50/151
Copyright: IBMMAINFRAMES.com 50
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 adefinition other than PIC x. PICIN AND PICOUT allowsthe user to use other COBOL PICS such as $,Z etc.
- If the date contains special characters, you may wantto remove them using the BIF DEEDIT command.
7/27/2019 CICS Complete
51/151
Copyright: IBMMAINFRAMES.com 51
PIC IN/PIC OUT
- If PICIN/PICOUT is not coded in the macro, the picgenerated is always PIC X (length of field)
- By using PICIN/PICOUT BMS can be forced togenerate the appropriate PIC.
- PICIN tells BMS how to move data into the `I' suffixfield.
- PICOUT tells COBOL how to edit your data move to the`O' suffix field.
7/27/2019 CICS Complete
52/151
Copyright: IBMMAINFRAMES.com 52
FIELD EDIT BUILT-INFUNCTION
Amount BIF Amount
$5431.80 EDIT 00543180
EXEC CICSBIF DEEDIT FIELD (amount) LENGTH (8)END-EXEC.
7/27/2019 CICS Complete
53/151
Copyright: IBMMAINFRAMES.com 53
FIELD EDIT- BIF DEEDIT is used to remove the special characters
from the input field.
The Amount field displayed has a dollar sign and adecimal point
By using BIF DEEDIT dollar sign and decimal point isremoved. Thus the number can be used for arithmeticoperations. COBOL compiler requires LENGTH specification:
VS COBOL-II uses the implied length of the data-areaused in the field parameter.
7/27/2019 CICS Complete
54/151
Copyright: IBMMAINFRAMES.com 54
CICS
PROGRAMCOMPONENTS
7/27/2019 CICS Complete
55/151
Copyright: IBMMAINFRAMES.com 55
OBJECTIVES
Structure of CICS Application Program CICS Management Functions Starting a Task
Conversational& Pseudoconversationaltransactions CICS Program preparation CICS Program testing & Debugging CICS commands Passing Data across tasks
STRUCTURE OF CICS
7/27/2019 CICS Complete
56/151
Copyright: IBMMAINFRAMES.com 56
STRUCTURE OF CICSAPPLICATION 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
STRUCTURE OF CICS APPLICATIO
7/27/2019 CICS Complete
57/151
Copyright: IBMMAINFRAMES.com 57
STRUCTURE OF CICS APPLICATIOPROGRAM - Contd
COBOL statements and CICS commands should becoded
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
STRUCTURE OF CICS
7/27/2019 CICS Complete
58/151
Copyright: IBMMAINFRAMES.com 58
STRUCTURE OF CICSAPPLICATION PROGRAM -
Contd
CALL statement is allowed if the calledprogram does not issue any CICS commands
or inhibited COBOL statements mentioned
above.
7/27/2019 CICS Complete
59/151
Copyright: IBMMAINFRAMES.com 59
TERMINATION STATEMENTS
Notes : This is not the way to terminate a CICS program. CICS has acommand for that purpose. Nevertheless, COBOL and VS COBOL IIhave three statements to conclude programs .
Control must not be allowed to pass beyond the last statement of aCICS Program.
CICSSYSTEM
CALLGOBACK
STOPRUN
GOBACKEXIT
PROGRAMSTOPRUN
CALLER
CALLED
7/27/2019 CICS Complete
60/151
Copyright: IBMMAINFRAMES.com 60
TERMINATION
STATEMENTS Contd
STOP RUN in COBOL uses operating systemfacilities, and therefore, is discouraged.
EXIT program is ignored if the program hasnot been called.
CICS RETURN COMMAND and/or GOBACKstatement is recommended.
7/27/2019 CICS Complete
61/151
DEFINITIONS
7/27/2019 CICS Complete
62/151
Copyright: IBMMAINFRAMES.com 62
DEFINITIONS Transactions
An exchange between a terminal and a database representing an application process. For example, an inquiry or a deposit and balanceupdate
Task A specific instance of a transaction i.e. a uniqueunit of work.
Program Prepared statements compiled or assembled intoan executable module of machine instructions.
CONVERSATIONAL
7/27/2019 CICS Complete
63/151
Copyright: IBMMAINFRAMES.com 63
CONVERSATIONALTRANSACTION
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
7/27/2019 CICS Complete
64/151
Copyright: IBMMAINFRAMES.com 64
PSEUDO CONVERSATIONAL
TRANSACTION The task is terminated after a message is sent
with a linkage for the next task. CICS provides afacility (COMMAREA) to made it easier toaccomplish this.
When the user completes response (by pressingenter) reset task is automatically initiated byCICS.
The task receives the message from the terminal& processes it.
This is a multitask operation from system's point
of view.
7/27/2019 CICS Complete
65/151
Copyright: IBMMAINFRAMES.com 65
CONCURRENT EXECUTION
The procedure Division represents the executableinstructions of a program. In CICS, tasks may concurrentlyuse the same program. The working storage section contains data items used by
the program, tasks cannot share data items; each taskrequires its own unique set of data items. Working storage is not the only type of storage maintainedby CICS for each executing task. The command level interface initialized each task copy of invoking storage according to the VALUE classes in theprogram before program gets control.
PROGRAM PREPARATION
7/27/2019 CICS Complete
66/151
Copyright: IBMMAINFRAMES.com 66
PROGRAM PREPARATION
.
Source
DB2Precompiler
CICSTranslator
COBOLCompiler
LinkEdit
LoadModule
7/27/2019 CICS Complete
67/151
Copyright: IBMMAINFRAMES.com 67
PROGRAM PREPARATION Contd
Running the DB2 precompiler first is the preferredmethod. DB2 precompiler precedes another process,binding, not mentioned here.
Output of the DB2 precompiler can serve as input to thetranslator.
Output of the translator will be input to the compiler.
Messages or warnings are provided on all the listings.
7/27/2019 CICS Complete
68/151
Copyright: IBMMAINFRAMES.com 68
PROGRAM PREPARATION Contd
TRANSLATOR- The translator recognizes EXEC CICS and EXEC DLI
statements. They are commented out and replaced withstatements in the appropriate language. Here, COBOLMOVE instructions and a CALL are inserted and passed onto the COBOL compiler.
DB2 Precompiler
- The DB2 precompiler is supplied by the relationaldata base managers, DB2 and SQL/DS. It recognizes EXECSQL statements which it will comment out and replace within our case. COBOL PERFORM and CALL statements.
7/27/2019 CICS Complete
69/151
Copyright: IBMMAINFRAMES.com 69
PROGRAM PREPARATION Contd
Output of the transaction is i/p to the compiler
The o/p of the linkage editor is executable. The loadmodule is placed in the CICS online program library.
Messages or warnings are provided on all the listings. Thecompiler listing is or limited use if the translator listing wouldnot process all commands.
TESTING
7/27/2019 CICS Complete
70/151
Copyright: IBMMAINFRAMES.com 70
TESTING
.
NewLoad Module
Old
Load Module
7/27/2019 CICS Complete
71/151
COMMON FORMAT
7/27/2019 CICS Complete
72/151
Copyright: IBMMAINFRAMES.com 72
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 codeif a period follows end-exec.
EXEC CICS SEND
Keywords Function Option Argument Option Argument
FROM (FLDA) LENGTH (5)END-EXEC
Delimeter
7/27/2019 CICS Complete
73/151
RECEIVE COMMAND
7/27/2019 CICS Complete
74/151
Copyright: IBMMAINFRAMES.com 74
RECEIVE COMMAND
EXEC CICS RECEIVEINTO (data area)LENGTH(ml)
END-EXEC
- RECEIVE command is used to receive incoming datafrom the terminal to which this CICS transaction isassociated.
- A receiving area must be defined in working storagesection and has to be specified in the INTO parameter.
- Length field must be defined in working storage sectionas a S9(4) comp. It has to be specified in length option.
SEND COMMAND
7/27/2019 CICS Complete
75/151
Copyright: IBMMAINFRAMES.com 75
SEND COMMAND
EXEC CICS SENDFROM (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 theFROM parameter.
- Length must be specified the same as that of theReceive command.
7/27/2019 CICS Complete
76/151
HANDLE CONDITION
7/27/2019 CICS Complete
77/151
Copyright: IBMMAINFRAMES.com 77
HANDLE CONDITION
Handle condition command is used to transfer control to the procedure label specified if theexceptional condition, specified occurs.
Remains active until the end of program or
another handle condition request overrides it.
IGNORE CONDITION
7/27/2019 CICS Complete
78/151
Copyright: IBMMAINFRAMES.com 78
IGNORE CONDITION
Ignore condition command causes no action tobe taken if the condition specified occurs in theprograms.
Request by the IGNORE CONDITIONcommand is valid until the subsequent HANDLE
CONDITION command for the same condition.
NO HANDLE OPTION
7/27/2019 CICS Complete
79/151
Copyright: IBMMAINFRAMES.com 79
NO HANDLE OPTION
If NOHANDLE option is specified in any CICScommand, no action will be taken for anyexceptional condition occurring during
execution of this command.
Eg : EXEC CICS SEND From (...) Length (...) NOHANDLE
END-EXEC
FORMATTING TIME AND DATE
7/27/2019 CICS Complete
80/151
Copyright: IBMMAINFRAMES.com 80
FORMATTING TIME AND DATE
ASKTIME Command
- used to request the current date and time
- EIBDATE and EIBTIME fields have the values at thetask initiation time.
FORMAT
EXEC CICS ASKTIME END-EXEC
FORMAT TIME COMMAND
7/27/2019 CICS Complete
81/151
Copyright: IBMMAINFRAMES.com 81
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)]
FORMAT TIME COMMAND Contd
7/27/2019 CICS Complete
82/151
Copyright: IBMMAINFRAMES.com 82
FORMAT TIME COMMAND Contd
- DATESEP represents data separator (default is "/").
- TIMESEP represents time separator (default is ":").
- The data area for the ABSTIME option of ASKTIME andFORMATTIME commands must be a 15-digit packeddecimal data type .
7/27/2019 CICS Complete
83/151
COMMAREA
7/27/2019 CICS Complete
84/151
Copyright: IBMMAINFRAMES.com 84
COMMAREA
- Passing data via the COMMAREA
- pseudo conversational task to task
- Linking program to program
PSEUDO CONVERSATIONAL
7/27/2019 CICS Complete
85/151
Copyright: IBMMAINFRAMES.com 85
PSEUDO CONVERSATIONAL
RETURN TRANSID will terminate the task and specify the nexttransaction ID as TRN2When the operator enters data, TRN2 will automatically start (a task willbe created) and the program program 2 will be invoked.
Program 1Send
ReturnTransid TRN 2
Program 2ReceiveSendReturn
TRN 1
TRN2
PCT ENTRIES
Program 1
Program 2
PASSING DATA TO NEXT TASK
7/27/2019 CICS Complete
86/151
Copyright: IBMMAINFRAMES.com 86
A commarea is a CICS maintained unit of storage for passing andreceiving data between CICS program
The first time a COMMAREA is passed. It must begin as an areastorage in the working storage section of the program passingcommarea. The RETURN statement has a parameter for passing a COMMAREA to theprogram associated with a subsequent transaction.
Procedure
ReturnTransid ('TRN2')Commarea (Constant)
Program 1
comstart
TRN1
Working Storage Copy
comstart
TRN2Program 2
Linkage
DFHcommarea
PASSING DATA TO NEXT
7/27/2019 CICS Complete
87/151
Copyright: IBMMAINFRAMES.com 87
TASK - Contd
The subsequent program (the receiver of the commarea)
MUST define DFHCOMMAREA in its LINKAGESECTION. Having done that, it will automatically haveaccess to all COMMAREA fields.
PSEUDO CONVERSATIONAL
7/27/2019 CICS Complete
88/151
Copyright: IBMMAINFRAMES.com 88
Notes :
This pseudo conversational design will invoke the same program for each
part of the conversation. - The Return transid will terminate the task and specify the next transaction. - When the operator enters data PAYR will automatically start (task will be
created) and the program PAYROLL will be invoked.
PayrollSendReturnTransid (Payr)
PayrollReceiveSendReturn
PAYR
PCT ENTRIES
PAYROLL
PASSING DATA TO NEXT TASK
7/27/2019 CICS Complete
89/151
Copyright: IBMMAINFRAMES.com 89
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 programassociated with the subsequent transaction. In this case, itself.
The subsequent program (in this case the same program) must define access to allthe commarea that was passed to it.
Procedure
ReturnTransid ('PAYR')
Commarea (Constant)
Pay Roll
comstart
PAYR
Working Storage
commarea
PAYRPAYROLL
LinkageDFHcommarea
7/27/2019 CICS Complete
90/151
EIBCALEN
7/27/2019 CICS Complete
91/151
Copyright: IBMMAINFRAMES.com 91
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 commareaparameter in the RETURN Transid.
- On subsequent entry, commarea exists and isautomatically made addressable by CICS in the linkagesection of DFHCOMMAREA
PASSING DATA USING
7/27/2019 CICS Complete
92/151
Copyright: IBMMAINFRAMES.com 92
LINK
To pass control from one program to another andthen return to the original like executing asubroutine.
The link command passes control to another program defined in CICS PPT expecting that theprogram will return to the linking program instructionfollowing the LINK command. This happens whenthe linked program issues a RETURN command.
PASSING DATA USING
7/27/2019 CICS Complete
93/151
Copyright: IBMMAINFRAMES.com 93
LINK - Contd Data may be passed using the commarea.
The commarea is shared between the two programregains control may changes made to the commarea bythe linked program are accessible.
The two programs executive under the same task.
The working storage section for the linking program isretained. Working storage for the linked program isautomatically released after its RETURN command isexecuted.
7/27/2019 CICS Complete
94/151
7/27/2019 CICS Complete
95/151
Copyright: IBMMAINFRAMES.com 95
Reading External Data
7/27/2019 CICS Complete
96/151
FUNCTIONAL OVERVIEW
7/27/2019 CICS Complete
97/151
Copyright: IBMMAINFRAMES.com 97
FUNCTIONAL OVERVIEW
FCT
FILEA
FCP
EIP
EXEC CICSREADFILE C ('FILE')EXEC SQL
PROGRAM
CICS AttachmentFacility
CICS RDB
Database
FUNCTIONAL OVERVIEW
7/27/2019 CICS Complete
98/151
Copyright: IBMMAINFRAMES.com 98
contd 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 filename in the FCT.
- Interface between CICS and Relational Database is called CICSattachment Facility. Statement are coded in SQL language in theapplication program to Communicate data requests to the database.
TOPICS
7/27/2019 CICS Complete
99/151
Copyright: IBMMAINFRAMES.com 99
TOPICS
DIRECT RETRIEVAL
- VSAM FILE RECORD
- RELATIONAL TABLE ROW
BROWSE
- VSAM FILE RECORDS- SET OF RELATIONAL TABLE WORKS
VSAM DATA STRUCTURES
7/27/2019 CICS Complete
100/151
Copyright: IBMMAINFRAMES.com 100
VSAM DATA STRUCTURES
CICS uses the following VSAM structures
- Key sequenced data set (KSDS)- Entry sequenced dataset (ESDS)- Relative record dataset (RRDS)
Sequential Keyed
3 5 9
Key = 5
Record 4
R1 R2 R3Relative record
PROGRAM ORGANIZATION
7/27/2019 CICS Complete
101/151
Copyright: IBMMAINFRAMES.com 101
File attributes are defined in the FCT for each fileFiles 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
R e c o r d l a y o u t D e f in i ti o n
R e c o r d k e y f il e d
L i n k a g e s e c t io n
Wo r k i n g S t o r a g e
E I B
P r o c e d u r e D i v i s io n
I D e n t r y k e y o f re c o r d t o b e r e a d
E X E C C I C S R e a d f ile . .. .
RECORD IDENTIFICATION
7/27/2019 CICS Complete
102/151
Copyright: IBMMAINFRAMES.com 102
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
7/27/2019 CICS Complete
103/151
Copyright: IBMMAINFRAMES.com 103
EXAMPLE
WORKING - STORAGE SECTION05 RECKEY PIC X(6)
PROCEDURE DIVISION
MOVE VALUE TO RECKEY
RIDFLD must be set to the value of the key of the record tobe retrieved.
RIDFLD must be large enough to hold a full record keyeven when a partial key is used.
READ COMMAND
7/27/2019 CICS Complete
104/151
Copyright: IBMMAINFRAMES.com 104
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.
F FORMATEXEC 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 thedata has to be placed.- RIDFLD is the key field.
LENGTH is half word binary. It indicates maximum length of therecord to be read. It is optional.
7/27/2019 CICS Complete
105/151
READ
7/27/2019 CICS Complete
106/151
Copyright: IBMMAINFRAMES.com 106
READ command with GENERIC OPTION
n Used to read a nonspecific record based on the generickey. (i.e. higher part of key) specified, instead of full key.
FORMATEXEC CICS READ
FILE (FILEAAA ) INTO (FILE-IOAREA)RIDFLD (REC-KEY)KEYLENGTH (3)GENERICLENGTH (WS-LEN)
END-EXEC
- KEY LENGTH specifies length of Generic key.
EXAMPLE
7/27/2019 CICS Complete
107/151
Copyright: IBMMAINFRAMES.com 107
MOVE 50 TO WS - LENMOVE BAG TO REC - KEY.EXEC CICS READ
DATASET (FILEAAA ) INTO (data-area)RIDFLD (REC-KEY)KEYLENGTH (3)GENERIC
LENGTH (WS-LEN)END-EXEC.
DATA IN FILE ARG 112 ARG 111BAG 110BAG 112 This record will be read as this is the firstTRG 111 record with generic key BAG
EXCEPTIONAL condition :INVREQ: Key length specified is greater than the actual key length of the record
READ COMMAND
7/27/2019 CICS Complete
108/151
Copyright: IBMMAINFRAMES.com 108
READ command with GTEQ option
- Used to read a non-specific record whose key is equal to or greater than the fullkey data specified.
FORMAT
EXEC CICS READFILE (FILEAAA ) INTO (data-area)RIDFLD (REC-KEY)GTEQ
7/27/2019 CICS Complete
109/151
Copyright: IBMMAINFRAMES.com 109
Establish position
STARTBR
RETRIEVE RECORD
READPREV READNEXTCHANGE POSITION
RESETBR
END BROWSE ENDBR
BROWSE
7/27/2019 CICS Complete
110/151
Copyright: IBMMAINFRAMES.com 110
BROWSE
- VSAM FILE RECORDS- Establish position- Retrieve and process records- Terminate browse
Record retrieved as a part of browse cannot beupdated during browse.
7/27/2019 CICS Complete
111/151
READNEXT
7/27/2019 CICS Complete
112/151
Copyright: IBMMAINFRAMES.com 112
READNEXT command
- Used to read a record of a file sequentially forward
- STARTBR must be successfully completed before READNEXTcommand
FORMATEXEC CICS READNEXT
FILE (name) | DATASET(name)INTO (data_area)LENGTH (data_value)RIDFLD (data_area)
END-EXEC.
EXCEPTIONAL CONDITIONS.
DUPKEY : If Duplicate record is found for key specified.ENDFILE : End of file detected.
LENGERR: Actual record length greater than the length specified
READPREV
7/27/2019 CICS Complete
113/151
Copyright: IBMMAINFRAMES.com 113
READPREV command
- Used to read a record of a file sequentially backward
- STARTBR must have been successfully completed beforeREADPREV command
Options and parameters are same as READNEXT command
EXCEPTIONAL Conditions
NOTFND: If no record is found for key specified
INVREQ: Generic option must not be used in the STARTBRcommand prior to READPREV command if used, thiscondition occur.
7/27/2019 CICS Complete
114/151
Copyright: IBMMAINFRAMES.com 114
ADDRESSABILITYTECHNIQUES
XCTL COMMAND
7/27/2019 CICS Complete
115/151
Copyright: IBMMAINFRAMES.com 115
EXEC CICS XCTLPROGRAM (PROGRAM NAME) RESP (EXCEPTION) END-EXEC.
IF EXCEPTION = DFHRESP (PGMIDERR)
a module given control through the use of a CICS XCTLcommand will not return to the program that issued the XCTL.
- The required. program name is character string constant (max8 characters)
- The PGMIDERR exception condition occurs when the name isnot in the PPT.
LOGICAL LEVELS
7/27/2019 CICS Complete
116/151
Copyright: IBMMAINFRAMES.com 116
Level 0 Level 1
Level 2
The linked to program runs at a new logical level andreturns to a logical level back to the linking program.
The linking program and its storage area remainavailable.
The CICS System
First ProgramLinking
Second Program
LOGICAL LEVELS - Contd
7/27/2019 CICS Complete
117/151
Copyright: IBMMAINFRAMES.com 117
Notes : To quit the repeated execution simply RETURN withoutthe TRANSID option. Any linked program could use the same COMMAREA of
the parameters so indicated. The transid & commarea option easy enough to use tomake this method practical.
Commarea
Link
Return
PROGRAMS TO PROGRAMTRANSITION
7/27/2019 CICS Complete
118/151
Copyright: IBMMAINFRAMES.com 118
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
7/27/2019 CICS Complete
119/151
Copyright: IBMMAINFRAMES.com 119
MENU WORKING STORAGE WORKING STORAGE
PROG MNU PROG BWS
Move Move
.
.
.
. INPUT MSG & INPUT LEN PARAMETERS USED WITH XCTL OR LINK.
Receiver uses EXEC CICS RECEIVE command .
.
MENU - IN IN-AREA
PROCEDURE..
RECEIVE INTO (INAREA)..RETURN
PROCEDURE.
. XCTL (PROG BWS)INPUT MSG (MENU-IN)
INPUT LEN (11)
PASSING DATA USING LINK
7/27/2019 CICS Complete
120/151
Copyright: IBMMAINFRAMES.com 120
AREA1 PIC x (200) dotted Linkage Section01 DFHCOMMAREA
05 AREA2 PIC X(200)
COMMAREA(AREA1) EIBCALEN=100LENGTH(100)
1ST Program - COMMAREA - Length 100
Data violation as 2nd Program (receives) tries to move 200 char
PASSING A COMMAREA WITH XCT
WORKING STORAGE WORKING STORAGE COPY
7/27/2019 CICS Complete
121/151
Copyright: IBMMAINFRAMES.com 121
COPY
PROG MNU PROG BWS
.
.
.
. If data is to be passed to the XCTLed program, aCOMMAREA can be used. Data area is to belocated in the Linkage Section of the receiving program.
COMMAREA used with RETURN, LINK & XCTL .
CONSTANT
LINKAGE SECTION
DFHCOMMAREA
PROCEDURE
RETURN
PROCEDURE
XCTL COMMAREA (COMSTART)
ADDRESSABILITY
7/27/2019 CICS Complete
122/151
Copyright: IBMMAINFRAMES.com 122
DFHCOMMAREA & DFHEIBLK : Addressable automatically by CICS
Dynamically acquired storage : Addressable by program
Not necessary to always do a EXECCICS GETMAIN explicitly
7/27/2019 CICS Complete
123/151
Copyright: IBMMAINFRAMES.com 123
CICS QUEUEING FACILITIES
CICS QUEUEING FACILITIES
7/27/2019 CICS Complete
124/151
Copyright: IBMMAINFRAMES.com 124
Two facilities to store data that are temporary innature.
This data is created or collected by one or moreonline transaction to be used later by the sametransaction 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
7/27/2019 CICS Complete
125/151
Copyright: IBMMAINFRAMES.com 125
They are identified by a 4 character ID calleddestination ID
Destination ID and other characteristics of TDQ aredefined in the destination control table (DCT) by thesystem programmer.
2 types of TDQ s
- Intra Partition TDQ
- Extra Partition TDQ
TRANSIENT DATA QUEUE -Contd
7/27/2019 CICS Complete
126/151
Copyright: IBMMAINFRAMES.com 126
Contd
Intra Partition TDQ - Processedonly within the same CICS region
Extra Partition TDQ - IndividualSequential Files processed between thetransaction of the CICS region and thesystem outside of the cics region
INTRA PARTITION TDQ
7/27/2019 CICS Complete
127/151
Copyright: IBMMAINFRAMES.com 127
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 onetask can read from TDQ.
INTRA PARTITION TDQ -Contd
7/27/2019 CICS Complete
128/151
Copyright: IBMMAINFRAMES.com 128
Contd
Intra Partition TDQ is used in application such as
Interface among CICS transaction. Applicati onprogram 1 TDQ Appl . Pgm 2
report
Automatic task Initiation (ATI)
Message routing
Message Broad cast.
EXTRA PARTITION TDQ
7/27/2019 CICS Complete
129/151
Copyright: IBMMAINFRAMES.com 129
Extra partition TDQ is a separate physical file & maybe a disk, tape or reporter.
DCT determines the initial open / close status of a
file while the file can be opened or closed through themaster terminal transaction during CICS session.
TDQ can be defined as an Input or output but not
both.
Records are fixed, variable, blocked or unblocked.
APPLICATION
7/27/2019 CICS Complete
130/151
Copyright: IBMMAINFRAMES.com 130
(1) Interface to batch, TSO, or PC) CICS Application TDQ -File
Batch prog
(2) Interface from Batch
Batch Prog File TDQCICS Appl PROG.
7/27/2019 CICS Complete
131/151
TRANSIENT DATA OUTPUT
7/27/2019 CICS Complete
132/151
Copyright: IBMMAINFRAMES.com 132
Appears only for Intra-partition TDQ.
Deletes all records associated with tthe named destination.
All associated storage is released.
EXCEPTIONAL CONDITIONS
7/27/2019 CICS Complete
133/151
Copyright: IBMMAINFRAMES.com 133
(i) Special handling required
LENGERR - length specified is greater than themaximum record length specified in DCT
Qzero - Destination empties or end of TDQ (ii) error
Qlderr - The dest ld specified cannot be foundin DCT.
LOGICAL LEVELS - Contd
7/27/2019 CICS Complete
134/151
Copyright: IBMMAINFRAMES.com 134
TS P
EXEC CICSREADQ / WRITE QTEPRSTOR
TS RECORDS
AUXILIARYTEMPORARYSTORAGE
VSAM (ESDS)
TEMPORARY STORAGEQUEUE - Contd
7/27/2019 CICS Complete
135/151
Copyright: IBMMAINFRAMES.com 135
QUEUE 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
7/27/2019 CICS Complete
136/151
Copyright: IBMMAINFRAMES.com 136
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.
7/27/2019 CICS Complete
137/151
DELETEQ TS of TSQ
7/27/2019 CICS Complete
138/151
Copyright: IBMMAINFRAMES.com 138
EXEC CICS DELETEQ TSQUEUE (NAME)
END-EXEC.
All records is TSQ are deleted.
All associated storage is released.
EXCEPTIONAL CONDITIONS
7/27/2019 CICS Complete
139/151
Copyright: IBMMAINFRAMES.com 139
(1) Special handling required
Itemerr - Item number specified is not in the range of entry number assigned for the Queue. Lengerr - Length specified is greater thanthe maximum record length.
(2) error Q iderr - specified is Queue id not found.
7/27/2019 CICS Complete
140/151
Copyright: IBMMAINFRAMES.com 140
TESTING & HANDLING
EXCEPTIONS
COMMANDS FOR TESTINGAPPLICATION PROGRAMS
7/27/2019 CICS Complete
141/151
Copyright: IBMMAINFRAMES.com 141
CECI (Command Level Interpreter) is aCICS - supplied transaction which performssyntax checking of a CICS command. If thesyntax is satisfied, it will execute the command. CEBR (Temporary Storage Browse) is aCICS - supplied transaction which browsesTemporary Storage Queue (TSQ).
CEDF is a CICS - supplied transactionwhich monitors the execution of an applicationprogram as an interactive debugging aid.
7/27/2019 CICS Complete
142/151
COMMAND LEVELINTERPRETER
7/27/2019 CICS Complete
143/151
Copyright: IBMMAINFRAMES.com 143
For invoking CECI, type CECI with the CICS commandto be interpreted.
The first screen lists all the possible CICS commands.
Giving question mark (?) before the command requestsa syntax check only. No execution.
Ex. CECI SEND MAP (`SPOOMPO')
MAPSET (`SPOOMSO') ERASE
BROWSING CICS QUEUES
7/27/2019 CICS Complete
144/151
Copyright: IBMMAINFRAMES.com 144
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 CEBRcommands on the screen. TS queues are retained until purged.
EXCEPTION HANDLINGCICS to respond to exceptional conditions in one of
7/27/2019 CICS Complete
145/151
Copyright: IBMMAINFRAMES.com 145
three ways:
RESP option: - The RESP option can be specified in any CICScommand. Its function is similar to the return code inthe batch program.
- Define a fullword binary field (S9(8)COMP) in theworking storage section as a response field. - Place the RESP option with the response filed in acommand. - After command execution, check the response
code in the response field with DFHRESP (xxxx), wherexxxx is the - NORMAL - Any exceptional condition
7/27/2019 CICS Complete
146/151
EXCEPTION HANDLINGHANDLE CONDITION
7/27/2019 CICS Complete
147/151
Copyright: IBMMAINFRAMES.com 147
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 specifiedoccurs in the program.
EXEC CICS HANDLE CONDITION Condition (Label) [Condition (Label)] [Error (Label)]
END-EXEC.or EXEC CICS IGNORE CONDITION
Condition[Condition]
END-EXEC.
EXCEPTION HANDLINGINTRODUCTION - Contd
7/27/2019 CICS Complete
148/151
Copyright: IBMMAINFRAMES.com 148
ABEND CODE
If an exceptional condition occurs during
execution of a CICS application programand if the program does not check theexceptional condition, CICS may continueexecuting the program or terminateabnormally the execution of the program,depe nding on the exceptional conditionand the command involved.
LOGICAL LEVELS - Contd
7/27/2019 CICS Complete
149/151
Copyright: IBMMAINFRAMES.com 149
EXEC CICSHANDLECONDITIONEND-EXEC
EXEC CICSIGNORECONDITIONEND-EXEC
CICS UPDATES
CONDITIONS
CICS UPDATESCONDITIONS
CONDITIONINVREQDUPRECENDFILEEOFQIDERRERROR
Application Program CICS-Maintainedcondition Table
OPTION FOR EXCEPTIONHANDLING
7/27/2019 CICS Complete
150/151
Copyright: IBMMAINFRAMES.com 150
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
COPYRIGHT
7/27/2019 CICS Complete
151/151
This product is licensed to
IBMMAINFRAMES.com. Reproduction or reusing without permission is strictly
prohibited.