<snip> If all callers access the GLOBAL module using LINK or ATTACH, CSV should be able to maintain use count and clean up when it reaches 0. </snip>
The case of LINK or ATTACH is uninteresting because that had to come from the address space (and jobstep) that did the LOAD in order to use the copy that was loaded to global. The "automatic cleanup" will happen after the task issuing LINK or ATTACH has terminated (or at the very tail end of that termination). The GLOBAL module is represented by a CDE on the loader's job pack queue. There is no "global" use count that could be accessed from some other address space. Such a global use count exists only for modules in LPA. And that use count is "useless"; it has no intrinsic meaning (since LPA modules can be "used" without LOAD). <snip> A programmer must not cause an object to be fetched with LINK then BALR to it in a concurrent thread. </snip> This is good advice but there are protocols that could be used if that (for some bizarre reason) was needed. The same could be said to be true with LOAD for a thread that is not a subtask of the loading task. It is the programmer's responsibility to make sure that the "owner task" does not terminate while there could still be a "user task". Peter Relson z/OS Core Technology Design ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN