RAMESH KRISHNA REDDY mainframe discussion forum - cobol, db2,cics,jcl,file-aid,changeman,... interview questions, quizs
Online Tutorials   | PREV  | TOP  | NEXT



CICS Concepts


CICS Concepts
1. Multitasking
2. Multithreading
3. Quasi-Reentrancy
4. Conversational and psedo conversational programming

Multitasking - When CICS receives a request to run a program, CICS start running that program instance for that user. We call this is a task for that particular user. Now let us see what is multitasking, when CICS receives a request to run the same program/another program, CICS starts running instance of requested program for that user.. CICS receives another request to run the same program/another program, CICS starts running instance of requested program for that user... Like this CICS can able to handle thousands of requests, can able to run multiple tasks simultaneously. This capability is called Multitasking. 2. Multi Threading - MultiThreading is sub-concept of Multi-tasking. First let us see, what is single Threading... When Tranaction Server receives a request to run a program, TS starts running that program intansce for that user... during this time TS receives another request from diffrent 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 sameprogram for second user. Multithreading 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. 3. Quasi-Reentrancy Program should be quasi-reentrant, in order to make multithreading 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 receives 1st request to process a program, CICS starts executing that program, at the same time another request (2nd request ) received by CICS, which is more priority, then CICS halt processing of 1st request & preserve its state ( all changed variable data, or chagned application logic for 1st request) to a separate storage area and initialize the program (to get fresh copy of that program), start executing 2nd request. once second request is over.. it initializes the program again & restores 1st request's state ( the data stored in separate storage area ) to this program and start executing the program, where had stopped. Like that, CICS can able to execute same program for many user requests. The feature of storing the program data in a separate storeage area, when there is an inerruption 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 compiling program. What is Reentrancy? In non-CICS environment, i.e., OS executes the programs & OS interrupt the programs for multithreading purposes. In these cases same Quasi-Reentrancy is called as Reentrany. Note : ++++ Dont get confused with Reentrant vs Quasi-Reentrant. There is no difference between these two concepts... if you talk Quasi-Reentrancy concept on OS environment directly.. it is called Reentrancy 4. Conversational , Non-Conversational and pseudo conversational programming In Conversational transaction, user sends request , operating system executes the program for that request and sends back reply. Wait for user reponse, once user responded, again process the user request and sends back the 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 tranaction, 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 does not required to wait for users response in this mode. Pseudo conversational tranaction 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. Let us see how... When user sends request , system executes the program and sends back reply and terminates it. This is non-conversation transaction... as we discussed. In this pseduo conversational 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 wont wait for user. User presented with the reply sent by system, now,user feels that system is waiting for his response in background and enter the data and pressen any FUNCTION KEY or ENTER. Now terminal control call the system with required information. Now system again starts a Non-conversational transaction and executes 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 termincal 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 sumit the form ( by pressing PF , PA keys or ENTER key ) In above discussion, we talked about transactionID, This is a 4 byte word attached to a program. When user sumitted his map/form terminal control sends back this transactionID, cics identifies corresponding program and execute that program.



Home | Donations | Online Tutorials | Books | Entertainment | Contactme | privacy |  sql tutorial | jcl interview questions | JCL Tutorial | JCL Tutorial - chapter1 | JCL Tutorial - chapter2 | JCL Tutorial - chapter3 | JCL Tutorial - chapter4 | JCL Tutorial - chapter5 | JCL Tutorial - chapter6 | JCL Tutorial - chapter7 | JCL Tutorial - chapter8 | JCL Tutorial - chapter9 | JCL Tutorial - chapter10 | JCL Tutorial - chapter11