CICS Overview
-
Upload
skyler-pierce -
Category
Documents
-
view
79 -
download
5
description
Transcript of CICS Overview
![Page 1: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/1.jpg)
CICS Overview
![Page 2: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/2.jpg)
04/19/23 2
Introduction
Customer Information Control System (CICS)
Runs on VSE/ESA, MVS/XA, MVS/ESA, MS/DOS or OS/2
Can be used with VSAM, IMS-DL/I, SQL/DS and DB2.
![Page 3: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/3.jpg)
04/19/23 3
Topics of Discussion Fundamentals Basic Mapping Support Maps & Display Addressability Techniques Error Handling in CICS CICS Queuing Facilities IBM supplied CICS transactions Command Summary
![Page 4: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/4.jpg)
04/19/23 4
Fundamentals Online vs. Batch Programs CICS Management Functions Multitasking & Multithreading Conversational & Psuedo
Conversational Programming Quasi reentrancy Task & Transaction Execution Interface Block COMMAREA Link & XCTL
![Page 5: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/5.jpg)
04/19/23 5
CICS Management Functions
Terminal Management Security Management Task Management Program Management File Management Queue Management Recovery Management System Services
![Page 6: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/6.jpg)
04/19/23 6
Terminal Control
End-User enters the transaction-id and presses the enter key.
VTAM receives the message and passes it to CICS.
Terminal Control accepts this input message and passes it to CICS.
TCT is referred to determine the terminal status.
![Page 7: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/7.jpg)
04/19/23 7
Task Control
A task is created to execute the transaction
All transactions are defined in PCT Task Control validates transactions
by checking the PCT, and passes the control to the correct application program.
Invalid Trans-id, error message shown.
![Page 8: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/8.jpg)
04/19/23 8
Program Control Program Control receives from the
Task Control. All Application Programs are
defined in the PPT. When Application Program is first
loaded, its address is also stored in PPT.
Only one copy of the program is loaded into the memory and many end-users can access it simultaneously
![Page 9: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/9.jpg)
04/19/23 9
User Application Programs PCP passes control to the
Application Program Application program now process
the input and issues commands to request services needed.
![Page 10: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/10.jpg)
04/19/23 10
BMS - Input
BMS simplifies programming for 3270 devices by providing Format & Device Independence.
Device Independence – Enabling AP to communicate with Terminal without knowing internal hardware control characteristics
Format Independence – Simplifies positioning of data on the terminal.
![Page 11: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/11.jpg)
04/19/23 11
File Control & Database Access Application program issues
command to retrieve data from a VSAM file/DB2 Table
All VSAM files are defined in FCT. CICS supports DB2 via SQL
commands.
![Page 12: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/12.jpg)
04/19/23 12
Journal Control If a record in a file or database is
changed, the change is registered in system log through Journal Control Facility to permit recovery in case of a failure.
When appropriately defined, journal processing is performed automatically.
The System Log is defined in JCT
![Page 13: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/13.jpg)
04/19/23 13
Temporary Storage Control Application program may need to
store info for later retrieval. Temporary Storage Facility will
facilitate such storage. An Application Program can use
CICS commands to write records to storage queue.
A TST is required for recovery purposes.
![Page 14: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/14.jpg)
04/19/23 14
Transient Data Control
Another CICS queuing facility. Records are stored in the order
they are written. Transient data has two types of
queues viz. IntraPartition & ExtraPartition.
DCT contains queue definitions
![Page 15: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/15.jpg)
04/19/23 15
BMS - Output
Application Program has to now extract the necessary fields from the VSAM file / DB2 table that it has read and set up a map output area to be sent to the terminal.
BMS Commands formats the fields for transmission to the terminal
BMS moves the data from the map area to terminal I/O area and terminal control will pass to VTAM.
![Page 16: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/16.jpg)
04/19/23 16
Ending the Transaction
The Transaction is ended by issuing the return Command
All storage allocated to this task is released and made available for use by other tasks.
![Page 17: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/17.jpg)
04/19/23 17
Multi-Tasking A single task will not keep CICS
busy, and hence CICS can accept input from many terminals.
When a currently executing task ends or waiting for I/O, another task is ready to execute.
Thus, CICS can run many tasks at a time and hence, Multi-tasking.
CICS decides, which ready-to-run task to execute depending on Task-dispatching.
![Page 18: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/18.jpg)
04/19/23 18
Multi-Threading
Because of Multi-Tasking, CICS loads one copy of the application program for each task.
Thus, many tasks share the use of the program i.e., they will multi-thread through the code.
Multi-Threading is totally transparent to the Application Programmer.
![Page 19: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/19.jpg)
04/19/23 19
Task Termination
When Program finishes processing for a given task, it returns control to CICS. All storage associated with the task is released except for program storage TIOA
![Page 20: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/20.jpg)
04/19/23 20
Conversational Design 1
Whole Dialogue takes place within one CICS transaction
It means all processing takes place in one CICS transaction
The transaction is initiated when the user requests the menu and is terminated when the final confirmation message is displayed.
![Page 21: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/21.jpg)
04/19/23 21
Conversational Design 2
Task has to wait for a longer time while the user thinks & keys data.
Contravenes two important CICS design rules: Tasks should exist in system for
minimum possible time Resources should be locked and
therefore unavailable for shortest possible time
![Page 22: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/22.jpg)
04/19/23 22
Pseudo-Conversational Design 1 Dialogue implemented as a
sequence of CICS tasks, where each task processes one message pair.
Task will terminate after sending a message to the terminal.
CICS RETURN command allows the programmer to preset the identifier to the next transaction.
![Page 23: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/23.jpg)
04/19/23 23
Pseudo-Conversational Design 2 This invokes a task automatically
when the next input message arrives from the terminal.
This task receives the user input, process it, SEND the next output screen and presets the next transaction to be executed.
Main benefit is that the task exists for the time taken to process a message pair.
![Page 24: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/24.jpg)
04/19/23 24
Pseudo-Conversational Design 3 Records are not locked across the
Conversation It is implemented as one
transaction to the user, but is actually implemented as more than one transaction to CICS.
This can be reduced to implement as one CICS transaction as well.
![Page 25: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/25.jpg)
04/19/23 25
Quasi-Reentrancy Reentrancy with in CICS
environment A Program which can reenter itself
and continue processing when interrupted is a reentrant program
CICS enables it by keeping all Static Variables in Working Storage & all Dynamic Variables in Dynamic Working Storage Sections.
![Page 26: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/26.jpg)
04/19/23 26
Execution Interface Block Lets the application developer to
Communicate with the Execute Interface Program
Contains Useful information about the terminal-id, task associated with, CICS command response code etc.
Used in application programs to access the information.
![Page 27: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/27.jpg)
04/19/23 27
COMMAREA Storage Areas outside the program
are accessed via the Linkage Section.
Done by coding DFHCOMMAREA in Linkage Section.
Should be the first variable. Used for data transfer. This is necessary while developing
pseudo conversational programs.
![Page 28: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/28.jpg)
04/19/23 28
Link & XCTL Commands
Used for Modularising the Design Link & XCTL are both used to pass
control from one CICS program to the other.
With Link, the Calling program expects control to come back to it from the Called program whereas the reverse is true with XCTL.
![Page 29: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/29.jpg)
04/19/23 29
Basic Mapping Support CICS used BMS to manage
terminal Input / Output BMS provides with a set of
Assembler Macros to define and manage Terminal Input / Output
Application Developer has to know to code two Assembler Commands (PRINT & END) and three BMS instructions (DFHMSD, DFHMDI & DFHMDF).
![Page 30: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/30.jpg)
04/19/23 30
MAP A map is just a set of code that is
used by CICS to construct the 3270 data stream format to send/receive from terminal. Maps can be developed through coding MACRO. Macro contains set of assembler commands.
MAP has two components Physical Map & Symbolic Map.
BMS macro has to be Assembled twice to create Physical as well as Symbolic Mapsets.
![Page 31: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/31.jpg)
04/19/23 31
Physical Map Physical map set is a load module
BMS uses to map data transmitted to and received from the display station.
In other words, it can be called as load of the map. It resides in program load library along with program loads.
The Physical Map is loaded when executing program requests Send or Receive BMS services.
![Page 32: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/32.jpg)
04/19/23 32
Symbolic Map - 1
Symbolic Map is a copy member that is copied into the program.
Defines the format of the screen data that is processed by the program.
Symbolic map resides in copy library.
![Page 33: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/33.jpg)
04/19/23 33
Symbolic Map - 2
Symbolic map is often refereed to as DESECT which is an assembler language.
A symbolic MAP will have data fields for the length, the attribute byte & data component for each data fields excluding constant fields.
![Page 34: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/34.jpg)
04/19/23 34
MAP Preparation
P H Y S IC A L M A PP U T IN L O A D L IB R A R Y
L IN K E D IT
A S S E B M L E R
S Y M B O L IC M A PC O P Y B O O K G E N E R A TE D
P U T IN C O P Y L IB R A R Y
A S S E M B L E R
M A P D E F M A C R O
![Page 35: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/35.jpg)
04/19/23 35
Example of IBM-created symbolic MAP01 EMPLIN1I.
02 FILLER PIC X (12).
02 EMPNAL COMP PIC S9(4).
02 EMPNAF PIC X.
02 FILLER REDEFINES EMPNAF.
03 EMPNAA PIC X.
02 EMPNAI PIC X(21).
01 EMPLIN1O REDEFINES EMPLIN1I.
02 FILLER PIC X(12).
02 FILLER PIC X(3).
02 EMPNAO PIC X(21).
![Page 36: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/36.jpg)
04/19/23 36
3270 Display Device Characteristics Data displayed by BMS on a 3270
terminal is organised into fields Each field is associated with
specific attributes that control its appearance and operation.
Field attributes of 3270s can be divided into two classes Standard Extended
![Page 37: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/37.jpg)
04/19/23 37
Standard Attributes Available on all 3270 models. Occupies the character location on
the screen that is immediately before the field it affects.
Specified by a single byte, called an attribute byte.
The three Standard attributes are: Protection Attribute Intensity Attribute Shift Attribute
![Page 38: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/38.jpg)
04/19/23 38
Extended Attributes Available on special 3270 models Don’t occupy positions on the
screen The four important Extended
Attributes are: Extended Colour Extended Highlighting Must-enter field Programmed Symbols
![Page 39: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/39.jpg)
04/19/23 39
Modified Data Tag Last Bit in the Attribute Byte Used to indicate whether the field
should be transmitted to the host system when the operator presses an AID key.
If MDT is ON (1), the field is sent. MDT can be turned ON/OFF
programmatically. Also used for Cursor Positioning
![Page 40: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/40.jpg)
04/19/23 40
Coding BMS Map sets BMS map set is an Assembler
Language program that consists of Macro Instructions.
When BMS macro is processed using JCL it generates Map load & Map copy book.
Assembler Language Coding rules are to be followed while coding BMS Macros.
![Page 41: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/41.jpg)
04/19/23 41
Rules for Coding Macros
Column 1: Label (up to 7 characters) Column 10 : Macro name, followed by at
least one space. Column 17-71 : Optional keywords, each
one separated by comma with no intervening spaces
Use continuation character * in 72 column for continuation
For a comment, code * in column 1
![Page 42: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/42.jpg)
04/19/23 42
MAP module structure
There are three macros to define a map.
DFHMSD - coded twice, this defines a MAPSET
DFHMDI - coded once for each map to be defined
DFHMDF - coded for each field to be defined.
![Page 43: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/43.jpg)
04/19/23 43
DFHMSD-MAPSET def Means provided by CICS to package
all MAPs that a given program might use.
Name in which the (physical map) & copybook (symbolic map) would be created.
Must be defined in PPT. Syntax:
MAPSET1 DFHMSD TYPE=MAP, *
MODE=INOUT
![Page 44: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/44.jpg)
04/19/23 44
Keywords for MAPSET TYPE=&SYSPARM|DSECT|
MAP| FINAL LANG=COBOL|ASM|PL1|C MODE=INOUT|IN|OUT TERM=term type|ALL TIOAPFX=YES|NO STORAGE=AUTO|BASE CTRL=FREEKB|ALARM|
FRSET| PRINT|length
![Page 45: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/45.jpg)
04/19/23 45
DFHMDI-MAP definition
Defines a map within a map set Supplies map’s name and other
useful information such as its size and position
Overrides defaults specified in DFHMSD macro.
![Page 46: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/46.jpg)
04/19/23 46
KEYWORDS for Map SIZE=(line,column) LINE=number COLUMN=number Justify = Left | Right Header = Yes | No Trailer = Yes | No EXTATT=Yes | No VALIDN = MUSTENTER |
MUSTFILL| TRIGGER
![Page 47: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/47.jpg)
04/19/23 47
DFHMDF - MAP FIELD definition Defines the map field by specifying
its position, length and attributes Actually defines an attribute byte. To define a Protected Field,
DFHMDF macro is coded once as it needs just one attribute byte
To define an Unprotected field, DFHMDF macro is coded twice, one to mark the beginning and the other to mark the end.
![Page 48: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/48.jpg)
04/19/23 48
MAP FIELD keywords POS = (line,column) LENGTH= number INITIAL=‘literal’ ATTRB= ASKIP |PROT |UNPROT
|BRT| DRK| NORM| NUM| FSET| IC
PICIN=‘COBOL PIC value’ PICOUT=‘COBOL PIC value’
![Page 49: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/49.jpg)
04/19/23 49
Overriding attributes on the screen You can manage the attributes of
fields from within your program. When changing the attribute of a
field, remember that you must not just specify the attribute to change; you must specify all attributes that apply to the field. This is because attribute are bit combinations that are prepackaged in the DFHBMSCA copybook.
![Page 50: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/50.jpg)
04/19/23 50
Assembler Commands
These statements are not required, but
they are very helpful in improving the
documentation of your listing of assembled
MAPs. TITLE - This causes a heading to
appear on each page of the assembled listing.
PRINT NOGEN - This statement tells the assembler that you do not want the generated code to appear on the listing.
![Page 51: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/51.jpg)
04/19/23 51
STOPPER fields BMS does not automatically generate
attribute byte to mark the end of an unprotected field.
The user have to do it himself using stopper field in macro otherwise the rest of the line beyond the length of the field will become unprotected.
So after every unprotected field an unlabeled stopper field must be defined with attribute parameter as ASKIP.
So if the operator keys to end of the field, the cursor will automatically skip to the next unprotected field.
![Page 52: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/52.jpg)
04/19/23 52
STOPPER field example
EMPNAME DFHMDF POS=(2,26)
LENGTH=5
ATTRB=(NORM,UNPROT),
DFHMDF POS=(2,32)
LENGTH=1
ATTRB=ASKIP
![Page 53: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/53.jpg)
04/19/23 53
Logical steps that occur during a SEND MAP CICS constructs the data stream
using MAP. Data fields containing LOW-VALES are not included.
Attribute bytes from symbolic MAP will replace those in physical MAP
The first length field in the symbolic MAP that is -1 becomes the cursor position, overriding any specified in MAP
Using options in the SEND MAP command, the data stream is sent to the terminal.
![Page 54: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/54.jpg)
04/19/23 54
Logical steps that occur during a RECEIVE MAP
CICS RECEIVES the terminal input when user presses AID (termination key)
CICS updates the EIB & then initiates the transaction identified for this terminal from the previous RETURN TRANSID command.
When the application issues a RECEIVE MAP command, CICS formats the data into the symbolic MAP identified in the RECEIVE command.
![Page 55: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/55.jpg)
04/19/23 55
SEND MAP COMMAND EXEC CICS
SEND MAP (name)
MAPSET (name)
FROM (data-value)
LENGTH (data-value)
DATAONLY|MAPONLY
ERASE|ERASEAUP
CURSOR (data-value)
FRSET
HANDLE|NOHANDLE|RESP
END-EXEC
![Page 56: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/56.jpg)
04/19/23 56
SEND MAP command Sends maps to the screen
Keywords used with SEND MAP are as follows: MAP (map name) FROM(data name) DATAONLY|MAPONLY MAPSET (Map set name) Cursor (Value) FREEKB, ALARM & FRSET ERASE|ERASEUP HANDLE|NOHANDLE|RESP
![Page 57: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/57.jpg)
04/19/23 57
Exceptional Conditions with a Send Command INVREQ LENGERR NOTALLOC TERMERR
![Page 58: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/58.jpg)
04/19/23 58
RECEIVE MAP Command
EXEC CICSRECEIVE MAP (name)
MAPSET (name)
INTO (data-area) | SET(pointer)
HANDLE|NOHANDLE|RESP
END-EXEC
![Page 59: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/59.jpg)
04/19/23 59
RECEIVE MAP command This command receives the data
values from the terminal
Keywords used with RECEIVE MAP are as follows:
MAP, MAPSET, HANDLE : same as in SEND MAP command
SET (pointer) INTO(data name)
![Page 60: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/60.jpg)
04/19/23 60
Exceptional Conditions for Receive Command INVMPSZ INVREQ MAPFAIL
![Page 61: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/61.jpg)
04/19/23 61
Attention Identifier Keys on IBM Mainframe Keyboard
All PF keys from PF1 through PF24 The PA1 & PA2 keys The CLEAR key The ENTER key
![Page 62: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/62.jpg)
04/19/23 62
Determining which Attention Identifier key is pressed
EIBAID in EIB.
If EIBAID = DFHPF3EXEC CICS RETURN END-EXEC
End-If Also Solves the MAPFAIL Error as
Follows: If EIBAID = DFHCLEAR
EXEC CICS SEND MAP End-If
![Page 63: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/63.jpg)
04/19/23 63
Controlling Cursor on SEND
There are various ways by which you can determine the cursor position they are as follows.
One way to do it is to use IC option with DFHMDF macro.
The second way is two use CURSOR (data value) on the SEND MAP command.
But the most popular option is to move -1 in the length field of the field in which you want to place the cursor before the SEND MAP command.
![Page 64: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/64.jpg)
04/19/23 64
CONTROLLING THE CURSOR ON RECEIVE MAP
EIBCPOSN.
cursor-position = (row -1) * 80 + column-position - 1
IF EIBCPOSN > 1130 AND < 1147
![Page 65: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/65.jpg)
04/19/23 65
Program - Program Communication in CICS
RETURN | RETURN with trans-id LINK XCTL
![Page 66: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/66.jpg)
04/19/23 66
RETURN COMMAND
RETURN |RETURN TRANSID(transid)
RETURN command returns control to CICS.
RETURN TRANSID command will give control to transid when the designated terminal enters data.
![Page 67: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/67.jpg)
04/19/23 67
RETURN COMMAND Syntax EXEC CICS
RETURN (transid(name)
COMMAREA (data-area)
IMMEDIATE
END-EXEC
![Page 68: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/68.jpg)
04/19/23 68
Exceptional Conditions with Return Command INVREQ LENGERR NOTAUTH
![Page 69: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/69.jpg)
04/19/23 69
LINK COMMAND
LINK PROGRAM (program name) When a program is invoked by a trans-id,
there are two logical levels. Program A runs at level 1. CICS is at highest logical level 0.
Application programs can use LINK command to invoke programs at levels lower to them.
Similarly while RETRUN command is issued the will pass to immediate superior level not to CICS
![Page 70: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/70.jpg)
04/19/23 70
LINK COMMAND Syntax
EXEC CICSLINK PROGRAM (name)
COMMAREA (data-area)
LENGTH (data-length)
TRANS-ID(name)
END-EXEC
![Page 71: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/71.jpg)
04/19/23 71
Exceptional Conditions with Link Command INVREQ LENGERR NOTAUTH PGMIDERR TERMERR
![Page 72: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/72.jpg)
04/19/23 72
XCTL COMMAND
XCTL PROGRAM (program-name) This command transfers control to
another program without setting up a return mechanism.
As a result control does not return to a program that issues XCTL command.
![Page 73: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/73.jpg)
04/19/23 73
Syntax of XCTL Command EXEC CICS
XCTL PROGRAM (name)
COMMAREA (data-area)
LENGTH (data-length)
END-EXEC.
![Page 74: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/74.jpg)
04/19/23 74
Exceptional Condition with XCTL Command INVREQ LENGERR NOTAUTH
![Page 75: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/75.jpg)
04/19/23 75
Program to program communications commands cont..
CICS
Program. A
Program B Program C
XCTL
LINK
RETURN (without transid)
RETURN(with or without transid)Start
Level 0:
Level 1:
Level 2:
![Page 76: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/76.jpg)
04/19/23 76
File Handling
CICS provides file handling COMMANDS for VSAM & DLI where as provide interface for SQL.
CICS provides file handling commands for following types of VSAM, KSDS, RRDS, ESDS.
![Page 77: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/77.jpg)
04/19/23 77
FCT Entries
Filename as Used in CICS and the DD Name
File Access Method Type of Request Permitted
Read/Browse/Update/Delete
![Page 78: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/78.jpg)
04/19/23 78
File Control Commands
READ WRITE REWRITE DELETE UNLOCK
![Page 79: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/79.jpg)
04/19/23 79
CICS Record Processing
Direct Using: Primary / Alternate Key in KSDS RBA for an ESDS RRN for RRDS
Sequential Skip-Sequential
![Page 80: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/80.jpg)
04/19/23 80
CICS READ Syntax
EXEC CICS
READ FILE (filename)
INTO (data-area)
LENGTH (length)
RIDFIELD (key)
UPDATE
END-EXEC
![Page 81: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/81.jpg)
04/19/23 81
CICS Generic Key Processing Used for both Random &
Sequential Requests. Additional Options that are Used
with GKP are: KEYLENGTH GENERIC GTEQ EQUAL
![Page 82: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/82.jpg)
04/19/23 82
CICS Sequential Browse Considerations Additonal Options used are:
STARTBR READNEXT READPREV ENDBR RESETBR
![Page 83: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/83.jpg)
04/19/23 83
CICS Skip-Sequential Considerations Key value moved into Key option
to initiate Skip-Sequential Reading Reading from the first record can
be started by moving LOW-VALUES to RIDFLD option of the STARTBR Command
RESETBR can be used to change characteristics of the Browse Operations
![Page 84: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/84.jpg)
04/19/23 84
CICS WRITE Syntax
EXEC CICS WRITE
FILE (file-name)
FROM (data area)
RIDFLD (key name)
LENGTH (longest record)
MASSINSERT
END-EXEC
![Page 85: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/85.jpg)
04/19/23 85
CICS UNLOCK Syntax
EXEC CICS UNLOCKFILE (file name)
END-EXEC
![Page 86: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/86.jpg)
04/19/23 86
CICS REWRITE Command EXEC CICS REWRITE
FILE (file name)
FROM (data area)
LENGTH (longest record)
END-EXEC
![Page 87: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/87.jpg)
04/19/23 87
CICS DELETE Command
EXEC CICS DELETEFILE (file name)
END-EXEC
![Page 88: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/88.jpg)
04/19/23 88
Advanced CICS
Communicating between tasks & programs
Dynamic allocation of memory Task control features
![Page 89: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/89.jpg)
04/19/23 89
Communicating between tasks & programs
Using DFHCOMMAREA Using Queues
![Page 90: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/90.jpg)
04/19/23 90
Using Queues QUEUES - CICS provides two two
types of queues
Transient Data Queue
Temporary Storage Queue
![Page 91: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/91.jpg)
04/19/23 91
Uses of Queues
Online Programs need scratchpad facility to save / retrieve data records Directly / Sequentially
Data can be transferred from One Program to another, One region to another using Queues
![Page 92: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/92.jpg)
04/19/23 92
Transient Data Queues
4 Character Destination ID Defined in DCT Sequential Retrieval Only Records cannot be Updated Types Include Intra Partition &
Extra Partition
![Page 93: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/93.jpg)
04/19/23 93
Intra Partition TDQ
Intra Partition refers to data on tapes for use in one or more programs running as separate tasks
Uses include: Message Switching Broadcasting Database Access Data Collection
![Page 94: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/94.jpg)
04/19/23 94
Extra Partition TDQ
Extra Partition TDQ reside on DASD that are accessible by programs that reside outside the CICS region
Uses include: Data Routing Data stored in EP TDQ is intended
to be used in other non-CICS programs
![Page 95: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/95.jpg)
04/19/23 95
Temporary Storage Queue 8 Character Data ID Created Dynamically Direct / Sequential Retrieval Records can be Updated Uses include:
Terminal Paging Suspended Dataset Pre-printed forms
![Page 96: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/96.jpg)
04/19/23 96
Using Queues cont.. CICS commands for Temporary Storage
Queues WRITEQ TS command - To add a record
to a temporary storage queue, you code this command. E.g
EXEC CICS
WRITEQ TS QUEUE (TSQ-NAME) FROM (TS-QUEUE-RECORD)
LENGTH(TS-QUEUE-LENGTH)
[ITEM NUMBER (TSQ-NUMBER)
REWRITE]
END-EXEC
![Page 97: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/97.jpg)
04/19/23 97
Using Queues cont..
READQ TS command - To retrieve records from temporary storage queue, you use the READQ TS command.
EXEC CICS
READQ TS QUEUE (TS-QUEUE-NAME)
INTO (TS-QUEUE-RECORD)
LENGTH(TS-QUEUE-LENGTH)
ITEM (TS-ITEM-NUMBER) NEXT
END-EXEC
![Page 98: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/98.jpg)
04/19/23 98
Using Queues cont..
DELETEQ TS - You must issue a DELETEQ TS command to delete a TSQ when you are finished processing it.
If you don’t, the queue remains indefinitely(till CICS is restarted) wasting valuable disk or main storage.
DELETEQ TS command deletes an entire TS queue - there is no way to delete a single record.
![Page 99: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/99.jpg)
04/19/23 99
IBM supplied CICS transactions IBM provides various transactions
which can be used to for Providing control information Setting control information Debugging Inquiry Logon/logoff
![Page 100: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/100.jpg)
04/19/23 100
CEDA
CEDA, CEDB & CEDC are similar CEDA has the most capacity & is
usually assigned only for system programmers because CEDA allows a user to assign, modify & install resources to a CICS system(I.e. updating of system tables.)
CEDB is as capable as CEDA with some minor changes.
CEDC is more a view facility of system information entered thru CEDA/CEDB.
![Page 101: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/101.jpg)
04/19/23 101
CEMT
The CEMT transaction is normally used by application programmers for maintenance of their work environment.
This includes verifying that files are allocated, opening or closing files, setting programs to enable or disable status, refreshing program & map loads & similar functions.
![Page 102: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/102.jpg)
04/19/23 102
CEDF
CEDF was designed to help programmers step through their work in a debugging mode.
CEDF does not trap each COBOL instruction, but focuses instead on every CICS command, showing the status both before & after executing the instruction.
![Page 103: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/103.jpg)
04/19/23 103
CECI & CECS
They are called command line interpreters. CECI executes command immediately.
CECS only ensure that you coded it correctly.
![Page 104: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/104.jpg)
04/19/23 104
CEBR
CEBR is designed to to let you browse existing storage queues & first searches for one named after your term-id with prefix as CEBR. E.g. your term-id is CT19 it would search for one named CEBRCT19.
![Page 105: CICS Overview](https://reader033.fdocuments.us/reader033/viewer/2022061612/56812eda550346895d947af0/html5/thumbnails/105.jpg)
04/19/23 105
CESN, CSSN & CESF
CESN - This transaction is used to logon to CICS.
CSSN - This is same as CESN CESF - This transaction is used to
log out off the CICS.