CICS Tutorial

CICS Tutorial part-1

CICS is a transaction procession system owned by IBM and runs under Z/OS operating system. CICS stands for Customer Information Control System which works as a front end for the business applications written in COBOL, PL/1, C, C++, Assembler, PHP and JAVA but most of the applications which CICS supports are written in COBOL. CICS controls the interaction BTW Users and Applications by providing a secure multi-user platform. It supports Multi threading which is a
useful concept for multi user environment where multiple users can perform the same operation but with different set of input data. CICS is widely used in Banking, Telecom, Insurance, rail Roads and many more business applications.

Transaction

Transaction in CICS is a Unit of work and is represented by a 4 char TRANSID.Generally one transaction executes one or more programs.
Transaction ID and its associated programs needs to be defined in CICS, before using it. There are few CICS system tables where this info. needs to be defined.PCT is one of them and it stores the Transaction and its associated program.

Click here for more details on transaction.

Task

In CICS terms, Task is an instance of one transaction. When any transaction is initiated, a task gets created by OS and processes the data/input provided by the user/terminal. It gets ended once the processinf is completed.
Tasks that are being executed can be viewd in the native CICS using the Master Termincal Transaction (CEMT).
CEMT INQ TASK(task id)

Tasks can be closed/purged in the same native CICS USING CEMT INQ.
ex: CEMT INQ TASK(00001212)
STATUS: RESULTS – OVERTYPE TO MODIFY
Tas(00001212) Tra(TRN1) Sus Tas Pri( 255 )
Sta(SD) Use(START2 ) Uow(D4X5F123E09EF321)

By Giving FP after 255.. task can be purged..

Multitasking

is a feature of OS where Multiple tasks can execute simultaneaously. CICS supports mulitasking.

Multi Threading

is a feature of operating system that can execute multiplae tasks which exceutes the same program but with different data. Here each task gets seperate copy of the same program so each task can execute different/same part of a single program. Program must be reentrant to support the multithreading.

REENTRANT Programs

A reentrant program does not modify itself when it is reentered after an interupption by the OS. This is possible as in Pseudo conventional program, a task gets ended without waiting for the user input and after the input is received, it gets started (reentered) from that point only. This is called reentancy.

Quasi Reenetrant programs are renetrant programs but these run under CICS.

Pseudo Conventional Programming 

Let us first discuss about the conversational Transactions in the CICS programs. Conversational programming is nothing but it involves the user interaction in the transaction processing. If user enters any input on the screen the program receives, process and send response back to the user for more input. After user inputs more info, program receives it and process. It is called a Conversational Transaction. Basically it has more than one input from the user.

Where as in non conversational programming ,After the program receives input from user it process, sends response and ends the task. It wont expect any more input from the user. It only contains one response from the user.

In Conversational programming once the program sends response to the user it waits for the user response, here the task doesn’t end. So the wait time and resource usage will be more with conversational tasks. The storage required for these are very high, as it holds all the resources until that task ends.

So to over come this disadvantage Pseudo conversational programming got introduced. Pseudo Conventional programs does not wait for the user input instead it ends the task, releases resources, preserves the required details to restart that program and once input is received from the user that task gets restarted by using the preserved details. It is actually a multitasking with a series of non conversational tasks but for the user it gives an impression of a Conversational task.

CICS Tutorial topics / Basics of CICS

One Comment

Leave a Reply to Jim Kirwan Cancel reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner