IBM ^

Introduction to CICS Transaction Server
for OS/390 – Unit 2

© 2004 IBM Corporation

IBM ^

Unit 2: Managing data and resources
Topics: 2A. Domains and resources Major domains The EXEC interface 2B. Resource definition CICS system definition (CSD) Terminal definition and management Structure of a CEDA command Conserving and sharing resources 2C. Data access and storage

© 2004 IBM Corporation

IBM ^

Unit 2 contents
The management of system resources is central to the efficiency of the CICS TS for the OS/390 system. In this unit, you will learn how resources are organized in CICS TS. You will also become familiar with the different ways of customizing resource configurations to suit individual system needs. This unit also deals with methods of accessing and protecting data, an important resource in any system.

© 2004 IBM Corporation

IBM ^

Unit 2 objectives
This is what you should be able to do after completing this unit: Name the primary method for accessing data sets in CICS Describe the purpose of a CSD file List the different methods of defining resources in CICS Describe the structure of a CEDA command Explain what sync points and LUWs are Describe the function of DTB List the four principles that CICS follows to help ensure data integrity Describe the functions performed by the CICS API

© 2004 IBM Corporation

IBM ^

2A. Major domains

CICS regions are divided into several domains, each with its own set of resources and functions. Domains communicate with each other by means of interfaces called gates.

© 2004 IBM Corporation

IBM ^

2A. Major domains
In Unit 1, you were introduced to a few domains that are involved in transaction processing: the storage manager, transaction manager, program manager and dispatcher domains. CICS also has domains that are responsible for: Loading application programs (loader domain) Dispatching CICS messages (message domain) Interfacing with external security systems (security manager domain) Two very important domains are the domain manager domain and the application domain.

© 2004 IBM Corporation

IBM ^

2A. Major domains
The domain manager domain maintains catalogs of important information about all domains. The application domain is responsible for terminal management, file access control, and the interface between CICS and application programs. The domain contains several key components, such as: Application and system services Extended recovery facility (XRF) Intercommunication segments, such as multiregion operation (MRO) and inter-system communication (ISC) System control

© 2004 IBM Corporation

IBM ^

2A. The EXEC interface
Another important component of the application domain is the EXEC interface program (EIP). The EXEC interface is an application programming interface (API), a command-level programming interface intended for CICS execution of any user applications. Command-level programs issue CICS commands to request services. A command-level program is easily recognized by the presence of EXEC CICS commands. Whenever an application program issues an EXEC CICS command, the EIP takes control and does the following: Interprets the CICS command Invokes the relevant control programs to process the request Acquires or accesses necessary control blocks

© 2004 IBM Corporation

IBM ^

2A. The EXEC interface

The EXEC interface block (EIB) is a control block associated with each task in this command level.

© 2004 IBM Corporation

IBM ^

2A. The EXEC interface
The basic format for API commands in CICS is:
EXEC CICS command option(arg)

The command argument is the operation required, and the optional option(arg) is a value such as length(data value) or file(name). Some of the more common commands are shown at the right.

© 2004 IBM Corporation

IBM ^

2A. The EXEC interface
When dealing with file access through the API, the command string includes an identifier for the file that the command is accessing. For example, if the user were reading a VSAM file, the command might be EXEC CICS READ FILE(‘payroll’) followed by more options to further describe the requested operation.

© 2004 IBM Corporation

IBM ^

2A. The EXEC interface
CICS API command level is used: To initiate communications (through VTAM) with devices such as local or remote terminals. These include printers, workstations, ABMs, and communication links. To run application programs, including translation arguments, from any resident programming language that is supported by CICS. These languages include PL/I, COBOL, assembler language, C and many others. To start, monitor, track and enable or disable transactions running on the system, either directly or through other applications, such as database managers.
© 2004 IBM Corporation

IBM ^

2B. CICS system definition
One of the main functions of the CICS system is to manage online resources. Resource definitions are descriptions of the types of applications and procedures that are used for individual data actions. Every CICS region has its own set of these resource definitions stored in a data set called the CICS system definition (CSD). Resource definitions provide CICS with the information to recognize and manipulate data appropriately, as well as the information regarding the properties and interactions between resources. If a resource is not defined correctly in CICS, it will not be recognized and can cause errors or transaction failure.

© 2004 IBM Corporation

IBM ^

2B. CICS system definition
In CICSPlex architecture, CICS is divided into several regions, and each region can play a different role in the system. Each region will contain its own CSD detailing the resources that are used exclusively (or owned) by that region. CICS TS for OS/390 is commonly divided into three regions: TOR, AOR and FOR.

© 2004 IBM Corporation

IBM ^

