"P. Raulerson" <[EMAIL PROTECTED]> wrote: > Note that if you segregate all changeable data, putting it > into its own area, the OS is usually smart enough to load > one copy of the code/text section, and then multiple copies > of the data section. Basically, re-entrant code.
In z/OS, these data sections are called Writable Static Areas (WSA). Both main programs and collections of subprograms stored in Dynamic Link Libraries (DLLs) may use WSA. Each Language Environment "enclave"... in the simplest case, that means each task... has its own copy of the WSA for each program and DLL in use by the enclave. Since each task has its own enclave(s), the same WSA fields are never in simultaneous use by two or more tasks. Dynamic Link Libraries (DLLs) and WSA are supported for: z/OS and OS/390 C and C++ Enterprise COBOL for z/OS and OS/390 COBOL for OS/390 & VM Enterprise PL/I for z/OS and OS/390 VisualAge PL/I for OS/390 High Level Assembler (Release 5) WSA is easier to use in the higher-level languages because they handle many of the details. In Assembler, more of them need to be handled by the programmer. The old-fashioned way for reentrant Assembler routines to obtain their "own" storage is to obtain and initialize dynamic storage at first entry and then find a way to remember where it is. For reentrant main programs, whose registers are saved when they are inactive, using a register to remember works... and reentrant subprograms can use caller storage anchors (e.g., E15, E35 sort exits) or name/token services... but that's about where things stop. WSA goes much, much farther. For an introduction to the concepts, see Dave Sudlik's SHARE presentation on "Using Dynamic Link Libraries (DLLs) with Language Environment" at URL: <http://www-03.ibm.com/servers/eserver/zseries/zos/le/conference/pdf/ lb8130a.pdf> -- John R. Grout [EMAIL PROTECTED] ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html