Unit 1. Introduction
Unit 1. Introduction
Introduction
Overview
What is CICS Why it was developed ? CICS Concepts Components Of CICS CICS Management Functions CICS Transaction Flow
CICS
Customer
Information
Control
System
Notes : CICS was introduced in 1968. It is matured and well established. CICS has been enhanced with approx 15 major releases. CICS is a subsystem of MVS. CICS Applications are Platform Independence and portable.
What is CICS?
It acts as a interface b/w the application program & the Operating system.
Notes : CICS itself is not a DB/DC System unless Applications accompany it. CICS acts as an interface between Application Programs and Operating System as the DB/DC Control System. CICS is easy to use not only from an Application program point of view, but also from a system Programming point of view. This is one of the reasons why CICS is one of the most widely used DB/DC Control Systems. CICS provide the control and service functions of the Database/Data communication System as a package.
CICS Concept
The primary objective of CICS is to provide control & service functions of the DB / DC system as a package.
CICS is not a DB / DC unless the applications accompany it, because CICS provides only the control environment for the DB / DC system.
CICS is an interface between the application program and the Operating System.
Notes: CICS is general purpose transaction server. Transaction: Receive a message from a terminal, Access data from a file or a database and then send a reply back to the terminal. CICS provides many operating system-like functions.
Other Systems
Data Storage
Terminals
CICS/MVS System Services Data Handling Functions Monitoring Functions Application Program Services
Components of CICS
The 5 Major System components of CICS, which performs specialized services, are: Data Communication Functions. Data Handling Functions Application program services System Services Monitoring Functions
Data-Communication Functions
This component provides an interface between CICS and terminals or other systems. It acts as an interface to telecommunication access methods like VTAM, TCAM, BTAM, etc. It frees the application programs from terminal hardware through Basic mapping Support (BMS) thus providing device and format independence. It provides Multi Region Operation (MRO), through which more than one CICS region in a system can communicate. Provides Inter System Communication (ISC), through which a CICS region in a system can communicate with other CICS regions systems or other non-CICS regions in other systems or the other non-CICS systems. Notes: VTAM (Virtual Telecommunication Access Method) is responsible for the flow of message between the Operating System (MVS or VSE) and the network of terminals. VTAM and CICS run in separate address spaces under the control of Operating System. VTAM doesnt perform any Application Program activity. CICS doesnt perform any terminal input and output activity, it commands VTAM to do it.
The advantage of this separation is that, CICS and Application programs are isolated from changes in the Network.
Data-Handling Functions
Provides an interface between CICS and data.
Maintain data integrity by controlling simultaneous updates, providing data recovery facilities, etc.
Provides Execution Diagnostic Facility (EDF), Command Interpreter, (CECI), Screen Definition Facility (SDF), Trace and Dump facilities, etc.
Notes : CICS System supports many different user application programs. Loading and accessing these programs is controlled by this management function.
System Services
Provides an interface between CICS and operating system and carries out functions like loading and releasing of application programs, acquiring and freeing of storage, task scheduling, etc.
Notes : System services provides the functions such as Storage Management to control the storage acquired by the Application programs, Time Management to perform the Transactions in certain amount of time or after an elapsed period of time and Trace Management is useful for Problem Analysis.
Monitoring Functions
Provides the function for monitoring the various events within CICS and the necessary statistics for system fine tuning.
Queue Management
Recovery Management System Services Storage Management Time Management Trace Management
Application Program Interface (API)
System Services Provides such generalized services as: - Storage Management Acquiring storage when CICS transactions needs it. - Time Management A service that allows CICS transactions to request that certain actions be performed at a certain time of day, or after an elapsed period of time. - Trace Management A service that can be very helpful in problem determination. - Application Program Interface (API) A layer between application programs and CICS management functions.
Management Functions and their Tables Transaction Identifier Flow between application program and CICS
Notes : The following pages describe the CICS components and Transaction Flow.
Terminal Control
Terminal
Terminal Control
Notes : When a end user enters a transaction code and an account number at the terminal and pressed enter key, then VTAM receives the message and passes it to CICS. Terminal control accepts this input message from VTAM into a terminal input/output area (TIOA). The Terminal Control Table (TCT) will have an entry for each terminal (TCTTE), which contains definition of the terminal. It also stores operational data such as an indication that terminal is out of service.
Notes: All transactions are defined in the Program Control Table (PCT). Task Control validates transactions by checking the program control table, which lists all valid transaction ids and the associated programs, so that control may be transferred to the correct program. If an operator enters a valid transaction code, task control would not find it in the Program Control Table and an error message would be sent to the terminal. Many tasks can be processed concurrently (multi-tasking). Tasks are not usually processed through to completion in a single, uninterrupted operation. When the currently executing task has to wait e.g. for file i/o, a ready to run waiting task will receive control. To control each task, task control acquires a task control area (TCA), which is released when the task terminates. This is a CICS control block and is transparent to the application program.
Program Control
Terminal
Terminal Control
Task Control
Program Control
Notes: Task control passes control to program control, which keeps track of the location of all of the application programs. The Processing Program Table (PPT) contains the program size, program source language and other program information. When an application program is first loaded its address in the program library is stored in the PPT.This is done so that subsequent loading of the program is faster. The Processing Program Table also records a programs location in storage when loaded. Generally there is only one copy of a program in storage and many end users can be executing it simultaneously.
Terminal Control
Task Control
Program Control
Notes : Program control passes control to the application program, in this example to the program that handles the transaction code INQY. In summary, before control to the application program, CICS has read the input (INQY and account number) into a terminal I/O area, validated the transaction identifier and initiated a task. The application program may now process the input and issue commands to request services needed in performing the function of the application. CICS contains some sample programs, transactions and file so that you can run an application immediately after CICS installation. These programs could also be used for demonstrations.
Task Control
Program Control
Notes: Basic Mapping Support (BMS) simplifies programming for 3270 devices. It consists of supplied BMS modules and user defined screen maps. In the context of this transaction the next step is for the program to issue a BMS command to format and move the account number from the terminal i/o area to a map area in the working storage section of the application program. BMS provides device independence, which allows an application programmer to communicate with a terminal without having to understand its hardware control characteristics.BMS also provides format independence, which simplifies the positioning of data on the terminal.
Terminal Control
File Control
VSAM dataset
Task Control
Program Control
Notes: The application program issues a command to retrieve a record from a VSAM file. All VSAM and BDAM files are defined in the File Control Table (FCT). DB2: CICS supports access to IBMs relational database product via Structured Query Language (SQL) commands. It is available on numerous platforms.
Journal Control
Terminal
Basic Mapping Support File Control VSAM dataset
Terminal Control
Journal Control
Log File
Notes : If a record in a database or a file is changed then information about this change is automatically logged on the system log through the journal control facility. This logging will permit recovery in case of failure. When appropriately defined, journal processing is performed automatically. The system log is defined in the Journal Control Table (JCT). In CICS Transaction Server for OS/390 the journal control is performed by the system logger.
Trace Control
Terminal
Terminal Control
File Control
VSAM dataset
Log File
Notes: Tracing is a CICS debugging aid, which can be used to trace the processing path of an application program. It is invoked for each CICS command executed by the application program. Trace entries are written to the Trace Table (TRT). Programmers can place trace commands in application programs to help find a well-hidden bug. The trace table resides in storage and appears in CICS dumps. There is an option, auxiliary trace, to have the trace table written out to disk and there is a utility program to selectively print it. A further facility of CICS, known as the Executive Diagnostic Facility (EDF) enables a programmer to debug a program interactively at a terminal. In this case, the flow of the program can be stopped at a specified points, data areas examined and if necessary altered. Thus the program can be closely monitored and errors eliminated at the terminal.
File Control
VSAM dataset
Program Control
Journal Control
Trace Control
Log File
Dump Control
Dump File
Notes: If a serious error condition occurs, such as a program check, CICS will abend the task with a task dump. This facility can also be invoked by a command in the application program. This causes all taskrelated storage areas to the dump file. The dump utility program (DFHDUP) is a batch program that formats and prints the dump file.
File Control
VSAM dataset
Log File
Dump File
Notes:
The application program can use CICS commands to write records to a temporary storage queue which can be retrieved later in the same sequence in which they were stored, or directly by entry number. In a CICS run, all temporary storage records written to main storage are retained in CICS until purged by an application program or CICS is closed down. If records are written to disk temporary storage then they can be passed from one run of CICS to the next by an appropriate shutdown and start-up of the system. A temporary Storage Table(TST) is required for recovery purposes.
Terminal
File Control
VSAM dataset
Program Control
Journal Control
Log File
Dump Control
Dump File
Notes: Transient Data is another CICS queuing facility. Records are stored in the order that they are written, in a sequential queue for each defined queue, called a Transient Data destination. The Destination Control Table (DCT) contains the queue definitions.
Terminal Control
VSAM dataset
Task Control
Program Control
Journal Control
Log File
Dump Control
Dump File
Notes: A BMS command formats the field for transmission to the terminal. BMS moves the data from the map area to a terminal I/O area and terminal control will pass it to VTAM for transmission to the terminal.
File Control
VSAM dataset
Program Control
Journal Control
Log File
Dump Control
Dump File
Notes: The transaction is terminated by issuing the RETURN command. All storage allocated to this task is released and made available for use by other tasks.
INITIALISATION Terminal
Terminal Control Task Control TCA for TC Basic Mapping Support File Control
VSAM dataset
Terminal
Journal Control
Program Control
Log File
Terminal
Transient Data Control
Trace Control
Dump Control
Dump Control
Dump File
Notes: Most MVS sites run many CICS regions, some for production work and some for testing. The contents of each CICS system is controlled by the System Initialization Table. During Initialization the CICS code is loaded and the CICS tables are loaded. On completing Initialization Terminal Control starts to execute as a CICS task.
Objectives
Multitasking
Multithreading Reentrant and Quasi-Reentrant Programs Conversational and Pseudo Conversational Transactions Application Programming Logical levels
.
. . END-EXEC.
Notes: Function : CICS Service Request. Option : One of the options available to the command. Argument Value : Determines the characteristics of the value to be placed for the option as detailed Information. Each CICS command should end with a delimiter (END-EXEC)
The different programming languages that support CICS applications are: COBOL ASSEMBLER PL/1 C C++
Notes: CICS translator converts the EXEC CICS commands into CALL statements for a specific programming language. There are CICS translators for Assembler, PL/I, C, C++ and COBOL.
Syntax
For COBOL EXEC CICS END-EXEC. For PL/1 EXEC CICS ; For ASSEMBLER EXEC CICS
Multitasking
Execution of more than one task concurrently whether the task uses the same program or different programs.
CICS manages the multitasking of the CICS tasks within its own region.
CICS provides a multitasking environment where more than one CICS task or transaction can run at the same time. Multitasking is taken care by Scheduler of the operating system.
Notes: The work associated with the single terminal, that is a task, will not keep CICS very busy. Therefore CICS can accept input from many terminals, and when the currently executing task completes, or has to wait for file I/O, there is another task ready to execute. Therefore, within CICS there can be many tasks, hence the term Multi -tasking. Besides the task that is executing there may be other tasks that are ready to execute. Other tasks my be waiting for an I/O operation to complete. CICS decides which ready-to-run task is to be given control in a process known as task dispatching. The highest priority ready task is dispatched.
Multithreading
It is a system environment where the tasks are sharing the same program under the multitasking environment.
It is a subset of multitasking, since it concerns tasks which use the same program.
CICS provides the multithreading environment where more than one CICS Task, which uses the same Program, runs concurrently.
Notes: Many tasks can be present within CICS (multi-tasking), thus it is possible that more than one task may require the same application program e.g. there may be 4 terminals all making stock enquiries, CICS will create one task for each terminal and load one copy of the program. The 4 tasks will share the use of the program i.e. they will multi-thread through the code.
Reentrant Program
A program which does not modify itself so that it can reenter to itself and continue processing after an interruption by the operating system which, during the interruption, executes other OS tasks including OS tasks of the same program. It is also called as a reenterable program or serially reusable program. Reentrant programs are used by online system, and they make it possible for OS to establish the multitasking environment which most online systems require. A non-reentrant program is a program, which modifies itself so that it cannot Reenter to itself. Therefore it cannot be used in the multithreading environment. Batch programs are the typical examples of non-reentrant program.
Quasi-Reentrant Program
A Reentrant program under CICS environment is called as a Quasi-reentrant Program. It is a CICS program, which does not modify itself during execution. So it can reenter to itself and continue processing after an interruption by CICS.
The Quasi-reentrant program is a feature under the CICS/Multithreading environment. The difference between the Reentrant and Quasi-reentrant program is that whatever operations and functions that the operating system performs during a SVC in the case of Reentrant program is performed by CICS during a CICS command in the case of Quasi-reentrant program.
Conversational Transaction
A conversation is nothing but the interaction of the program with the terminal user. During the conversation program waits until the user responds, holding Resources unnecessarily. Only after the completion of the users response (i.e. pressing the ENTER Key) does the program proceed to the next processing. It is a very inefficient way of conversing with the user.
Notes: Transactions can be designed in one of two ways and, although the differences between them are not apparent to the end user, they will affect the way the program is coded and will have implications in other areas such as performance. If the application designer chooses the conversational approach then the whole dialogue takes place within one CICS transaction. This means that all processing takes place in one CICS task.
Pseudo-Conversational Transaction
In pseudo conversational transaction, when a program or transaction
attempts a conversation with a terminal user (i.e. sending a message, expecting a response from the user), it terminates the task after sending a message with a linkage for the next task or program. When the user completes the response (i.e. pressing the ENTER key), the next task (or program) is automatically initiated by CICS. This task receives the message from the terminal and process it.
From the system point of view, this is a multitask operation, whereas from the users point of view, this is a normal conversation. This is why it is called pseudo -conversational.
Notes: With pseudo-conversational design, the dialogue will be the same externally but will be implemented in a different way. Sequence of CICS tasks, where each task process one input and one output message, that is known as a message pair. The main benefit is that a task only exists at the time taken to process a message pair. This is short, a fraction of a second normally, compare to the seconds or even minutes taken by the user to think and enter data. It also means that records are not locked across the conversation.
Pseudo-Conversational Techniques
Notes: The programming methodology in which the task will not wait for the terminal users response, but frees the resources after sending the message is called a pseudo conversational technique. Terminating the task every time the application needs a response from the user and then starting the next transaction when the user presses any attention key is pseudo conversational processing.
Notes: Link command is used to pass control from an application program at one logical level to another application at next lower logical level. The calling (LINKing ) program expects control to be returned to it. Data can be passed to the called program through a special communication area called COMMAREA.
XCTL command is used to pass control from one application program to another application program at the same logical level. The calling (XCTLing) program does not expect control to be returned. data can be passed to the called program through a special communication area called COMMAREA.
Application Listing
Translator Listing
Assembler
Translator
Translated Source Program
Symbolic Map
Compiler Listing
Load Module
Notes: If an Application program has embedded SQL statements we have to precompile before going to translation.
Unit 3. MAPS
Objectives
Objectives of BMS
BMS Maps
Map Fields
BMS maps
Map is a screen defined through BMS.
A set of Assembler macros(BMS macros) are provided by CICS for the BMS map coding.
Notes: Normally a screen is divided into several fields by the program sending a screen map.
It is possible to have a screen with no fields i.e. with no attribute characters. The operator then types a character string, typically a transaction code and account number, into the blank screen and presses enter. BMS is not used to interpret this type of input.
Types of Maps
PHYSICAL MAP
MAP DEFINITION
MACROS
SYMBOLIC MAP
ASSEMBLER
ASSEMBLER
LINK EDIT
Physical map LOAD LIBRARY Notes: Physical Map and Symbolic Map Map Contents
Symbolic map
COPY LIBRARY
The physical map is a table of screen display field information.The symbolic map is a structure of field definitions in the specified programming language.Where Stored The physical map resides in the program load library.The symbolic description map resides in the COPY library.Where used The physical map set is loaded when an executing program specifies the name of the map set in a SEND or RECEIVE command. The symbolic map is placed in the source program by the compiler.
Physical Map
Physical Map defines Starting Position Length Field Characteristics (Attribute byte) Default data for each field
It Allows BMS to add BCCs and commands for output in order to construct an o/p NMDS. A Physical map will be in the form of a load module.
Notes: The physical map describes the format of the screen that the enduser uses to input data. The physical map represents Load module. The physical map contains the screen position, length, attribute and color for each field that is Displayed at the terminal, along with the terminal type.
Symbolic Map
A symbolic map is a copy library member which can be included in the application program for defining screen fields.
It defines the map fields used to store variable data referenced in COBOL program.
For each field name in DFHMDF macro BMS creates 3 fields for i/p and 3 fields for o/p by placing a character suffix to the original field name.
Notes: The symbolic map starts with the 01 level definition of map name defined in the DFHMDF macro with suffix I for input map an O for o/p map. Next a filler of pic x(12) which is the TIOAPrefix and is created if the option TIOAPFX=YES is specified in DFHMSD macro. The symbolic map represents copy book for map fields. A program using a map to send and receive data from a terminal, will copy a symbolic map into its working storage.
Name + F
Name + A
Name + I
Name + O
Notes: For each field, there are 3 definitions for input maps: NameL This is used to store the number of characters the user typed into the field NameF This is a flag byte and is normally set to X00. NameI This contains the input data as read from the display. And 2 definitions for output maps: NameA This gives programmers access to the attribute byte so they can change the display characteristics of a field. NameO This stores the output data to be sent to the display.
DFHMSD
DFHMDI
DFHMDF
Notes:
You can define a CICS map using BMS Assembler macros, the three macros shown above. Together, they are used to define the overall characteristics of the map and the way in which data is presented. This includes: The name of the map, its size and the name of the mapset to which it belongs. The language of the program it will be used in Screen and keyboard control information.
DFHMSD Macro
Syntax:
Mapsetname DFHMDF
x x x x x
Notes: Mapsetname is of 1 to 7 characters in length. DFHMSD macro is used to define a mapset and its characteristics or to end a mapset definition .
Mapname DFHMDI
x x x
Notes: Mapname is of 1 to 7 characters in length. DFHMDI macro is used to define a map and its characteristics in a mapset.It can be used often as you wish within one DFHMSD macro.
DFHMDF Macro
Syntax: Fieldname DFHMDF POS=(line,column), LENGTH=number, JUSTIFY=RIGHT, INITIAL=Char data, ATTRB=(UNPROT|PROT,NUM,FSET,IC) x x x x
MDT is on(1)
Notes: MDT is a 1 bit attribute character of a BMS field. When it is set on, CICS will transmit the data contained in the associated map field.
If CNTL=FRSET is specified in the DFHMSD macro or DFHMDI macro, when the map or mapset is sent to the terminal MDT will be reset to 0 or OFF for all fields of the map or mapset.
If FSET is specified in the ATTRB option of the DFHMDF macro, when the map is sent to the terminal, MDT will be set to 1 or ON for the fields regardless of whether the field has been modified by the user.
Notes: When the application program moves the DFHBMFSE to the attribute character of the field then also MDT in ON state.
Objectives
RECEIVE MAP SEND MAP SEND CONTROL SEND TEXT ATTENTION IDENTIFIERS
RECEIVE Command
Syntax : EXEC CICS RECEIVE [INTO(data_area) | SET(ptr_ref)] [LENGTH(data_area) | FLENGTH(data_area)] [MAXLENGTH(data_value) | MAXFLENGTH(data_value)] [NOTRUNCATE] END-EXEC
Notes: This command will receive data from either a standard CICS terminal (BTAM or TCAM) or from a task that is not attached to a terminal. This command is used for all other CICS supported terminals for which there is no other appropriate RECEIVE descriptions. For receiving data, you must specify either the INTO or SET option.
SEND Command
Syntax : EXEC CICS SEND FROM(data_area) [LENGTH(data_value) | FLENGTH(data_value)] [DEST(name)] [WAIT] END-EXEC
Notes: This command will write data to a standard CICS terminal support (BTAM or TCAM). This command structure may be used by any CICS supported terminals where there does not exist another specific command for the device type.
Notes: This command will receive data from the terminal and place the data into an application area in the Program. MAP defines the name of the map which was defined in the corresponding DFHMDI macro. MAPSET defines the name of the mapset which was defined in the corresponding DFHMSD macro. For receiving data, you must specify either the INTO or SET option.
Attention Identifier
It indicates which method the terminal user has used to initiate the transfer of information from the terminal to CICS. PA keys,PF keys, ENTER keys CLEAR key etc. are the AID keys. DFHAID copy member contains AID codes such as DFHENTER for ENTER key, DFHCLEAR for CLEAR key,DFHPA1-3 for PA keys and DFHPF1-24 for PF keys.
Notes: Attention Identifier (AID) is used by the terminal operator to initiate the transfer of information from the terminal device to CICS. The EIBAID field in the EIB contains the AID code of the most recently used AID. CICS provides the standard AID list in a form of copy library member(DFHAID). So that a program can use AID keys by specifying in the program: COPY DFHAID.
Objectives
CEDA Transaction. CECI Transaction. CEDF Transaction. CMAC Transaction. CEMT Transaction CEOT Transaction. CESN Transaction.
Install DEFINE
DFHCSDUP
PPT
PCT
DEFINE
CEDA
Notes: CICS provides facilities for defining CICS resources and adding them dynamically to a running CICS System. The benefits of this are: Increased system programming productivity. Continuous system operation. RDO consists of CSD and CEDA.
CEDA Transaction
CEDA Transaction is generally used for defining resources to CICS. Resources are nothing but the entities that are managed by the CICS system such as: Terminals Files (Database) Programs BMS maps Transactions Queues Connections to the other systems.
Notes: Dynamic Addition transaction (CEDA) can perform all the functions of RDO. Two more Transactions, CEDB and CEDC perform a sub set of the functions of CEDA. CICS System Definition Utility Program (DFHCSDUP).
Online Resources
RESOURCES
Terminals Files Terminals Files(database) Programs BMS maps Transactions Queues Connections to other systems.
GROUP
Resources for one application. GROUP RESOURCES FOR ONE APPLICATION
LIST
Resources for one CILIST RESOURCES FOR ONE CICS SESSION
Notes: GROUP contains resource names. Resources always belong to user defined GROUP, and that GROUP normally represents all the resources associated with an application. LIST contains group names. It represents all the applications for a CICS session.
CEDA Menu
ENTER ONE OF THE FOLL ENTER ONE OF THE FOLLOWING ADd ALter APpend CHeck COpy DEFine DELete DIsplay Expand Install Lock Move REMove REName UNlock USerdefine View SYSID=CE16 APPLID=PYNZ7C1 PF 1 HELP 3 END 6 CRSR 9 MSG 12 CNCL
Notes: This the menu that you get after you key CEDA and press ENTER. CEDA is a user friendly CICS supplied transaction.
SYSID=CE16 APPLID=PYNZ7C1
PF 1 12 HELP CNCL 3 END 6 CRSR 9 MSG
Notes:
CRSR
Groups are supplied containing definitions of resources which CICS itself needs.
CRSR
MSG
Notes:
Any change you make will not be effective in the CICS system until you have installed the resource.
CECI Transaction
The Command Level Interpreter allows you to Execute CICS commands interactively at a terminal. Test Commands before writing them in a program. Generate test data. Repair files.
Notes: The Command Level Interpreter or CECI as it is called after its transaction code, is a very useful tool for programmers. The Command Interpreter can be useful to the programmer in two ways: 1. 2. It provides an on-line reference to the syntax of the whole of the CICS API. It provides a useful means of interaction with the system. For example, security permitting, a record corrupted during program testing could be repaired interactively or temporary storage queues could be created or deleted.
CECI Menu
STATUS: ENTER ONE OF THE FOLLOWING Abend DEQ Inquire RECeive STARTBr ACquire DISAble ISsue RELease SUspend ADdress DISCard Journal RESEtbr SYncpoint ALlocate DUmp LInk RESYnc Trace ASKtime ENAble LOad RETRieve Unlock ASSign ENDbr Monitor RETUrn Verify BIf ENQ Perform REWrite WAIT BUild ENTer POInt ROute WAITCics CAncel EXtract POP SENd WRITE CHange FEpi POSt SET WRITEQ COLlect FOrmattimePURge SIGNOFf Xctl CONNect FREE PUSh SIGNON CONVerse FREEMain Query SPOOLClose CReate GDs READ SPOOLOpen DELAy GEtmain READNext SPOOLRead DELETE Handle READPrev SPOOLWrite DELETEQ IGnore READQ START PF Notes: 1 MSG HELP 12 3 END CNCL 6 CRSR 9
CECI is invoked by simply entering the transaction code, CECI, and then a list of all CICS commands will be displayed on the screen. The programmer can select from these and can then continue to be prompted to build up a request which may be syntax checked and executed. The results of command execution, or any error messages, will be displayed interactively.
NAME =
EIBRESP=+0000000000 EIBRESP2=+0000000000 11 SF
Here the task is about to read record with the 000030 from the file MAINTEC. You will notice from these displays that you can abbreviated the command and the operands, e.g. RID for RIDFLD, you cannot do this in an application program.
NAME =
C01345604/05/1.) )
EIBRESP=+0000000000 EIBRESP2=+0000000000 11 SF
Notes: Here you can see that the command has executed without any error condition occurring, i.e. Response = Normal.
NAME =
EIBRESP=+0000000012 11 SF
Notes : The problem here is that the file MAINTXX has not been defined to CICS and hence it cannot be accessed.
CEDF Transaction
CEDF is a very powerful debugging tool to test CICS programs interactively at a screen. It can run on 1 or 2 terminal mode. Displays working-storage section, allows modification of workingstorage. Displays return codes after each execution.
Notes: The best way to learn about EDF is to sit down at a terminal and use it to debug a program.
At transaction initialization. At the start of execution of every EXEC CICS command. At the end of execution of every command.
At program termination.
At normal task termination. When an ABEND occurs.
OFFSET:X000772
LINE:00206
EIBFN=X0602
ENTER : CONTINUE PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: UNDEFINED PF12 : ABEND USER TASK Notes: In these notes are some screens that will give you an idea of the sort of displays you might receive from EDF in the course of a session.
The exact information displayed will depend upon the point at which execution has been intercepted.
EIBCPOSN = 4 EIBCALEN = 0 EIBAID = X7D EIBFN = X0000 EIBRCODE = X000000000000 EIBDS = .. + EIBREQID = .
ENTER : CURRENT DISPLAY PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: NEXT DISPLAY PF12 : UNDEFINED
Notes: EIB will provide information about EIBDATE, EIBCALEN, EIBTIME, and EIBRCODE etc.
EIBFN=X0602 EIBRESP=X00000000
ENTER : CONTINUE PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: UNDEFINED PF12 : ABEND USER TASK Notes: By pressing PF2 you will get the output in hex format.
In addition you also get the address in storage of the various fields.
EIBFN=X0602 EIBRESP=0
ENTER : CONTINUE PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: UNDEFINED PF12 : ABEND USER TASK
OFFSET:X000B52
LINE:00321
EIBFN=X1804
ENTER : CONTINUE PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: UNDEFINED PF12 : ABEND USER TASK
TRANSACTION: AA11 PROGRAM: PROGAA11 TASK: 0000044 APPLID: PYNZ7C1 DISPLAY: 00 STATUS: ABOUT TO EXECUTE COMMAND EXEC CICS SEND MAP MAP ( MAP1 ) FROM ( .%.%....) LENGTH ( 300 ) MAPSET ( MAPSET1 ) TERMINAL FREEKB ERASE OFFSET:X000B52 LINE:00321 EIBFN=X1804
ENTER : CONTINUE PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: UNDEFINED PF12 : ABEND USER TASK
Notes: After this command gets executed the next screen displays the working storage contents (Record in storage).
TRANSACTION: AA11 PROGRAM: PROGAA11 TASK: 0000044 APPLID: PYNZ7C1 DISPLAY: 00 STATUS: COMMAND EXECUTION COMPLETE EXEC CICS SEND MAP MAP ( MAP1 ) FROM ( .%.%....) LENGTH ( 300 ) MAPSET ( MAPSET1 ) TERMINAL FREEKB ERASE
EIBFN=X1804 EIBRESP=0
ENTER : CONTINUE PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: UNDEFINED F12 : ABEND USER TASK
APPLICATION FORM VALID COMMANDS ARE : U = UPDATE , R = RETRIEVE , C=CANCEL EMPLOYEE NO. FIRST NAME MIDDLE INIT. LAST NAME WORK DEPT. PHONE NO. HIRE DATE JOB CODE AGE SEX BIRTH DATE SALARY BONUS COMMISSION COMMAND => R EMPLOYEE NO =>3352 DFHAC2206 14:12:45 PYNZ7CI Transaction NOTF has failed with abend AEIM. Resource back out was successful.
OFFSET:X00070C
LINE:00196
EIBFN=X0E08
ENTER : CONTINUE PF1 : UNDEFINED PF2 : SWITCH HEX/CHAR PF3 : UNDEFINED PF4 : SUPPRESS DISPLAYS PF5 : WORKING STORAGE PF6 : USER DISPLAY PF7 : SCROLL BACK PF8 : SCROLL FORWARD PF9 : STOP CONDITIONS PF10 : PREVIOUS DISPLAY PF11: UNDEFINED F12 : ABEND USER TASK
CMAC Transaction
DFHCM01 Display On-line Messages and Codes
Component ID
(for example, TC for Terminal Control FC for File Control, etc.) This field is required for messages in the form DFHxxyyyy, Where xx is the component ID. AEIM (for example, 1060,5718,or Abend Code such as ASRA, etc.)
Message Number ..
F3=EXIT to CICS
AEIM
F3=Cancel
CEMT Transaction
Functions: Inquire Used to inquire on the status of a resource with the option of changing some of its properties. Set This duplicates the facilities of the inquire function but can be used on non-3270 devices such as the console.
Perform This is for activities not concerned with the status of a resource e.g. taking a dump or closing down CICS.
CEMT Menu
PF 1 HELP
3 END
Notes: To obtain the initial menu just key CEMT and press enter. To obtain a list of the resources that can be inquired upon enter INQUIRE or simply I.
APPLID=PYNZ7C1 3 END
In the menu the abbreviation for a resource is shown in uppercase although any number of the leading Characters is acceptable.
Sha Max( 00000000 ) Sha ) Max( 00000000 ) Sha ) Max( 00000000 ) Sha ) Max( 00000000 ) Sha ) Max( 00000000 ) Sha ) Max( 00000000 ) Sha ) Max( 00000000 ) Sha ) Max( 00000000 )
TIME :
PF
Notes: You can get to this screen more quickly by keying on a blank screen: CEMT I FILE Once you are in CEMT you stay in it until you press PF3. CEMT is a conversational transaction.
INQUIRE PROG (MTP*) STATUS : RESULTS - OVERTYPE TO MODIFY Prog (MTPLPRG) Len (0000000) Ass Pro Ena Pri Res (000) Use (0000000) Any Cex Ful
TIME : 12.05.19
DATE
Ena Ena Ena Dis Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena TIME :
Notes: Suppose you are been asked to disable a transaction MTP4, this can be done by the SET or INQUIRE facility. Using INQUIRE facility: First display the transactions using CEMT INQUIRE , then using the skip(or tab) Find the ena field and over key it with dis and press ENTER. Using SET facility CEMT SET TRANSACTION(MTP4) DISABLED Or CEMT S TRAN(MTP4) D
Ena Ena Ena Dis Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena Ena
NORMAL
TIME :
TIME :
Notes : The Processing Program Table (PPT) contains the disk address of each program that has been loaded since CICS start-up. In a test environment a program will be translated, compiled and link-edited after changes have been made to the source code, in a production CICS system a bug in an application program may have to be corrected while CICS is running. If a new version of a program is link-edited whilst CICS is running the PPT entry for the program must be updated with the new disk address. If it is not done CICS will continue to use the old version of the program. Using INQUIRE first display the program by CEMT | PROG and then key the word NEW alongside the entry for the program. Using SET option you can key the following on a blank screen. CEMT SET PROG(program-id) NEW
NORMAL
TIME :
NOTES : The PPT entry for the MTPLAB1 program has been updated. NEWCOPY has a disadvantage in that, if the target program is in use, that program is set to status of DISABLED. An alternative that allows multiple copies of a program to be used at any one time is PHASEIN.In full screen mode, just substitute PHA for NEW.
STATUS : RESULTS - OVERTYPE TO MODIFY Ter ( 2BH1 ) Tra ( CEOT ) Pri ( 000 ) Pag Ins Ati Tti Net ( PGFS2BH1 ) Acq
CEOT SYNTAX : < PAgeable | AUtopageable > < ATi | NOAti > < TTi | NOTti >
Notes: CEOT transaction gives useful information about a terminal and with this transaction an end user can change the status of their own terminal.
Type your userid and password, then press ENTER : Userid.MTPLABC Password Language New Password. Groupid
Notes: This is the screen you get to sign-on to CICS. To sign-off from CICS you have to enter CESF LOGOFF
Objectives
Transient Data Control Types of TDQs Commands related to TDQs Temporary Storage Control Commands related to TSQs Differences between TDQ and TSQ
A Transient Data File can be used as either an input or an output file but not both.
The Transient Data is called TDQ (Transient Data Queue) because the records are put sequentially ( like a queue ). Control Information of all TDQs is registered in DCT.
Notes: The word Destination is used because this sequential data is directed to other transactions. Each TDQ is identified by a 1 to 4 character identifier called destination id. All destination ids must be registered in the Destination Control Table (DCT).
Types of TDQs
Intrapartition TDQ
Extrapartition TDQ
Intrapartition TDQ
Intrapartition TDQ is a group of sequential records which are produced and processed within CICS region.
All Intrapartition TDQs are stored in only one physical file in a CICS region.
An application program can access the record sequentially and the record will be logically removed from the queue. Read of an Intrapartition TDQ is destructive.
Notes : The intrapartition TDQ is used for the various applications such as Interface among CICS transactions Automatic Task Initiation (ATI) Message routing Message broadcast
Extrapartition TDQ
Extrapartition TDQ is a group of records written sequentially which interfaces between transactions of the CICS region and the systems outside the CICS region.
Each Extrapartition TDQ is a separate physical file, which means that each file must be open within the CICS region when it is used by the CICS transaction.
Notes: In the input Extrapartition TDQ, records are produced by the programs outside of the CICS region (e.g batch jobs, TSO, PC) to be processed by the CICS transaction as input, where as in the output Intrapartition TDQ, records are produced by the CICS transactions as output to be processed outside of CICS.
WRITEQ TD Command
EXEC CICS WRITEQ TD QUEUE ( name ) FROM ( data_area ) [LENGTH ( data_value )] [SYSID ( systemname )] END-EXEC.
Notes : This command writes data to a transient data queue (TDQ) sequentially. The transient data queue name is a predefined symbolic destination defined in the DCT (Destination Control Table). It should be noted that TD represents Transient Data, If this is omitted, Temporary Storage (TS) will be assumed.
READQ TD Command
EXEC CICS READQ TD QUEUE ( name ) INTO ( data_area ) SET ( ptr_ref )] [LENGTH ( data_value )] [SYSID ( systemname )] [NOSUSPEND] END-EXEC.
Notes : This command reads from- a transient data queue (TDQ) after which the record is no longer available. INTO defines the area in the working storage section where data is to be placed. LENGTH indicates the length of the record.
DELETEQ TD Command
Notes: This command deletes all data from an Intrapartition destination (queue), and releases(deallocates) all storage associated with the destination. Once a transient data is processed it should be deleted because the space used is still allocated and therefore unavailable for use by other CICS users or transactions. This command can be used on Extrapartition transient data queue.
CICS Temporary Storage Program (TSP) provides the application program with an ability to store and retrieve data in a Temporary Storage Queue(TSQ) TSQ is a queue of stored records which is created and deleted dynamically by the application programs. TSQ is identified by queue id and a record in it is identified by a relative position number called item number. Read on a TSQ is not destructive. TSQ can be written in the main storage or auxiliary storage. TSQ can be accessed by any transaction in the same CICS region.
WRITEQ TS Command
EXEC CICS WRITEQ TS QUEUE ( name ) FROM ( data_area ) [LENGTH ( data_area )] [NUMITEMS ( data_area ) ITEM ( data_area ) [REWRITE]] [SYSID ( systemname ) ] [MAIN | AUXILLARY] [NOSUSPEND] END-EXEC.
Notes: This command writes temporary data (records) in a temporary storage queue in either main or auxiliary storage. If the write is to a recoverable queue, then after issuing a DELETEQ TS , no WRITEQ TS can be issued until a sync point has occurred. A halfword binary field (s9(4)) comp) should be provided to the ITEM parameter to which CICS places the actual item number of the record written.
READQ TS Command
EXEC CICS READQ TS QUEUE ( name ) [INTO ( data _area ) | SET ( ptr_ref )] [LENGTH ( data_area )] [NUMITEMS ( data_area )] [ITEM ( data_area ) | NEXT] [SYSID ( systemname )] END-EXEC.
Notes: This command reads data from specified temporary storage queue in main or auxiliary storage. Item indicates the item number of the record to be read.
DELETEQ TS Command
Notes: This command will delete a temporary storage (TS) queue. It will delete any data remaining in the TS queue and return all storage used by the TS queue to CICS, which then can be used by another transaction.
Notes: TSQ names are dynamically defined in the application program while TDQ names must be defined first in the DCT. When a TDQ contains a certain number of records (trigger level), a CICS transaction can be automatically started (ATI), which is not possible with TSQ. The TDQ is actually a QSAM file. An existing item in a TSQ can be updated while that in a TDQ cannot be updated. Records in a TSQ can be read randomly using item number while in TDQ it is not possible, Only sequential read is possible.
Condition
ERROR EOF EODS INBFMH ENDINPT NONVAL NOSTART TERMIDERR
Code
AE18 AEI9 AEXL AEYA AEYB AEYC AEYE AEYG
Condition
TSIOERR MAPFAIL DISABLED INVERRTERM INVMPSZ IGREQID INVLDC JIDERR
AEIL
AEIM AEIN AEIO AEIP AEIQ AEIR AEIS AEIT
DSIDERR
NOTFND DUPREC DUPKEY INVREQ IOERR NOSPACE NOTOPEN ENDFILE
AEYH
AEYJ AEYK AEYL AEYM AEYN AEYO AEYQ AEYR
QIDERR
DSSTAT SELNERR FUNCERR UNEXPIN NOPASSBKRD NOPASSBKWR SYSIDERR ISCINVREQ
AEI1
AEI2 AEI3
TRANSIDERR
ENDDATA INVTSREQ
AEY1
AEY2 AEY3
INVPARTNSET
INVPARTN PARTNFAIL
requested BMS service not included at system generation. PA/PF key not defined for page retrieval. resource security check failed. unsupported command issued. transaction abended as a run away task. deadlock timeout encountered. read timeout encountered. abend due to program interruption. abend due to OS abend intercepted by CICS.
Attention-id (1 byte). length of DFHCOMMAREA (S9 (4) COMP). date when this task started (S9 (4) COMP-3, 000yydd+). function code of the last command (2 bytes). response code of the last function (6 bytes). task number of this task (S9 (7) COMP-3). time when this task started (S9 (7) COMP-3, 0hhmmss+). terminal-id (1-4 chars). transaction-id (1-4 chars).