2B. CICS system definition
Terminal owning region (TOR) – Looks after end-user network facilities and needs. The CSD for this region would have definitions for all resources used in terminal sessions, including monitors, printers, and communication devices. Application owning region (AOR) – Owns user transactions and programs, so its CSD would include definitions for the resources relating to transactions and programs. File owning region (FOR) – Owns data resources including data files and tables, so its CSD includes definitions for those resources.

© 2004 IBM Corporation

IBM ^

2B. CICS system definition
Storage of CICS resource definitions in CSD is hierarchical. First, CICS organizes related resources into named groups. Then, these groups of resources are themselves stored in a list that is installed when CICS TS is started.

© 2004 IBM Corporation

IBM ^

2B. CICS system definition
Resource definition groups should ideally contain no more than 100 definitions. Very large groups, such as those containing network address definitions, can take a lot of processing time to install when CICS is started. Similarly, many small groups can slow down processing time, as well as affect direct access storage device (DASD) space usage. It is best to keep group size to a number that can be scrolled through easily on the screen.

© 2004 IBM Corporation

IBM ^

2B. CICS system definition
Generally, the following guidelines can help keep group size at a reasonable level: For network-related definitions, sessions must be in the same group as connection definitions. Therefore, a good strategy is to create a group consisting of one connection and its associated sessions. Terminal definitions should be grouped by department or geographic location. All definitions pertaining to a particular application should be in one group.

© 2004 IBM Corporation

IBM ^

2B. CICS system definition
You will learn about these five methods for resource definition in this unit: Resource definition online (RDO) – Uses CICS-supplied transactions (CEDA, CEDB, and CEDC) while a CICS region is running and stores the definitions in the CSD file. DFHCSDUP offline utility – Operates like RDO, but offline through a batch job. Automatic installation (Autoinstall) – Works only with user modifications through a definition model. The utility then dynamically creates new definitions based on the model which can prevent the creation of large numbers of definitions.
(continued)

© 2004 IBM Corporation

IBM ^

2B. CICS system definition
System programming, through the EXEC CICS CREATE command, creates resources that are independent of the CSD. Macro definition using assembler macros creates definitions and stores them in assembled tables in a program library. The definitions are installed during CICS initialization. Of the five listed methods, all are supported by CICS functions.

© 2004 IBM Corporation

IBM ^

2B. CICS system definition

© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management
The RDO language has keywords for: Resource types (for example, PROGRAM or TRANSACTION) Operations on resources (for example, DEFINE or VIEW) Resource properties (for example, LANGUAGE or DEVICE)

© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management
There are three major transaction groups in RDO: CEDA allows users to modify both the active CICS system and the CSD. CEDB allows limited modification of the CSD (all but INSTALL) and readonly commands. CEDC allows only read-only commands.

© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management
RDO can control which resources are accessed by which users. This is done using the CEDA command LOCK, and also through such operator ID-based security products as RACF. Most system administrators prevent access to the system terminal definitions (TYPETERM) and RDO transactions CEDA and CEDB, among other key resources. Also, programmer access privileges are often limited to only the applications that the programmer maintains.

© 2004 IBM Corporation

IBM ^

2B. Using the CEDA commands

CEDA commands are used for creating and managing resource definitions. A CEDA command begins with a TRANSID, and identifies a resource by resource type, resource name, group keywords and group name.

© 2004 IBM Corporation

IBM ^

2B. Using the CEDA commands
A new resource group is created through a DEFINE command, such as:
CEDA DEFINE PROGRAM(PROG1) GROUP(MYGROUP)

The only other way to create a group name is by specifying it as a TO group in a COPY command. A group name must be unique, and cannot be called the same thing as another group or list. To create a list, use either the ADD command to add a group to a list (which also creates the new list) or use the APPEND command to add one list to another (which also creates the new list). Again, list names must be unique.

© 2004 IBM Corporation

IBM ^

2B. Using the CEDA commands
Users can get information about resources and their definitions in a few different ways. One is through the master terminal program. The TRANSID for the master terminal program is CEMT. A CEMT transaction has four types of commands, as shown to the right.

© 2004 IBM Corporation

IBM ^

2B. Conserving and sharing resources
Resource definition is vital to the correct operation of CICS systems. If done incorrectly, or if installed incompletely, many error conditions and system problems can ensue. Although the CSD file is usually unique to a particular CICS region, there are methods of duplicating or sharing definitions with other CICS regions. There are also flexible methods of list usage within a singlesystem CICS setup.

© 2004 IBM Corporation

IBM ^

2B. Conserving and sharing resources
Dual-purpose resource definition allows a shared CSD file in local and remote CICS systems. Using this method, the CSD is not duplicated for different systems but differentiated by specifying groups of the CSD that will be used by particular systems. For two different CICS regions, one a TOR and one an AOR, three groups would be created in a dual-purpose setup: one for the TOR system, one for the AOR system, and one that includes resources common to both systems. One CSD file is used, so disk storage and maintenance requirements are reduced.
© 2004 IBM Corporation

IBM ^

2B. Conserving and sharing resources
In a single-system environment, lists with several different sets of groups can be installed for different days of the week, depending on usage and workload. Each time CICS is restarted, a particular list can be installed that matches that day’s needs or activities. This provides resource definition flexibility for a singlesystem CICS setup.

© 2004 IBM Corporation

IBM ^

2B. Conserving and sharing resources
When changing resource lists between systems or within a system, or when introducing changes to resource definitions, most systems administrators create a new list. The old list is archived, in case there are problems and it must be reinstalled in order to return to the previous resource state. Because the CSD is defined when CICS is initialized, it is possible to reinitialize CICS and define a different list of resources if the new list is unworkable. In large Parallel Sysplex environments that have CICSPlex SM for OS/390 installed, features like business application services (BAS) allow resource definition and central system image control across the entire CICSPlex.

© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management
CICS needs to know what terminals are connected to the system. With the CEDA command, the RDO facility is used to identify the VTAMsupported terminals that operators are using to interact with CICS. Each terminal receives a resource definition called a terminal control table terminal entry (TCTTE), which is stored in the CSD.

© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management
Each TCTTE contains: A unique 4-character identifier for the terminal The type of terminal The terminal status A pointer to the buffer (TIOA) containing any pending input or output messages An area reserved for use by CICS during processing
© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management
If the autoinstall process is used, the TCTTE is built dynamically and is defined in the CICS region when the user logs on and a VTAM session is established. The advantage to this process is that terminals are defined only when in use. This means that: Storage space is not used up by idle resources Startup time is decreased because CICS does not need to build TCTTEs for every terminal

© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management

When input is received from a terminal, the message is stored in a Terminal Input/Out Area (TIOA).

© 2004 IBM Corporation

IBM ^

2B. Terminal definition and management
In order to associate each message with the appropriate terminal, the addresses of a terminal’s TIOAs are stored in the TCTTE for that terminal. Because transactions are initiated from terminals, transactions also need to be linked to their participating terminals. To do this, the address of the TCTTE for the initiating terminal is stored in the TCA that has been set up for the task. Also, the address of the TCA is stored in the TCTTE of the initiating terminal. When a message is sent to a terminal, Terminal Management creates a TIOA to hold the message and transmits it to the terminal.

© 2004 IBM Corporation

IBM ^

2C. File control
File control is the CICS module responsible for providing access to data stored in data sets, data tables, and databases. A CICS application program can access data stored in direct access data sets as well as the following virtual storage access method (VSAM) file types: Entry sequenced data sets (ESDS) – Data is stored in the order in which it is entered. Key sequenced data sets (KSDS) – The order of data is specified and maintained by an index. Relative record data sets (RRDS) – Each record is a fixed length and has a numeric ID.
© 2004 IBM Corporation

IBM ^

2C. File control
Two major CICS components are involved in the file control process: the file control program (FCP) and the file control table (FCT). The FCP consults the FCT for the information necessary to access application data files. The FCT must contain an entry for each file that a CICS program accesses. Each FCT entry contains: The name of the data set The access method used with the file (for example: VSAM) The type of access permitted (for example: update, read-only) Other file attributes, such as the number of tasks CICS will permit to access the file concurrently

© 2004 IBM Corporation

IBM ^

2C. File control
When a CICS application program needs some data, it sends a request to the FCP by issuing a CICS file control command. A file I/O command contains: The words EXEC CICS (like all CICS commands) The function (for example, READ) The file name The name of the record area in the program’s working storage, and its length A record identification
© 2004 IBM Corporation

IBM ^

2C. File control
When retrieving a record, file control needs to acquire storage to hold it. It does this by calling the storage manager domain. The performance of applications is improved by requiring that multiple records from a data set be loaded into a table. Records are then manipulated within this table, which is kept in main storage, making it faster for CICS to retrieve the data. CICS ensures that any changes to the data are recorded in the data set.

© 2004 IBM Corporation

IBM ^

2C. Journaling and logging options
These file control components are optional with CICS: Automatic journaling – Writes details of file activity to a specified journal Automatic logging – Logs file operations (on recoverable files) on the CICS system log and the dynamic log These can be activated in the file control table at the discretion of the CICS system administrator. These controls come into play when records are updated, added to or deleted from a file control data set.

© 2004 IBM Corporation

IBM ^

2C. Journaling and logging options
The advantage of the automatic journaling and logging file controls is that file activity information is readily available for review in the event of system failure or backout, so that file activities and operations can be easily duplicated or traced.

© 2004 IBM Corporation

IBM ^

