Basic partitioned access method
In IBM mainframe operating systems, basic partitioned access method (BPAM)[1] is an access method for libraries, called partitioned datasets (PDSes) in IBM terminology. BPAM is used in OS/360, OS/VS2, MVS, z/OS, and others.
A PDS consists of members (internally identical to sequential data sets), registered in a list called the directory. The combination of members and directory is a single dataset on disk. The directory contains a list of member's names (8 characters, padded on the right with blanks, as required) and member's addresses. Addresses are relative to the start of the dataset in order to allow the PDS to be moved to a different disk location.
Partitioned datasets can store any type of data, but they are often used to store executable programs, or load modules, sometimes called binaries in other systems. Other uses for libraries include system assembler macro definitions, job control procedures, and program source code. BPAM provides an application program interface API to programmers to access libraries directly. The BPAM API is similar to basic sequential access method (BSAM), but it adds functionality to process directories. Individual members of a PDS can also be processed using sequential access methods by specifying the member name on the job control DD statement.
Load modules
The operating system requires all executable programs to be stored in libraries because the member's directory entry contains additional attribute information specific to load modules. When used for storing load modules, directories also contain, among other data, the size of the load module and the address of the first "text record", which is different from the address of the first member data. Executable programs are written to libraries by the linkage editor and loaded into user-acquired storage by the Loader (an application program) or into system-acquired storage by Program Fetch (a specialized component of the OS supervisor).
The Linkage Editor organizes a load module in a specialized format consisting of alternating "text records" and "control/relocation dictionary records". This organization allows a load module to be completely loaded and relocated with one input/output operation by Program Fetch (EXCP on pre-MVS systems, or STARTIO on MVS/370 and later systems).
Similar facilities
The closest parallel to partitioned datasets in other operating systems such as Unix or Windows is the static library, such as produced by the ar utility. In fact, the nomenclature for libraries in make, lib(member)
, is directly derived from OS/360. A PDS may be compared to a directory, that can contain only files, no subdirectories, and at the same time is physically stored in a single file. The need for libraries relates to the fact that mainframe operating systems (until very recently) did not have a hierarchical file system.
References
- ^ IBM System/360 Operating System Sequential Access Methods Program Logic Manual (PDF). IBM. January 1967. Y28-6604-1.