FALSE

Page Nav

HIDE

Grid

GRID_STYLE

CICS FAQ's part1

INTRODUCTION TO CICS     1.     What is an online system? Online system is a system in which the end user can interact with the system to ge...

INTRODUCTION TO CICS 

Online system is a system in which the end user can interact with the system to get the information

Up to date files can be accessed by many users at a time
Data validation and editing can be done at the data entry time
Users can have the computer facility when needed

 A real rime system is an online system where the response time is minimal.

In a Batch processing system, transactions are accumulated into groups, or batches, before they are processed. For example the processing of the Orders collected for the whole day. In an Online processing system the transactions are processed by the system as soon as the transaction is entered on to the system. Ex. Airplane Reservation system. In a batch system the turnaround time is measured in hours and days, while for the On-line system it is measured in micro-seconds and seconds. On an Online system, if there is an error in data, the system indicates it immediately, and can be corrected and reprocessed. Allstate Insurance Co., uses CICS V4.1. on their system.

The menu program.
The inquiry program.
The file maintenance program.
The Data Entry program.

Ease of use. IBM promotes a user interface standard called CUA (common user Access). CUA provides Entry model, Graphical model, and Intermediate model - the text subset of graphical model.

Performance. Performance is a critical consideration for online programs. Performance for online systems is measured in terms of response time. Many factors affect response time. The most critical factors are the total number of programs running within the CICS system, the Disk I/O, the terminal and host computers and network.

File Integrity. A batch program typically has complete control of the files it uses, so there's no chance of another interfering with its processing. In an online system however many terminal users use the system simultaneously, and all must have access to the files they require at the same time.

Security. On batch systems Security implementation is simple as the access to the computer system can be controlled. However in an online system terminals are located at several locations. Logon procedure being used can ensure security to a great extent. Using of multi-level security to allow only certain users to access files and programs based on the logon id helps to secure the system.

CICS/MVS version 2 release 1
CICS/OS/VS version 1 release 7
CICS/DOS/VS version 1 release 7
CICS/VM release 2
CICS OS/2

The systems are compatible with certain exceptions caused by the differences among the corresponding operating systems    
  
DB/DC stands for Database/Data communication system

      FCP – File control
      JCP – Journal control
      KCP- Task control
      PCP- Program control
      SCP- Storage control
      TCP- Terminal control program
      TDP- Transient data program
      TSP-Temporary storage program

No

A re entrant program is a program which will not get modified and which can renter into itself and continue processing after an interruption by the operating system. These programs are called re entrant programs in an OS environment and quasi re entrant programs in CICS environment.
For example, 50 users are using program A, CICS will provide 50 Working storage for that program but one Procedure Division.

A transaction identifier and data are entered in a terminal. TCP with TCT recognises incoming data from the terminal. SCP acquires the storage for the terminal Input-Output Area (TIOA). TCP places the data from the terminal into TIOA and sets the pointer into the TCT entry of the terminal. If there is no task associated with the with this terminal, TCP passes control to KCP, Which realises the transaction in the data in TIOA.SCP acquires storage for the Task control Area, in which KCP prepares control data for this task. KCP, through PCT, tries to find the application program associated with the transaction. If PPT of the application program does not show the resident address of the program, KCP passes control to PCP, which fetches the application program from the load library and places it into the main storage. KCP passes control to the application program. The application program starts processing –the transaction has been initiated.

There are 5 ways and are described below

1.By a transaction identifier entered in a terminal with Enter key. This is the most common way of initiating a CICS transaction.
When the Trans-id is entered on the CICS screen, it locates the program associated with the trans-id from the PCT. Then the location of the program is determined by CICS by reading the entries in PPT. After the load module is located, it loads it onto the CICS main memory, then task workspace is assigned for CICS own use to execute the task.
2.By a transaction identifier associated with a terminal for pseudo-conversation. This is a typical way of achieving a pseudo-conversation.
3.By the start command which initiates a transaction specified in the parameter.
4. By the Automatic Task Initiation (ATI). The destination control table (DCT) entry for an Intrapartition Transient Data Queue can have a trigger level parameter and the associated CICS transaction to be initiated if the trigger level is reached.
5.By a 3270 attention identifier. For the IBM 3270 type terminals, any of PF keys and PA keys could be identified in PCT to initiate a CICS transaction.

Pseudo conversation is one in which a conversation is carried out by more than one task. It is achieved by quasi re-entrancy.

Conversational mode: In this mode, the program accomplishes a conversation by simply sending a message to the terminal, waiting for the user to respond, and receiving the response from the terminal. A program or transaction written in this mode is called the conversational program or transaction, respectively.

