TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

CICS Transaction


Initiation of CICS Transaction:

There are five ways of initiating CICS transactions.

  1. By a transaction identifier entered in a terminal with ENTER key. This is the most common way of initiating a CICS transaction.

  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 the PF keys could be defined in PCT to initiate a transaction.


Transaction:

When a transaction identifier TXN1 is entered on the CICS terminal, first it checks if there is a program associated with this Transaction identifier in the PCT table. If it finds one, then it checks in the PPT table to find the location of the Program to execute it.

If the program is already available in the memory, it starts executing that particular program; if not, it loads the program to the memory from the secondary storage and then starts executing it.

cics-transaction

Transaction Life Cycle:

The transaction life cycle has the following steps −

Step 1

The terminal operator initiates the transaction by typing a 1 to 4 character transaction-id and pressing the ENTER key.

Step 2

The Terminal Control Program(TCP) periodically checks all the terminals for input. When a message is received, it does the following −

  • Instructs the Terminal Control Program(SCP) to create a Terminal input/output area(TIOA).

  • Places the message in the Terminal input/output area(TIOA).

  • Passes the control to the Task Control Program(KCP).

Step 3

The KCP takes control from the Terminal Control Program(TCP) and does the following −

  • Validates the transaction-id and security.

  • Instructs the Storage Control Program(SCP) to create a task control area.

  • Assigns priority to the task based on Terminal priority (Set in Terminal Control Table(TCT)), Operator priority (Set in Sign-On-Table(SNT)), and Transaction priority (Set in Program Control Table(PCT)).

  • Adds the task to the queue of waiting programs.

  • Dispatches waiting programs in the order of priority.

  • Passes the control to the Program Control Program(PCP).

Step 4

The Program Control Program(PCP) takes control from the Program Control Program(KCP) and does the following −

  • Locates the program and loads it, if necessary.

  • Transfers the control to the Application program.

Step 5

The Application program takes control from the Program Control Program(PCP) and does the following −

  • Requests the Terminal Control Program(TCP) to place the message into the program’s WORKING STORAGE area.

  • Requests the File Control Program(FCP) to retrieve records from the files.

Step 6

The FCP takes control from the Application program and does the following −

  • Requests a File work area from the Storage Control Program(SCP).

  • Informs the Task Control Program(KCP) that this task can wait until the I/O is complete.

Step 7

The Task Control Program(KCP) does the following −

  • Dispatches the next task in the queue.

  • Re-dispatches the old task when I/O is complete.

  • Transfers the control to the File Control Program(FCP).

Step 8

The File Control Program(FCP) returns control to the Application program.

Step 9

The Application program does the following −

  • Processes the file data.

  • Requests Terminal Control Program(TCP) to send an I/O message.

  • Returns control to the Program Control Program(PCP).

Step 10

The Program Control Program(PCP) returns the control back to the Program Control Program(KCP) requesting it to end the task.

Step 11

The Program Control Program(KCP) instructs the Storage Control Program(SCP) to free all the storage allocated to the task (except TIOA).

Step 12

The Terminal Control Program(TCP) does the following −

  • Sends the output to the terminal.

  • Requests the Storage Control Program(SCP) to release the TIOA.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal