View previous topic :: View next topic |
Author |
Message |
ST Beginner
Joined: 04 Jan 2003 Posts: 24 Topics: 12
|
Posted: Sat Jan 04, 2003 5:41 pm Post subject: Reg Q-reentrant pgms |
|
|
Hi,
Theoritically I know what is Q-entrant but How can we tell CICS that a program is Quasi reentrant? And how can we find out which pgms are Q-entrant and which are not.
Thanks,
ST |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Sat Jan 04, 2003 6:30 pm Post subject: |
|
|
ST,
First, you get reentrancy or quasi-reentrancy by writing your program such that it can stand to be reentered. Most higher level languages accomplish this by specifying the appropriate option at compile time.
"Reentrant" that means that the execution of a program may be suspended (for any of a number of reasons) and the operating system will decide (for any of a number of reasons) that a different task is to execute the exact same code that was suspended. A reentrant program will allow this activity harmlessly for any number of "simultaneous" uses. In the case of a multiprocessor it may be that a second task executes the code on a second CPU while the first execution continues on the first CPU.
Quasi-reentrancy in CICS is not as strong a condition as reentrancy. In quasi-reentrancy the possible suspension points are only at EXEC CICSs. That means that the code segment executed between any two EXEC CICS (calls for CICS services) need only meet the lesser condition known as serially reusable. Quasi-reentrancy need not worry about multiprocessor considerations. Only one CICS task executes at a time.CICS makes a copy of working-storage for each task so that the program may be used in this multithreading environment.
In the case of the COBOL compiler you should use the RENT, RES and NODYNAM options when compiling for CICS. You will get a load module that meets all conditions needed for CICS. You may need to consider the difference between reentrant and quasi-reentrant only if you write your own code in a language that doesn't automatically accommodate reentrancy (assembler language for example).
To understand best, consider an assembler language program which can modify itself (e.g., by storing data variables in the load module). To be truly reentrant, this would be illegal (e.g., it could not run in key zero storage such as the MVS (E)LPA). However in CICS, as long as the content of that variable did not need to remain the same after a call to CICS (EXEC CICS ...), then it would be acceptable, hence the term "quasi-"reentrant.
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
ST Beginner
Joined: 04 Jan 2003 Posts: 24 Topics: 12
|
Posted: Sun Jan 05, 2003 7:12 pm Post subject: |
|
|
Kolusu,
Thanks for ur detailed explanation.
But do u mean that we just have to mention any of these RENT,NODYANM,RES options at compile time of cobol pgm and it will inform CICS that its a Q-Reentrant pgm?
Also are there any other options like above to tell CICS that which pgms are Reentrant and which are Q-Reentrant? pls clarify..
Thanks,
ST |
|
Back to top |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon Jan 06, 2003 1:42 am Post subject: |
|
|
Yes ST,
You just have to specify the RENT compiler option to make your program re-entrant. Basically, I can't think of any case in which you need your CICS-COBOL program not to be re-entrant. So, basically you specify the compiler option to be re-entrant for all programs. Re-entrancy is just a concept and I don't think that as application programmers, we need to have any special programming considerations for that. Compilers automatically take care of that. As Kolusu correctly pointer out, we may need to take care of it explicitly in lower languages like Assembler. I have also heard that you need to take care of quasi-reentrancy explicitly in Macro level CICS. Kolusu, please correct me if I am wrong.
Regards,
Manas |
|
Back to top |
|
|
ST Beginner
Joined: 04 Jan 2003 Posts: 24 Topics: 12
|
Posted: Tue Jan 07, 2003 8:00 pm Post subject: |
|
|
Kolusu & Manas,
Thanks for your info..
ST |
|
Back to top |
|
|
|
|