Pseudo conversational mode: In a Pseudo-Conversational program, a program attempts a conversation with a terminal user, it terminates the task after sending a message with a linkage for the next task. When the user completes the response the next task is automatically initiated. Pseudo-conversational program's uses the CICS resources such as control tables efficiently.But, from the user’s point of view, it looks like a normal conversation. A program or transaction written in this mode is called the pseudo-conversational program or transaction, respectively.

 There are three techniques available in order to develop pseudo conversational
  Transaction. They are

 Technique 1: This technique uses multiple transaction identifiers and multiple programs. It performs the terminal conversation in the following way

  A conversational program is logically and physically divided into separate programs after sending a message and before receiving the message. For each separate program, a unique CICS transaction identifier is assigned. Before terminating the program, each program issues the RETURN command with the next transaction identifier which is associated with the next program, unless it is the last return to CICS itself. In this way a series of terminal conversations can be carried out continuously.

Advantages and disadvantages: Advantage is that, it is easy to develop. Disadvantage is that it increases the number of PCT and PPT entries. Also there tends to be significant redundancies in the program. So this is not recommended.

Technique 2: This technique uses multiple transaction identifiers but one program. It performs the terminal conversation in the following way.

It is similar to technique 1,but instead of dividing into logically and physically separate programs, these separate programs are combined into one physical program, which has two functional routines to achieve the same functions as the physically separate programs in technique 1.

Advantages and disadvantages: This reduces the number of PPT entries. But it still creates many transaction identifiers (PCT entries). So this is not recommended.

Technique 3: This technique uses one transaction identifier and one program. It performs terminal conversation the following way.

One physical program consists of multiple logical programs, each of which takes care of one conversation. When a logical program of the physical program terminates, it issues the RETURN command with the transid option for the transaction identifier defined in PCT, but also passes a piece of data through COMMAREA indicating which conversation it is expecting the next time control is returned to the same physical program for the next logical program path.

Event-driven design forces you to think in terms of events that can trigger the execution of a pseudo-conversational program and the program's Response to each Event. The various steps include Identifying the user input events and then Designing the program's response to each event, and by designing a Structure charts with alternative designs by moving the generalized process into a separate module (para) and numbering the modules.

Multi-tasking means that the OS allows more than one task to run (be executed) concurrently, regardless of whether the task use the same program or different programs.
Multi-threading is the system environment, where multiple tasks share the same program under the multi-tasking environment. Programs are shared by several tasks, and for each task the program work as if it executes the instructions only for that task.

DB2 pre-compilation: This step comments all the SQL statements and replaces them with COBOL CALL statements. This step does syntax checking and produces the DBRM, which is a SQL source code.

CICS translation: This step comments all the CICS statements and replaces them with host language CALL statements. This Step follows the above step

COBOL compilation: This compiles the host language source code.

Link edit: This step applies certain operating features to the code which has been precompiled, translated and compiled to form the load module.

Bind: It requires DBRM prepared in the pre compile step as an input. This performs the following function

Syntax checking: Bind does syntax checking of the SQL even after it is over in pre compilation process.

Optimisation: Bind invokes a sub component called optimiser, which determines the access path for the SQL statements in the application program. This access path can be a sequential search or selection of an index. If it is a selection of an index then bind will prepare a compiled code, which will have explicit references to this index.

Package and plan creation: Bind prepares the package, which will be the compiled form of the SQL source code in the DBRM. This package will contain many internal control structures. This will be bound finally to an application plan. An application plan is nothing but a list of packages.

Authority checking: Bind also performs authority checking as whether the id has got authority to execute all the code in DBRM. It checks for the authority to assign the package to a collection. It also checks whether all the packages in a plan can be executed.


DFHEIBLK, DFHCOMMAREA are added in the Linkage section of the program.
Yes. Needs to be preprocessed.

A. DFHCOMMAREA in the Linkage section is used to pass the data in working storage commarea from one to program to another program. It should be defined with as at least one byte long. As the working storage section is freshly allocated for every execution.

EIB is a CICS area that contains information related to the current task, which can be used for debugging the program. The most widely used variables are EIBDATE, EIBTIME, EIBAID, EIBCALEN, EIBCPOSN, EIBRESP, EIBRSRCE (resource), EIBFN (recent CICS command code), EIBTRMID and EIBTRNID.

EIB is a selection of information found in various CICS control Blocks. These control blocks are small areas of main memory that CICS/VS uses to control it's own operations. Some control blocks stand by themselves (CSA, CWA), Some are associated with terminals (TCTUA), Some are associated with Tasks (PROGA - TCA, TWA).

