Basic Concepts of CICS(Customer Information and Control System)


Basic Concepts of CICS(Customer Information and Control System)


In CICS environment, the tasks can be executed by using the transaction id.

Transaction:


Transaction is a logical unit of work that terminal user can invoke(సహాయం కోరు).
It is unique identifier which is used to execute or start particular task.
CICS is called to be transaction driven, because every transaction or program can be invoked with the help of a transaction-id.
Transaction-id is identified by a four OR 4 character id, for e.g. TXN1 and it is initiated, usually by typing the transaction id
in the top left left-hand corner of a blank screen.
A transaction may take several tasks to complete it. A Simple update transaction may take several tasks for validations.
A Transaction is to update a record in a file but terminal user may enter incorrect data and then program validates sends error
message to the screen.
Each time terminal users corrects the data, a new task is generated. So this update transaction may complete in several tasks.

TASK:

A Task is a unit of work.

Task is an instance(ఉదాహరణకు) of the execution of a particular transaction. It is a logical unit of Work.

In Pseudo conversation task starts with procedure division and ends with RETURN TRANSID or RETURN commands.

A Transaction from a terminal completes with multiple tasks.

The same transaction can be executed from 100 terminals, in this case 100 tasks are created at the same time in the main memory.

Each terminal user may execute that transaction in several tasks.

Multi Tasking:

Mutli tasking means that the Operating System allows execution of more than one task concurrently regardless of whether the task

uses the same program or different programs. CICS provides a multi tasking environment where more than one CICS task or

transaction can run at the same time.

When CICS receives a request to run a program, CICS start running that program instance for that user.

We will call this task for that particular user.

Now let us see what is multi tasking in CICS, When CICS receives a request to run the same program or different program.

CICS starts running instance of requested program for that user. Now, CICS receives another request to run the same program or

another program. Again, CICS starts running instance of requested program for that user.

In this manner, CICS can able to handle thousands of requests, can able to run multiple tasks simultaneoulsy.

This Capability is called multi tasking

Multi Threading:

Multi Threading is sub-concept of Multi-Tasking.

It is the system environment where the tasks are sharing the same program under the multi tasking environment.

Under Multi threading environment, a program is shared by several tasks concurrently.

For each task,the program must work as if it were executing instructions exclusivley for each task.

Therefore it requires special considerations such as reentrancy.

What is Single Threading

When Transaction Server(TS) receives a request to run a program, TS starts running that program instance for that user.

During this time, TS receives another request from different user to run the same program.

In single threading model TS has to wait till first instance of program to be completed and then start executing the same program

for second user.

Multi Threading is a technique that allows a single copy of a program to be processed by several transactions concurrently.

For Example:

One transaction may begin to execute an application program. While this happens, another transaction may then execute the same copy

of the application program.

Reentrancy

A Re-entrant program is one which doesn't modify itself so that it can re-enter to itself and continue processing after an interuption

by the operating system and Batch Programs are non re-entrant.

Quasi-Reentrancy

Program should be quasi-re-entrant, in order to make multi threading possible for that program.

i.e;Program should not be in modified state, when CICS start using the copy of the program.

For example: When CICS receive 1st request to process a program, CICS starts executing that program,

at the same time another request 2nd request by CICS which has more priority, then CICS halt processing of 1st request

& preserve its state (all changed variable data, or changed application logic for 1st request to a separate storage area and

initialize the program (to get fresh copy of that program),

Now, start executing the 2nd request. Once second request is over.

It initializes the program again and restores 1st request's state (the data stored in separate storage area) to this program

and start executing the program,where had stopped.

In this manner,CICS can able to execute same program for many user requests. The feature of storing the program data in a separate storage area,

when there is an interruption from CICS is called Quasi-Reentrancy capability.

Program which supports this feature is called Quasi-Reentrant program.

What I need to do as a programmer to make my program Quasi-Reentrant?

It is simple, use RENT option while comppiling program.

In simple manner, we can say Reentrancy in the following manner

In non-CICS environment, i.e,; OS executes the program & OS interrupt the programs for multi threading purposes.

In these cases same Quasi-Reentrancy is called as Reentrany.

If you talk Quasi-Reentrancy concept on OS envionment directly. It is called Reentrancy.

Conversation:

Program can communicate with the user by pair of SEND and RECEIVE commands.

But in between the SEND and RECEIVE, that is during the human response time all the resources are held by the program.

Once the user entered the information in the screen, then program proceeds further. This is called Conversation.

Pseudo Conversation:

Program can communicate with the user by pair of SEND and RECEIVE commands.

But in between the SEND and RECEIVE, that is during the human response time,it releases all the resources are held by the program and

those resources are used for another transaction purpose.This is called Pseudo Conversation.

In Conversational transaction, user sends the request, operating system executes the program for that request and sends back reply.
.
Wait for user response, once user responded, again process the user request and sends back reply and wait for user response.

In this scenario, total time for waiting for user to respond is more than executing the requested program.

In Conversational transaction, system resources spend lot of time in waiting for user response.

In non-Conversational transaction, system receives request from user, process it and send back reply to user,

and terminates. System doesn't required to wait for users response in this mode.

Pseudo Conversatioal transaction contains a series of non-Conversational transactions that look to the user like a Single Conversational transaction.

But how a user get a feel that it is a single conversational transaction.

He get a feel that system is waiting for his/her to respond.But system is not waiting for his response.

When user sends request, system excutes the program and sends back reply and terminates it.
This is non-converation transaction.

In this Pseudo Conversatioal transaction, program not only send reply, but also sends the information to the user terminal,
directing terminal control to call the system, when user completes his data entry and type any function keys or ENTER.
Then, system terminates the program and start working on other task. It won't wait for user.

User presented with the reply sent by the system, now, user feels that system is waiting for his response in background and
enter the data and press any FUNCTION KEY or ENTER.Now terminal control call the system with required information.
Now system again starts a non-conversational transaction and excutes corresponding program and return back with reply along with "additional information"
required to call back the system, when user press some key.

In CICS, we have EXEC CICS RETURN command to send back control terminal.
If you want terminal control to call any particular program (transaction), when user pressed any Functional Keys or ENTER.
Then you need to use TRANSID option in EXEC CICS RETURN command.
Using this transid, we tell terminal control, which transaction id to be invoked, when user want to submit the form(by pressing PF, PA keys or ENTER key).

In above discussion, we talked about transaction ID, This is a 4 byte word attached to a program.
When user submitted his map or form termianl control sends back this transactionID, CICS identifies corresponding program and excute that program.

Note:- I will be updating this blog frequently.✍

Thank you for visiting this blog☕️

For Latest Job Updates: Click here
To Learn Automation Anywhere(Robotic Process Automation(RPA) Tool): Click here
To Learn Mainframe Modules (Cobol, Jcl, VSAM, DB2, CICS): Click here
For Online Shopping: Click here

You Might Also Like

0 comments

TO VIEW THEN CLICK ON IMAGE OF THAT PRODUCT