The load library is a library where your load modules are stored. And when you run a JCL/number of programs against it - the system loads the program you have called from this library and executes.
So, here are a couple of questions.
a. Where does this program run, considering batch only? (Region/Memory)
b. How does it work with multiple users? Does it make copies for each execution? or Qs the request? or multithreads it?
c. unless it makes copies - wouldn't there be a limit to the number of ppl acessing a Load library?
Hope someone can help me with there queries. Thanks!
The fact that the load modules sit on a Disk (DASD) in a PDS is only a
storage matter. Anyone (who has access) can read this load module,
and then LINK/ATTACH... it into their address space. This copies the
load module into the Address Spaces memory and depending on the
command, allows you to run the code.
All this means is that if you have a job, and you have the following step:
//STEP1 EXEC MYLOADMOD
The load module is searched for and found in a PDS and loaded to the jobs memory.
Seeing as MVS uses virtual memory, each job runs it's own copy of the
load module in it's own region.
If the module has been loaded into shared memory (CSA, ECSA or LPA and more), the module must be one that does not change itself (REUSABLE), and then all address spaces can use the version in the same memory area (and no one disturbs anyone else).
Now back to your questions:
1) The program is read from the pds just like any other file, and run in the memory of the address space that loaded it. Region is the maximum memory that the Address Space has.
2) There is no problem with multiple users, because each user reads the module from the pds into their own memory (and you can have many users/jobs doing that, at the same time as long as they are all sharing the PDS and not holding it exclusivly).
3) There is no limit to the number of Address Spaces running the same module, or Q. (there is a limit to the number of address spaces that can run at the same time, but thats beside the point).