Step1: Develop a complete set of program specifications. The minimum the specifications should include program overview, a screen layout for each map being used, a listing of copy members of each file used by the program. Others that are needed are include decision tables, editing rules, ...

Step2: Design the program. Most standard COBOL programs are designed around a basic looping structure that controls the overall program execution. In a pseudo-conversational CICS program there is no basic looping structure, Instead CICS invokes your program whenever there is an interaction with a user. CICS program is to be designed to respond appropriately for each type of user action.
Step3:Create the necessary CICS table entries. Before you can test a CICS program, you need to make sure that all of the CICS table entries required to support the program are in place. For most programs the entries need to be added to PPT, PCT and FCT tables.

Step4: Prepare the BMS mapset by coding the assembler language BMS macros. Incidentally many shops use mapset generator.

Step5: Code the program. Coding the CICS programs involves writing of standard COBOL code with special CICS commands to invoke CICS services.

Step6: Compile the program. By either using the Foreground command level translator or a JCL, compile the CICS application program. Under which the CICS commands are commented out and replaced by appropriate calls and move statements during the pre-compile / Translation step. In addition to translation the CICS commands the translator also inserts other code needed to process the CICS instructions. Now the Cobol Source is compiled and link-edited similar to a standard Cobol program. Under Microfocus Checker is used.

Step7: Test the program under CICS test region. Load and run the program under the test environment and check for the functionality. You can use CEMT, CEDF and CECI transactions during the test cycle.

Step8: Document the Program. After the test runs fine and everything look's Ok create the necessary documentation for the program. Use built-in helps in the program along with necessary comments wherever needed in it.

Terminal Control. It is the interface between the CICS application program and the Operating System's Tele-Communication Access Method VTAM, TCAM or BTAM). Terminal control lets you send text to and receive text from the terminal that initiated the task. An application program that uses terminal control directly must process complicated strings of control characters and data sent to and received from the terminal.

Basic Mapping Support. To relieve the programmer from building complicated strings of control characters to send data to and receive data from terminals, BMS is used that acts as interface between the program and terminal control. BMS lets you create a map that specifies the format of data as it appears on the terminal display.

File Control. File control acts an interface between the Application program interface and the VSAM files. The application program interface acts as the interface between the file control and application program. When a File control receives a request, it passes on to the appropriate VSAM File, which in turn would manage the data storage.

Program Control. This service manages programs executing within a task as an execution of an application for a particular user. API acts as the interface between the application program and the individual CICS services.

Transient Data Control. It provides the convenient way to use simple sequential files called destinations. Whenever a record is written to a destination it is added to the end. A task reads the first from destination, which gets deleted.

Temporary Storage Control. It provides the simplest method for storing data outside your CICS program's working storage area. Data is stored on TSQ's. If the amount of storage is small it can be stored on main memory else a disk.

Interval Control. This service lets you implement time dependent applications. It provides a method of starting a task that's an alternative to trans-id. It can be used to specify a task to start at a specific time. Storage Control. It allocates storage space to application programs. Since most programs keep all their data in working storage, which is allocated automatically, you will not use storage control commands frequently.

Task Control. It lets you control the execution of tasks. You can use it to suspend your task temporarily to prevent it from taking exclusive control and monopolizing the CICS resources and also take control over TSQ's.

Dump control service provides the transaction dump that shows the content of main storage used by the program. You can also use dump control to create dump at specific points without terminating the program for analysis.

Trace control. It maintains the Trace table that indicates the sequence of CICS operations performed within a task.

Journal Control module provides a standardized method of creating Output files called Journals, which are used to restore files in the event of a system failure.

The different table used by the above mentioned modules are TCT (term_id), FCT (specify which operations are allowed on the file), PCT(trans-id, programs), DCT, TST, ... PPT, ... JCT, and others are SNT, SRT(sys. recovery).

The tables used in CICS are PCT, DCT, PPT, FCT, TCT, JCT etc. FCT is the file control table .It provides application programs with services to read, update, add and delete records in a file.

CICS creates internal control tables mentioned below based on the Resource definitions created by the system programmers. There are two ways a programmer can create a resource definition. By using special assembler macro instruction or by using the Resource definition online (RDO). RDO is even called as CEDA as it is the transaction used to initiate RDO. RDO is used to define the resources needed such as program name, BMS, Trans-id, file info...

Program Control Table - The primary function of the PCT is to register the control information of all CICS transactions. PCT contains a list of valid Trans-id paired with the name of a program CICS will load when the transaction is initiated with that transaction identifier. It identifies priority and security level (RSLC) of transaction.