2C. Journaling and logging options
Other products used with CICS also have journaling and logging procedures. One advantage to having another application perform this function in addition to CICS is that key system information is tracked in more than one place. Thus, if one application fails, another can be used as backup. Another advantage is that the different applications can be used to perform different functions. For instance, with products like File-AID and Abend-AID, almost any problem application transaction path can be tracked and analyzed. Some system administrators prefer to use the enhancement products for error tracking and analysis, freeing the CICS system for more important tasks.

© 2004 IBM Corporation

IBM ^

2C. Data integrity
Protecting data from accidental loss or corruption is a primary concern of many businesses. CICS helps ensure the integrity of transactionrelated data by following four key principles in transaction processing, known as ACID: Atomicity Consistency Isolation Durability

© 2004 IBM Corporation

IBM ^

2C. Data integrity
Atomicity – Each transaction is treated as a separate unit. Either the entire transaction is committed (succeeds), or rolled back (fails). If a transaction fails, data cannot be corrupted; if it succeeds, the changes to the database are permanent. Consistency – A transaction follows established protocols each time it is run. The transaction uses data in the same way each time, which prevents data corruption across databases. Isolation – No two transactions operate simultaneously on the same data, because CICS keeps tasks independent of one another until completed. Durability – Committed data is saved by the system so that, even in the event of a failure and system restart, processing results are available.
© 2004 IBM Corporation

IBM ^

2C. Data recovery
Some data is designated a recoverable resource by CICS. Recoverable resources can include: Any designated file Certain transient data and temporary storage queues Data language/I (DL/I) databases This data has recovery information logged or recorded by CICS in the system’s dynamic Log. If a transaction involving a recoverable resource is successful, then the recovery information is deleted from the log.

© 2004 IBM Corporation

IBM ^

2C. Data recovery
However, if the task fails because of an error (whether in the application program, data access or transmission, or because of cancellation), CICS performs dynamic transaction backout (DTB). This reverses the pre-abend or pre-task failure updates and works backward from the last change before the failure occurred. DTB keeps corrupted data from being used by other tasks.

© 2004 IBM Corporation

IBM ^

2C. Data recovery
DTB functions by using synchronization points (sync points) specified by application programs. Sync points are logical points in the program execution and delimit a logical unit of work (LUW). A logical unit of work is a logical sequence of processing actions (for example, database changes) that must be completed before any of the actions of the sequence can be seen as committed.

© 2004 IBM Corporation

IBM ^

2C. Data recovery
Sync points occur where the changes being made are consistent and complete, and can then be committed to the database. After a sync point is reached: Held output is sent to its destination Input is removed from message queues Database updates are made available to other applications One task may equal one LUW with no sync point, but most complex tasks have several sync points. When there is an abnormal termination, CICS recovery and restart facilities do not back out program updates before the last completed sync point.

© 2004 IBM Corporation

IBM ^

Unit 2 summary
In this unit you learned the following: Two important domains in the CICS system are the domain manager domain and the application domain. The domain manager domain keeps track of all other domains. The application domain contains components responsible for terminal management, file access control, and the interface between CICS and application programs. Command-level programs issue EXEC CICS commands to request services. (continued)

© 2004 IBM Corporation

IBM ^

Unit 2 summary
CICS API command level is used: - To initiate communications with devices such as local or remote terminals - To execute application programs - To start, monitor, track and enable and disable transactions running on the system Resource definitions are descriptions of the types of applications and procedures that are used for individual data actions. Every CICS region has its own set of these resource definitions, stored in a data set called the CICS system definition (CSD). (continued)

© 2004 IBM Corporation

IBM ^

Unit 2 summary
CICS is commonly divided into three region types, each with its own CSD files: - Terminal owning region (TOR) - Application owning region (AOR) - File owning region (FOR) CICS organizes related resources into named groups that are further organized into lists. Of the methods for resource definition, RDO is often preferred because it can handle the resource definitions online and it allows fast access. (continued)

© 2004 IBM Corporation

IBM ^

Unit 2 summary
There are three major transaction groups in RDO: CEDA, CEDB, and CEDC. The CEDA group of commands allows the most extensive modification of the active CICS system and the CSD. File control is the CICS module responsible for providing access to data stored in data sets, data tables and databases. Two major CICS components are involved in the file control process: the file control program (FCP), and the file control table (FCT). (continued)

© 2004 IBM Corporation

IBM ^

Unit 2 summary
CICS helps ensure the integrity of transaction-related data by following four key principles in transaction processing, mnemonically known as ACID: atomicity, consistency, isolation and durability. To recover a system state after a failure, CICS performs dynamic transaction backout (DTB), which reverses the pre-abend or pre-task failure up to the last sync point.

© 2004 IBM Corporation

Sign up to vote on this title
UsefulNot useful