Basic partitioned access method: Difference between revisions

Content deleted Content added
No edit summary
m clean up spacing around commas and other punctuation, replaced: ,and → , and
 
(21 intermediate revisions by 6 users not shown)
Line 1:
In [[IBM mainframe]] [[operating system]]s, '''basic partitioned access method''' ('''BPAM''')<ref>{{cite book|publisher=IBM|title=IBM System/360 Operating System Sequential Access Methods Program Logic Manual|id=Y28-6604-1|date=January 1967|url=http://www.bitsavers.org/pdf/ibm/360/os/plm_1966-67/Y28-6604-1_Sequential_Access_Methods_PLM_Jan67.pdf}}</ref> is an [[access method]] for [[Library (computing)|libraries]], called [[partitioned dataset]]s (PDSes) in IBM terminology. BPAM is used in [[OS/360]], [[OS/VS2]], [[MVS]], [[z/OS]], and others.
{{Mainframe I/O access methods}}
In [[IBM mainframe]] [[operating system]]s, '''basic partitioned access method''' ('''BPAM''') is an [[access method]] for libraries with a specific structure, called [[partitioned dataset]]s (PDS). BPAM is used in [[OS/360]], [[OS/VS2]], [[MVS]], [[z/OS]], and others. A PDS consists of members (that are internally identical to [[data set (IBM mainframe)|sequential data sets]]; a member cannot be a PDS itself), registered in a list called ''directory'', and 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.
 
In [[IBM mainframe]] [[operating system]]s, '''basic partitioned access method''' ('''BPAM''') is an [[access method]] for libraries with a specific structure, called [[partitioned dataset]]s (PDS). BPAM is used in [[OS/360]], [[OS/VS2]], [[MVS]], [[z/OS]], and others. A PDS consists of members (that are internally identical to [[data set (IBM mainframe)|sequential data sets]]; a member cannot be a PDS itself), registered in a list called the ''directory'',. and theThe 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.
While in theory such libraries can store any type of data, they are typically are used to store executable programs, or ''load modules'', or what is called binaries in modern terms. The operating system requires all executable programs to be stored in libraries, because directory entries contain additional attribute information for load modules. When used for storing load modules, directories also contain, amongst 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.
 
Partitioned datasets can store any type of data, but they are often used to store [[executable|executable programs]], or ''load modules'', sometimes called binaries in other systems. Other uses include system assembler [[Macro (computer science)|macro]] definitions, [[Job Control Language|job control]] procedures, and program source code.
While executable programs are written to libraries by the [[linkage editor]] and loaded by the loader (itself an application program) or Program Fetch (a specialized component of the OS supervisor), BPAM also provides an [[API]] to programmers to access such libraries directly. The BPAM [[API]] is fairly similar to [[basic sequential access method]] (BSAM), but it adds functionality to process directories. The Linkage Editor is a utility program which organizes a load module in a very 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 EXCP (on pre-MVS instances of this OS) and with one STARTIO (on MVS and later instances of this OS) by Program Fetch.
 
==Application program interface==
BPAM provides an [[application program interface]] (API) to allow 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.
 
The programmer specifies <code>DSORG=PO</code> in their [[Data Control Block]] (DCB) to indicate use of BPAM.
As a ''basic'' access method BPAM reads and writes member data in [[Block (data storage)|blocks]] and the I/O operation proceeds [[Asynchronous I/O|asynchronously]] and must be tested for completion using the <code>CHECK</code> macro.<ref name=Macro>{{cite book|last1=IBM Corporation|title=OS Data Management Macro Instructions|date=June 1973|page=157|url=http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/360/os/R21.7_Apr73/GC26-3794-1_OS_Data_Management_Macro_Instructions_Rel_21.7_Jun73.pdf|accessdate=August 19, 2016}}</ref> BPAM uses the standard system macros <code>OPEN</code>, <code>CLOSE</code>, <code>READ</code>, <code>WRITE</code>, and <code>CHECK</code>. The <code>NOTE</code> macro instruction returns position of the last block read or written, and the <code>POINT</code> macro will reposition to the ___location identified by a previous <code>NOTE</code>.<ref name=Macro /> The <code>BLDL</code> macro can be used to build a list of the addresses of members specified by the programmer for later use, if desired. <code>FIND</code> positions to a single member, specified by name, which requires a directory lookup on disk, or by address previously retrieved by <code>BLDL</code>. The <code>STOW</code> macro is used to update the directory when a member is added, deleted, changed (including renamed), or replaced.<ref>{{cite book|last1=IBM Corporation|title=OS Data Management Services Guide|date=July 1973|pages=75–85|url=http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/360/os/R21.7_Apr73/GC26-3746-2_OS_Data_Management_Services_Guide_Rel_21.7_Jul73.pdf|accessdate=August 19, 2016}}</ref>
 
==Load modules==
While in theory such libraries can store any type of data, they are typically are used to store executable programs, or ''load modules'', or what is called binaries in modern terms. The operating system requires all executable programs to be stored in libraries, because the member's directory entriesentry containcontains additional attribute information forspecific to load modules. When used for storing load modules, directories also contain, amongstamong 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 component of the OS [[Kernel (operating system)|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 ([[Execute Channel Program|EXCP]] on pre-MVS systems, or [[Start Input/Output|STARTIO]] on MVS/370 and later systems).
 
==References==
<references />
 
{{Mainframe I/O access methods}}
 
[[Category:IBM Mainframe computermainframe operating systems]]
The closest parallel for PDSes in other operating systems such as Unix or Windows is the [[static library]], such as produced by the [[ar (Unix)|ar]] utility. In fact, the nomenclature for libraries in [[make (software)|make]], '''lib(member)''', is directly derived from [[OS/360]]. It may be compared to a directory, that can contain only files, no subdirectories, and at the same time that 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]].
[[Category:IBM Mainframe computer operating systems]]
[[Category:Computer file systems]]