Processing Program table - The Primary function of PPT is to register all CICS application programs and BMS mapsets. The PPT keeps track of which applications are loaded on the CICS address Space (storage). CICS uses this information to determine whether new copy of the program need to be loaded from Disk or it exists on storage. It contains information such as Location in memory, Library address of the disk and language being used.

File Control Table - The Primary function of FCT is to register the control information of all files, which are used under CICS. FCT contains the name and type of each file and in addition lists the file control operations that are valid for each file. It lists whether the existing records can be read sequentially or randomly, deleted or modified. Others control tables used are TCT to register terminals, DCT, TST, RCT, SIT, SRT and SNT.

No
The File control entry in the environment division and the file section should be empty.
There is no difference between the COBOL and CICS Identification Division, in which Program-Id is mandatory. The Environment division of the CICS-COBOL program needs to be empty, as the Environmental information is controlled by the CICS tables such as FCT. Beginning with VS COBOL II Release3 compiler, one can omit coding of the header also. In the Data Division, File Section is not to be defined. It contains the working storage Section and Linkage Section for all the programs. A field called COMMAREA is defined in Working-Storage Section and DFHCOMMAREA in Linkage section for all the programs. Compiler adds Execute Interface Block (DFHEIB) in Linkage section. The Procedure division is used to code the Program logic, to perform the necessary functionality.

ACCEPT, DISPLAY, OPEN, CLOSE, READ, WRITE, REWRITE, DELETE, START, SORT, RELEASE, RETURN, EXHIBIT, TRACE, Segmentation features, and Report writer features. The CICS using COBOL II features that are not allowed under the OS/VS COBOL environment are GOBACK, STOP RUN, EXAMINE, STRING, UNSTRING and INSPECT.
Under CICS, a user can't directly invoke a program. Instead, the user invokes a transaction, which in turn specifies the program to be run. When a user invokes a transaction, CICS locates the associated program with the transaction, loads it into storage (if it is not there), and starts a task. Where task is a unit of work, which is scheduled by CICS. The difference between transaction and task is that while several users may invoke the same transaction, each initiates a separate task.

A cursor is a SQL object. It is used when the result of the retrieval is more than one row.
It is a data structure that must be included in any host language program using sql. It is used to pass feedback about the SQL operations to the program. Fields are SQLCODE, SQLERRM and SQLERRD

In order to make an interface between CICS and DB2, DB2 has a special attachment facility called ‘CICS attachment facility’, which connects DB2 to CICS.CICS application programs can issue a special set of commands for SQL services in order to access the DB2 database. SQL requests by the CICS application programs are passed from the CICS region to the CICS attachment facility of the DB2 region through which the DB2 database is accessed. The result of the DB2 database access is returned to the CICS region through the CICS attachment facility of the DB2 region.
The three types of threads are as follows:

Command threads: These threads are mainly for the commands. When the volume of the commands increase, then pool threads come into picture.

Pool threads: These threads are for the low volume and low frequency transactions.

Entry threads: These threads are mainly established for the high volume and high frequency transactions.
 It is not possible to attach more than one DB2 region to a CICS region.
At bare minimum PCT and PPT should be set. Also FCT,DCT and RCT ,if needed
Type, program name, program language and residency status
Plan is referenced in Resource control table.
Define an extra partition TDQ as an internal reader and write the JCL to it. Terminate the JCL with /*EOF.
In a COBOL-CICS-DB2 program, the 2-phase commit happens in the following
way:

In phase 1: CICS updates VSAM changes and then DB2 updates are made in the database and then the control is returned once again to CICS Thus the changes which are to be committed takes place in CICS and DB2.

In phase 2:CICS being the transaction manger issues a SYNCPOINT at the completion of the logical unit of work, thus updating the VSAM and DATABASE changes.
      
EIB is the execution interface block. It is a CICS supplied copybook that will contain some system-related information.
EIBAID        - attention id
EIBCALEN     - length of common area
EIBDATE      – Date when this task is started
EIBFN          - Function code of the last command
EIBRCODE    - Response code of the last command
EIBTASKN    -Task number of a particular task
EIBTIME       - Time when this task started
EIBTRMID     - Terminal id
EIBTRNID     - Transaction id

With a START or ATI       
DSNC transaction is used for defining RCT entry
      
???
????
48.    How do you remove the unwanted characters as input under the CICS environment?

The CICS Built-in function BIF DEEDIT is used. It is most often used foe numeric editing. It can be used to remove the special characters as commas, minus... Ex. for the resulting field to be right justified, and high order positions to be filled with '0' use
EXEC CICS BIF DEEDIT
FIELD(ws-data) LENGTH(nnn)
END-EXEC.

No comments