Worth noting explicitly is that the CICS alternatives are
 
o THREADSAFE and
 
o QUASIRENT.
 
Long before IBM COBOL compilers could generate reentrant code COBOL was made 
usable for CICS APs by trickery.  The pointer to working storage--There was as 
yet no stack-based local storage, and COBOL programmers still use it very/too 
little--was at a standard location within a COBOL load module; CICS was 
therefore able to alter it for each [CICS] task to make it point to a distinct 
instance of [dynamically allocated] working storage.  This required 
serialization and other housekeeping, and the scheme used was for this reason 
described as "making COBOL [not reentrant but] quasi-reentrant".  Moreover, I 
believe that CICS still does this for some old COBOL APs.
 
However that may be, the wide use of the term quasi-reentrant made the 
unqualified term reentrant problematic in a CICS environment: it was judged 
better to use the new term thread-safe, which had no unhappy connotations, 
instead.
 
On this and other C/S topics WICKIPEDIA pieces are problematic.  At least in my 
experience they are not usually, after a time, wrong; but they do very often 
embody assumptions appropriate to some single hardware-architecture and 
operating-system environment, and words like reentrant  are defined and used 
differently in different such environments.   
 
Initially in an IBM mainframe environment a reentrant program could modify 
itself, usually at initial-load time, if it held a global lock while it did so; 
and this is the chief reason why a stronger term, refreshable in the event, was 
needed, introduced, and used.
 
In fact the routines I write in assembly language, PL/I, or (when sometimes I 
must) C are always both reentrant and refreshable; they never alter themselves, 
using dynamic heap (non-LIFO) and stack (LIFO) storage in classical fashion to 
avoid doing so; and I believe that this is the practice of many other 
contributors to IBM-MAIN. 

John Gilmore Ashland, MA 01721-1817 USA                                         
  
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to