Method and means for cataloging data sets using dual keyed data sets and direct pointers4408273Abstract A data set catalog structure eliminates the requirement for base catalog/data volume synchronization in a multi-processing environment while enabling the operating efficiency directly addressing the data volumes. The catalog is distributed between a keyed sequential base catalog and, on each data volume, an entry sequential volume data set. Catalog information which must be synchronized with application data sets is stored in volume records in the volume data set. A method for opening a user's data set having a key comprises the steps of obtaining from the base catalog a direct pointer associated with the key to the volume record for the user data set; accessing the volume record (relative byte address) addressed by the pointer; comparing the key of the user data set with the key of the accessed volume record; if the keys do not compare, key searching the volume data set to locate the volume record containing correct key and rewriting the direct pointer in the base catalog to address the correct volume record, and obtaining from the correct volume record a direct pointer to the user data set. Claims I claim: Description TECHNICAL FIELD
TABLE 1
______________________________________
Catalog Parameter List (CPL)
NAME DESCRIPTION
______________________________________
CTGOPTN1 First option byte:
CTGBYPSS Bypass the catalog management security veri-
fication process.
CTGMAST Check the master password.
CTGCI Check the control interval password.
CTGUPD Check the update password.
CTGREAD Check the read password.
CTGNAME The CTGENT field contains the address of a
44-byte DSNAME, or a 6-byte volume serial
number (padded with binary 0's).
CTGCNAME The CTGCAT field contains the address of a
catalog's 44-byte DSNAME.
The CTGCAT field contains the address of a
4-byte field containing a VSAM catalog's
ACB address.
CTGGENLD Generic locate request.
CTGOPTN2 Second option byte:
CTGEXT Extend option (with UPDATE).
CTGNSVS Catalog cleanup request (with DELETE).
CTGERASE Erase option (with DELETE).
CTGSMF Write SMF record option (with LSPACE).
CTGREL Reset to empty status.
CTGGTALL Search all catalogs (with LISTCAT).
CTGPURG Purge option (with DELETE).
CTGVMNT The caller is VSAM Open/Close/EOV:
Volume Mount and Verify routine (IDA0192V).
CTGRCATN Return the catalog name (with generic
LOCATE).
CTGTTNXT Get-next option (with LISTCAT).
$ CTGDELRC
Delete recovery.
CTGDISC Disconnect option (with EXPORT).
CTGOVRID Erase override option (with DELETE).
CTGSCR Scratch space option (with DELETE).
$ CTGBOTH Caller can accept the ICF catalog architecture.
CTGOPTN3 Third option byte:
CTGFUNC Specifies the caller-requested function:
CTGLOC LOCATE
CTGLSP LSPACE
CTGUPDAT UPDATE
CTGCMS A Catalog Management Services function.
CTGSUPLT SUPERLOCATE function.
CTGCDCL GDG locate request-the caller supplied the
base generation level (CTGWAAGB field in
CTGWA).
CTGSRH Search the master catalog only.
Search the user's catalog first (specified
by CTGCAT or, if CTGCAT=0, search the
user's catalogs available to the caller
via JOBCAT or STEPCAT DD statements,
then search the master catalog).
CTGNUM Search one catalog.
Search both catalogs.
CTGAMO The call is an OS/VS2 catalog management
request.
The call is an OS catalog management request;
the caller supplied a CAMLST parameter list
that was translated into this CTGPL and
CTGFLs.
CTGOPTN4 Fourth option byte:
CTGLBASE Locate the base level (with
SUPERLOCATE-GDG only).
CTGDOCAT If the needed catalog is not open, dynamically
allocate and open it.
Do not dynamically open the needed catalog.
CTGNPROF No RACF profile to be defined or deleted.
CTGCOIN Controller intercept requested.
CTGBYPMT Bypass security prompting to system operator.
CTGTIOT Caller owns SYSTIOT exclusive.
CTGICFC The catalog is of the new ICF architecture.
This bit is set by ICF Catalog Management
on return if the request caused orienta-
tion to an ICF Catalog.
CTGICFOR Request is for ICF catalog only.
CTGENT Address of the catalog record identifier, as
defined in CTGOPTN1. When the request is
generic locate, byte 1 of the field pointed
to by CTGENT is a length byte, followed by
a 1 to 43 character generic name.
CTGFVT Address of the caller's CTGFV.
CTOGCAT Address of catalog's DSNAME or of a 4-byte
field that contains the address of the
catalog's ACB, as specified in CTGOPTN1.
CTGCVOL Address of an OS/VS system-catalog name
area, if the request is SUPERLOCATE. The
catalog name area contains the catalog's
DISNAME and if the catalog is identified
with an alternate DSNAME, the catalog's
alias. The OS/VS2 Scheduler uses this
information to build the catalog's PCCB.
CTGWKA Address of the caller's work area.
CTGDSORG Data set organization, if the request is
SUPERLOCATE.
CTGOPTNS Catalog Management Services request options:
CTGDEFIN DEFINE
CTGALTER ALTER
CTGDELET DELETE
CTGLTCAT LISTCAT
CTGNVTV CONVERTV
CTGF2WKA User Work Area format 2.
CTGTYPE Type of catalog record.
CTGTALIN NonVSAM data set
CTGTGBS Generation data group (GDG) base.
CTGTCL Cluster
CTGTDATA Data set
CTGTFREE Free (not supported in ICF).
CTGTAIX Alternate index.
CTGTINDX Index
CTGTMCAT Master catalog.
CTGTPGSP Page space.
CTGTPTH Path.
CTGTTNE True name entry (ICF only)
CTGTUCAT User catalog.
CTGTVOL Volume.
CTGTANM Alias name.
CTGTUFG Upgrade.
CTGNOFLD Number of entries contained in CTGFILED.
CTGDDNM Address of the JCL DD statement, if one is
associated with this request.
CTGNEWNM Address of the new DSNAME, if the request is
ALTER and the object's name is being
changed.
If the request is SUPERLOCATE:
CTGFDBK Feedback area.
CTGFBFLG Flags:
CTGPAR Parallel mount.
CTGKEEP Forced keep.
CTGSDGB GDG Base locate.
CTGNGDSN Generation data set name was generated (in
the form `dsname.gxxxxvyy`)>
CTGJSCB Address of the JCSB.
CTGPSWD Address of the call-supplied password.
CTGFIELD The 4-byte address of each CTGFL, to specify
each catalog field to be processed. The
length of the CTGFIELD is the CTGNOFLD
value times 4.
______________________________________
VVDS manager 34 is called by BCS manager 32 whenever information is to be stored or retrieved from VVDS 70. DADSM 37 performs all DASD space management functions, as is more fully described in OS/VS2 DADSM Logic, IBM Publication Number SY26-3828. VVDS 70 is dynamically generated, if not previously defined on a given volume 20, when the first VSAM data set (such as BCS 60 in FIG. 1 or any of data sets 141-152 of FIG. 3) is defined on the volume and is dynamically extended whenever additional space for the VVDS is needed. Any combination of BCS's 60 and data sets cataloged in BCS's 60 may exist on a volume. VVDS 70 contains a plurality of volume records (VVR's) 72, 77 herein organized in an entry sequence data set (ESDS). VVR 72 contains data set characteristics and all volume 20 related extent and relative block address (RBA) information for the data component of a VSAM KSDS data set. By this invention, the computing system is operated to enhance catalog recovery. This is accomplished by recording data set characteristics which must be synchronized with the data set in the VVDS(s) associated with the data volume(s) for the data set. This allows periodic back-up copies of catalog 60 to be taken, enabling recovery operations to occur without introducing catalog 60/data volume out-of-synch conditions. That is, the information which could become obsolete (high-used RBA on volume, extents, etc.) is located not in the BCS, but in the VVDS. Therefore, each volume's VVDS will contain information which changes as a data set is processed. If the base catalog structure (BCS) is lost, and subsequently restored from a back-up copy, any missing catalog entries can be re-established from records within the VVDS. The VVDS for each volume of the data set contains VVR's with volume-related information. In addition, data set characteristics which pertain to the data set as a whole appear only in the VVDS for the first volume of the data set (hereinafter referred to as the primary volume) since they are constant over all volumes. VVDS manager 34 maintains VVDS 70 and provides the protocol for processing VVR's 72, 77, including the following request types, to be more fully described hereafter: READ INSERT DELETE GET FOR UPDATE PUT FOR UPDATE GENERIC READ GENERIC DELETE BCS OPEN CATALOG NAME DELETE END UPDATE RETURN CATALOG NAMES Referring to FIG. 3, a description will be given of a sample configuration of catalog and data volumes, illustrating relationships existing between BCS, VTOC's, VVDS, and user data sets. By way of example, catalog volumes P and Q and data volumes L, M and N are shown to reside on separate DASD's 21-25. Catalog volume 21 includes BCS 91 and volume 22 includes BCS 92 and 93. A plurality of sphere records 81-88 are organized in KSDS's with key fields K1-K8, respectively. Each sphere record, in addition to key fields (K1-K8), includes one or more pointer fields, such as those designated IC2, DC1, DC3, and DC. Each data volume includes a volume table of contents (VTOC) 94-96, a volume data set (VVDS) 131-133, and one or more user data sets, or extents 141-152, with extent E2I designating the index for data set 2, and E2D1 the first extent for the data portion of data set 2. Each VVDS is an entry sequence data set (ESDS), including a plurality of volume records (VVR's) 112-121. Each VVR 112-121 includes a key field K2'-K9' and extent descriptions, or pointers, such as VII2, VID1, VID2, VII7 and VID. These pointers provide the relative byte addresses (RBA's) of the user data set extents 141-152. Various relationships are illustrated between the sphere records and user data sets to facilitate a better understanding of the method of the invention. Sphere record 81 catalogs a non-VSAM data set 143. Record 81 points to the beginning of VTOC 94, which one each access must be sequentially searched for the key K1' matching key K1 and identifying the user data set 143. VTOC record 111 contains that key, and includes direct address pointers defining the extent of data set 143. Sphere record 82 catalogs a VSAM data set E2, which includes an index extent 144, and three data extents 147, 145, and 149. Pointer IC2 in sphere record 82 points to the VVR 112, which includes a key field K2' matching key K2 and identifying data set E2, a field DS2I describing index data set 144 and a field VII2 pointing to the location of data set 144. Pointer DC1 in sphere record 82 gives the address of primary VVR 115, which includes a key field K2', data set information DSI for data set E2, and extent descripters VID1 and VID2 of the two extents 147 and 145 of data set E2 on volume 24. Pointer DC3 in sphere record 82 gives the address of VVR 118 which includes key field K2' and a pointer to extent 149 of data set E2 on volume 25. VVR 118 is not a primary VVR (as each data or index component has only one primary VVR, and for the data component of data set E2 that is VVR 115), so it does not include a data set information field. Sphere record 83, having key K3, includes a field pointing to VVR 114, which includes a pointer to user data set 141. However, as key K9'.noteq.K3, a sequential search of VVDS 131 would be performed to locate VVR 113, which provides a pointer to data set 142. The address of VVR 113 would be returned to correct the pointer in sphere record 83, as will be more fully described. Sphere record 84, having key K4, points to VVR 119, which, in turn, points to data set 150. Sphere record 85 points to VVDS 132, and illustrates that optional operational mode where a VVR pointer is not provided to the VVDS manager, and a sequential key search of VVDS 132 is made to locate VVR 116 having key K5'=key K5. VVR 116 points to data set 146. Sphere record 87, having a key field K7 and K71, also includes an index component IC7 pointing to VVR 120 and a data component DC pointing to VVR 121, both in VVDS 133. VVR's 120 and 121 are both primary VVR's, and thus include data set information cells DSII for the index data set and DSID for the data data set, respectively. VVR 120 field VII7 points to index data set 151, and VVR 121 field VID points to data set 152. The data set and record relationships shown in FIG. 3 illustrate various aspects of the invention and will be further described in connection with the flow charts of FIGS. 4-18 hereafter. Referring to FIGS. 4-17 in connection with FIGS. 1-3, a description will be given of the steps for operating a computing system illustrating the environment in which the method of the invention is accomplished. The processes herein illustrated include the following: Defining an ICF Catalog. Defining a VSAM data set into an ICF Catalog. Recataloging a VSAM data set. Opening a VSAM data set. Extending a VSAM data set. Referring now to FIG. 4 in connection with FIG. 2, a description will be given of defining an ICF catalog 60. A user application program, executing in CPU 26, invokes AMS, which invokes the BCS manager which in step 201, invokes the DADSM 36 component of the operating system, which allocates space on DASD 20 for the catalog, as is more fully described in OS/VS2 DADSM Logic, IBM Publication SY 26-3828. The user application specifies, in main storage 28, parameters which will be used in step 202 by BCS manager 32 in response to a supervisor call (SVC26) from AMS 42 to generate the data VVR 72, and in step 203 to generate a primary index VVR 73. The user-specified parameters include the catalog parameter list (CPL) of Table 1; the field vector table (FVT) of Table 2; and the field parameter lists (FPL) described in IBM Publication SY 26-3826. The volume record (VVR) 72, 73, 112-121, is described in Table 3 (VVR Header), Table 4 (VVR Data Set Information Section--Example), Table 5 (VVR Volume Information) and Table 6 (AMDSB Section).
TABLE 2
______________________________________
Field Vector Table (FVT)
FIELD NAME
DESCRIPTION
______________________________________
CTGFVTYP RECORD TYPE
CTGPVALN NONVSAM
CTGFVGBS GENERATION DATA GROUP (GDG)
CTGFVCL CLUSTER
CTGFVDTA DATA
CTGFVAIZ AIX
CTGFVIDX INDEX
CTGFVPTH PATH
CTGFVANM ALIAS
CTGFVVOL VOLUME (NOT USED FOR ICF)
CTGFVPRO CMS PROCESSING OPTION FLAGS
CTGFVAVL ALTER: Add volumes
CTGFVRVL ALTER: Remove volumes
CTGFVNDC NO DEVICE TYPE CONVERSION
CTGFVDRC DEFINE A RECOVERABLE CATALOG
(NOT ICF)
CTGFVRON TURN RACF INDICATOR ON
CTGFVROF TURN RACF INDICATOR OFF
RESERVED
CTGFVELM ELEMENT NUMBER OF CMSPCATR
CTGFVFL2 CMS PROCESSING OPTION FLAGS
CTGFVDCR DEFINE with DIRECTED CREATE
CTGFVNAL DEFINE with NO-ALLOCATION
CTGFVICF DEFINE an ICF catalog
0 = VSAM catalog
1 = ICF catalog
CTGFVRCT DEFINE RECATALOG (ICF ONLY)
RESERVED
CTGFVDCH ADDRESS OF THE CLUSTER's DATA FVT
CTGFVICH ADDRESS OF THE CLUSTER's
INDEX FVT
CTGFVVCH ADDRESS OF THE SPACE FVT
CTGFVIND ADDRESS OF THE DDNAME JCL
STATEMENT
CTGFVENT ADDRESS OF THE ENTRY NAME
CTGFVSTY ADDRESS OF THE SECURITY INFO FPL
CTGFVOWN ADDRESS OF THE OWNER IDENT FPL
CTGFVEXP ADDRESS OF EXPIRATION DATE FPL
CTGFVCRE ADDRESS OF CREATION DATE FPL
CTGFVVLT ADDRESS OF THE VOLUME SERIAL
NUMBER LIST
CTGFVRNG ADDRESS OF THE KEYRANGE FPL
CTGFVDVT ADDRESS OF THE DEVICE TYPE FPL
(nonvsam)
CTGFVSPC ADDRESS OF THE SPACE ALLOCATION
FPL
CTGFVTTR ADDRESS OF THE DSCB TTR FPL
(nonvsam)
CTGFVAMD ADDRESS OF THE AMDSB FPL
CTGFVFSN ADDRESS OF THE FILE SEQ # FPL
(nonvsam)
CTGFVATR ADDRESS OF THE DATA SET ATTR FPL
CTGFVBUF ADDRESS OF THE BUFFERSIZE FPL
CTGFVLRS ADDRESS OF THE RECORDSIZE FPL
CTGFVLMT ADDRESS OF THE GDG LIMIT FPL
CTGFVEXT ADDRESS OF THE EXCEPTION EXIT FPL
CTGFVGAT ADDRESS OF THE GDG ATTRIBUTES
FPL
CTGFVUPG ADDRESS OF THE RGATTR RPL
CTGFVNAM ADDRESS OF THE TRUE NAME FPL
(alias)
CTGFVPWD ADDRESS OF THE RELATED OBJECTS
PASSWORD
CTGFVWKA ADDRESS OF THE CRA FEEDBACK
AREA (not ICF)
CTGFVELT ADDRESS OF THE EXTENT LIST FOR
DEFINE
______________________________________
In the VVR's generated in steps 202 and 203, VVRCATSD field will include an indication that it is a catalog self-describing VVR 72, 73 (FIG. 2). In step 204, a test is made to determine if the user has specified that the lowest level of the index is to reside on the same cylinder as the data portion of the BCS 60. This option may be selected for performance purposes to avoid the necessity of an arm access movement between the BCS index search and actual read of the corresponding BCS data record. If the sequence set (lowest level of the index) is to be located on the same cylinder so that the data portion, a VVR is generated in step 205, which will be a non-primary VVR describing that sequence set, which is separate data (extents) from the remainder of the index data set (described by the index VVR generated in step 203). In Table 7 is set forth the format of a primary volume VVR, and in Table 8 is the format of a non-primary volume VVR. VVR's 112, 115, 120, and 121 are examples of primary VVR's, while VVR 118 is a non-primary VVR (see FIG. 3).
TABLE 7
______________________________________
Example of VVR Cells for Primary Volume VVR
______________________________________
##STR8##
______________________________________
The first VVR for a data set is the primary VVR and contains the information pertaining to a data set that remains constant over all of its volumes (data sets may span many volumes). Data set information begins with the label VVRATTR1 and ends with the AMDSB fields (see Tables 4 and 6 in connection with Table 7). Continuing with the description of FIG. 4, in step 206 the VVR's generated in steps 202-205 are written under control of VVDS manager 34 by media manager 54 onto DASD 20. The operation of VVDS manager 34 is described in greater detail in connection with FIG. 11. When VVDS manager 34 (FIG. 11) is called by step 206, during definition of an ICF catalog, VVDS 70 may not already exist or be open (see steps 240-244). The actual write of the VVR's of step 206 (FIG. 4) will occur in step 247 (FIG. 11). In steps 207 and 208, BCS manager 32 builds in main storage 28 a BCS self-describing sphere record from user-specified parameters (see discussion of step 202) and relative byte addresses (RBA) returned from VVDS manager 34. The key of such a self-describing sphere record is all zeros to ensure it is the first record in the catalog. The data component name is the user-defined catalog name. In step 209, VSAM record manager 52 writes the self-describing sphere record 76 into BCS 60 on DASD 20. Self-describing sphere record 76 is the sphere record in BCS 60 which points 73 to the VVR's 72, 77 describing the BCS 60 data set. It is, thus, a special case of the sphere records described in Tables 9-14, below.
TABLE 9
______________________________________
Sphere Record
______________________________________
##STR10##
CLUSTER COMPONENT
##STR11##
DATA COMPONENT
______________________________________
In Table 9, the sphere record is shown having a cluster component and a data component, and thus refers to a VSAM ESDS. A sphere record for a VSAM KSDS would further include an index component having a name cell (Table 10), owner cell (Table 11), security cell (Table 12), and a volume cell (Table 14). If the KSDS includes a sequence set which resides with the data component, an additional volume cell (Table 14) is provided for the index set. In Table 9, two volume cells (Table 14) are shown, one referencing a primary VVR and the other a non-primary VVR for a multi-volume data set.
TABLE 10
______________________________________
Sphere Record Name Cell
##STR12##
NAME DESCRIPTION
______________________________________
CLCELLN Name Cell length includes itself.
CLTYPE Type `C` for Cluster.
CLCOMPLN Length of the Cluster component.
CLNOEXT Number of Extension Records (240 max.).
CLNMLEN Length of cluster key (45 bytes).
CLNAME Cluster name is part of the key.
CLNMPAD Pad character is also part of the key.
______________________________________
In FIGS. 6 and 7 the steps for defining or recataloging a VSAM data set into an ICF catalog are set forth. In step 211, as will be more fully described in connection with FIG. 17, BCS manager 32 serializes write access to assure exclusive control for write. Further, in a multi-processing environment, the control block structure maintained at the CPU for the BCS must be updated to reflect changes previously made to the shared BCS by another CPU before proceeding to define or recatalog a data set. In step 212, BCS manager 32 determines (by examination of user-provided data, field CTGFVRCT) if the data set is to be recataloged. If so, control is passed to VVDS manager 34 which will search the VVDS for the VVR's containing the key of the data set and return with the RBA's of the VVR's. In step 214, BCS manager generates the sphere record (see Tables 9-14) which, in step 223, is written out to DASD 20 in BCS 60. In step 224, serialization is released. If the data set to be cataloged (by way of example, let that be data set having key K7, FIG. 3) is not being recataloged (step 212), in step 215 DADSM 36 is invoked to allocate space on volume 25 for the user VSAM data set (data component 152 and index component 151 on DASD volume 25, FIG. 3). In step 216, data VVR record 121 is generated in main storage 28 by BCS manager 32. In the present example, the data set is a VSAM KSDS requiring an index component. Consequently, in decision step 217, control is passed to step 218, and BCS manager 32 generates index VVR record 120. The format of VVR records 120 and 121 is shown in Table 7, with Tables 3-6 giving further definition of the VVR field contents. In step 219 it is determined if the sequence set (lowest level of the index) is to reside on the same cylinder as the data. If so, in step 220 the sequence set VVR is generated by BCS manager 32. In step 221, VVDS manager 34, to be more fully described in connection with FIG. 11, is invoked to write VVR records 120 and 121 from main storage 28 into VVDS 133 on DASD 25 (see step 247) and return to BCS manager 32 the RBA's of the VVR's. In step 222, BCS manager 32 generates the data set sphere record 87 (Tables 9-14) from user-specified parameters in the catalog parameter list (Table 1), field vector table (Table 2), and the field parameter lists (see IBM Publication SY 26-3826), and from the RBA information returned from VVDS manager 34. In Table 15, below, are set forth in pseudo code the process steps executed by the computing system under control of ICF Catalog 30 for defining a user data set, herein a VSAM data set, on a volume.
TABLE 15
______________________________________
ICF Catalog - VSAM Data Set Define Processing
______________________________________
320 Serialize the BCS for write access.
321 If the data set is to be recataloged, then
322 Call VVDS manager to read the VVR's for the data set.
323 Build the data set sphere record, using information
from the VVR's and the RBA's
returned by VVDS manager.
324 Else the data set is being defined for the first time.
325 Call DADSM to allocate DASD space for the data set.
326 Build the VVR for the data component of the data set,
using information provided by the caller.
327 If the data set is to be key-sequenced, then
328 Build the VVR for the index component of the data
set.
329 If the sequence set is to reside with the data
component, then
330 Build the VVR for the sequence set.
331 Call VVDS manager to write the VVR's for the data set.
332 Build the data set sphere record, using information
provided by the caller and the RBA's returned by
VVDS manager.
333 Call VSAM record management to
write the data sphere record.
334 Release BCS serialization.
______________________________________
Referring now to FIGS. 8-10, the operation of the computing system will be described for opening (preparing for reading or writing by the user's program) a VSAM data set. In step 225 the volumes containing the user data set are mounted, and in step 226 the BCS is serialized for read access (see FIG. 17). If, in step 227, it is determined that the catalog is not opened in steps 228, 237, and 238, VVDS manager (FIG. 11) is invoked (step 248) to retrieve the VVR's describing the BCS, and then the VSAM control blocks for the BCS are built, and the BCS is placed in an open state (available for read and write access). In step 229, the data set sphere records are retrieved from BCS. In step 230, the sphere records are examined to fetch the VVR RBA's, and in step 231 VVDS manager 34 is invoked to retrieve and load into main storage 28 the VVR's associated with the sphere records. In step 232 it is determined whether the VVR RBA's were correct (see step 267, FIG. 13). If not, in step 233 the RBA's are corrected in the sphere record, and in step 234 the corrected sphere record is written out to BCS by VSAM record manager 52. In step 235, the catalog serialization is released, and in step 236 the VSAM data set control blocks are built in main storage 28 using data set characteristics from the VVR's. The data set is now opened. Referring now to FIG. 11, the operation of VVDS manager 34 will be described. The caller of VVDS manager 34 supplies a parameter list (Table 15) with fields initialized according to the type of request. In step 239, the VVDS manager allocates the volume containing or to contain the VVDS. In step 240 a determination is made if, for this request, a VVDS already exists. It would not exist, for instance, if the VVDS manager were being invoked to write VVR's to a new volume (one not already containing a VSAM data set). If the VVDS does not exist, DADSM 36 allocates space, and then, in step 242, VVDS manager 34 formats the VVDS, creates and writes, using the facilities of media manager 54, the volume control record VVCR and the VVDS self-describing VVR's. The VVCR is described in Table 17. It is a space map for the VVDS, and includes a catalog entry identifying each BCS using that VVDS (by having data sets on the volume mapped by VVR's in the VVDS). The VVCR, for each control interval (CI) in the VVDS, contains a field indicating the number of bytes not used in the control interval. This permits VVDS manager 34 to find an area large enough to insert a new record or to move an updated VVR to a new location (due to length change). Another field in the VVCR contains a count of the control intervals in the VVDS, enabling VVDS manager 34 to handle multi-CPU cases. The VVCR also includes the flags, CI count, and entries identifying catalogs having entries in the VVDS. (Each entry includes catalog name and the RBA's of the BCS self describing VVR's for the data, index, and sequence set components, if present). If, in step 243, it is determined that the VVDS is not already open, it is opened in step 244 by building in main storage 28 the control blocks required to allow access to the VVDS. In step 245, the request is serialized, and in steps 246-249 the requested operation is performed. These will be further described in connection with FIGS. 13-14. In step 250, VVDS serialization is released.
TABLE 16
______________________________________
VVDS Manager Protocol Parameter List (VVDS PARM)
FIELD NAME
DESCRIPTION
______________________________________
Header Section
VDSRQTYP Request type flags
VDSFREAD Type READ
VDSFISRT Type INSERT
VSDFDLET Type DELETE
VDSGETUP Type GET FOR UPDATE
VDSGENRD Type GENERIC READ
VDSDELCT Type DELETE CATALOG NAME
VDSENDUP Type END UPDATE
VDSBCSOP Type BCS OPEN
VDSGENDT Type GENERIC DELETE
VDSPUTUP Type PUT FOR UPDATE
VDSRETCT Type RETURN CATALOG NAMES
VDSHRSVD Reserved bytes
VDSUCBAD Address of UCB (or DEVTYP if VDSDVTYP
is set)
VDSVOLSR Volume serial number
VDSFLAG1 Volume section flags
VDSDVTYP Indicates VDSUCBAD contains the device type
VVDSLNCHG Indicates Get for Update with length change
VDSFRBA Ptr to first RBA entry
RBA Section
VDSNXRBA Address of next RBA entry
VDSRBAFG RBA entry flags
VDSNOSCH Do not perform automatic search of VVDS if
incorrect RBA passed
VDSCATLG This VVR is for a Catalog
VDSCLUS For Generic Read/Delete, treat component
name field as 45 byte key (cluster name)
VDSERRFG Error indicator
VDSERRBA The RBA passed was incorrect. A correct
RBA may be found in its corresponding
VDSNWRBA field in this parameter list
VDSERBUF The buffer provided for this entry is not
sufficient. The correct length can be
found in the corresponding VDSNWBFL field
for this entry
VDSBUFLN Length of buffer for this entry (see
VDSBUFAD)
VDSBUFAD Address of variable length buffer for
this entry. For GENERIC READ, address
of RBA table.
VDSRBA RBA of CI containing desired record.
VDSNWRBA Corrected RBA of CI
VDSCIPTR Ptr to CI for Get for Update
VDSNWBFL Corrected buffer length.
VDSCMPLN Length of Component name for this entry
up to 44 bytes).
VDSCMPNM Component name.
VDSCATLN Length of Catalog name for this entry.
VDSCATNM Catalog name.
VDSLKRGL Length of low Key Range for this entry.
VDSLKYRG Low Key Range for this entry (variable
length).
______________________________________
CATALOG ENTRY As previously noted, VVDS manager 34 provides twelve types of requests for the caller (see Table 16), as follows: (a) READ (retrieve one to eight VVR's from VVDS) (b) INSERT (add one VVR to VVDS) (c) DELETE (remove one VVR from VVDS) (d) GET FOR UPDATE (get VVR to be updated) (e) PUT FOR UPDATE (write changed VVR) (f) GENERIC READ (read all VVR's matching generic key) (g) GENERIC DELETE (delete all VVR's matching generic key) (h) EXPLICIT DEFINE OF VVDS (user requests definition of VVDS) (i) BCSOPEN (used in conjunction with opening an ICF Catalog) (j) DELETE CATALOG (allows Catalog name deletion in VVCR) (k) END UPDATE (used to abort a GET/PUT UPDATE request) (l) RETURN CATALOG NAMES (returns all Catalog names from VVCR) The following paragraphs describe the parameter list settings (Table 16) for each of the different request types. READ Read returns from 1 to 8 VVR's specified in the RBA entries in the parameter list. The header portion of the parameter list is initialized and one RBA entry is included for each VVR requested. The RBA entries are initialized as follows:
______________________________________
(a) VDSNXRBA points to next RBA entry or zero if end
of chain.
(b) VVDSBUFLN set to length of buffer to receive VVR.
(c) VDSBUFAD set to address of buffer to receive VVR.
(d) VDSRBA set to RBA of CI containing the VVR to
be read.
(e) VDSCMPLN set to number of characters to use in
next field (VDSCMPNM).
(f) VDSCMPNM set to component name for desired VVR.
(g) VDSCATLN set to zero (catalog name not required
on READ).
(h) VDSLKRGL set to number of characters in keyrange
if a particular keyrange is desired.
(i) VDSLKYRG set to keyrange if a particular keyrange
is desired.
(j) VDSSEQS set to on to read sequence set VVR for
specified component.
______________________________________
The desired VVR (based on component name and keyrange (if specified) is returned in the caller supplied buffer (including the length). INSERT Insert adds one VVR to specified VVDS. Only one RBA entry is used and the header portion of the parameter list is initialized. The RBA entry is initialized as follows:
______________________________________
(a) VDSNXRBA set to zero.
(b) VDSCATLG set to one if specified VVR is for a
catalog.
(c) VDSBUFLN set to length of buffer containing VVR.
(d) VDSBUFAD set to address of a buffer containing
the VVR to be inserted (including the
length of the VVR).
(e) VDSCATLN set to number on characters to use in
next field (VDSCATNM).
(f) VDSCATNM set to catalog name.
______________________________________
Upon successful return from VVDS Manager, the following field is initialized:
______________________________________
(a) VDSNWRBA set to the RBA of the CI in which the
VVR was inserted.
______________________________________
DELETE Delete deletes from one to eight VVR's specified in the RBA entries in the parameter list. The header portion of the parameter list is initialized and one RBA entry is included for each VVR to be deleted. The RBA entries are initialized as follows:
______________________________________
(a) VDSNXRBA points to next RBA entry or zero if
end of chain.
(b) VDSCATLG set to one if specified VVR is for
a catalog.
(c) VDSRBA set to RBA of CI containing VVR to
be deleted.
(d) VDSCMPLN set to number of characters in next
field (if deleting a non-catalog VVR).
(e) VDSCMPNM set to component name (if deleting a
non-catalog VVR).
(f) VDSCATLN set to number of characters in next
field.
(g) VDSCATNM set to catalog name (if deleting a
catalog VVR).
(h) VDSLKRGL set to number of characters in next
field.
(i) VDSLKYRG set to low keyrange to delete a
specific keyrange VVR (if deleting
a non-catalog VVR).
______________________________________
GET for UPDATE GET for UPDATE returns one VVR specified in an RBA entry to be updated. The header portion is initialized and one RBA entry is specified. The RBA entry is initialized as follows:
______________________________________
(a) VDSNXRBA set to zero.
(b) VDSCATLG set to 1 if VVR is for a catalog.
(c) VDSBUFLN set to length of buffer to receive
VVR.
(d) VDSBUFAD set to address of buffer to receive
VVR.
(e) VDSRBA set to RBA of CI containing VVR
to be read.
(f) VDSCMPLN set to number of characters in next
field.
(g) VDSCMPNM set to component name.
(h) VDSCATLN set to number of characters in next
field.
(i) VDSCATNM set to catalog name.
(j) VDSLKRGL set to number of characters in next
field (if keyrange is desired).
(k) VDSLKYRG set to keyrange desired.
______________________________________
This request type is specified in conjunction with PUT for UPDATE. This same parameter list is used for the PUT for UPDATE call. (The field VDSCIPTR contains information which is passed between the GET and PUT calls.) The field VDSLNCHG is set to one if the update process includes changing the length of the VVR. PUT for UPDATE PUT for UPDATE writes out the updated VVR specified in an RBA entry. The header portion of the parameter list is initialized and one RBA entry is specified. The RBA entry is initialized as follows:
______________________________________
(a) VDSNXRBA set to zero.
(b) VDSCATLS set to one if VVR is for a catalog.
(c) VDSBUFLN set to length of buffer containing VVR.
(d) VDSBUFAD set to address of buffer containing VVR.
______________________________________
END UPDATE END UPDATE frees buffers and control blocks associated with a GET for UPDATE request which is being aborted. It performs cleanup operations such as DEQing any resources obtained during previous GET for UPDATE request. The header portion of the parameter list is initialized and one RBA entry is specified. The parameter list is the same one that was used for the previous GET for UPDATE request since it contains information needed between calls. No fields in the RBA entry need be initialized. BCSOPEN BCSOPEN returns all VVR's and their RBA's (data, index, and sequence set (if it exists), in that order). The header portion is initialized and three RBA entries are specified. The RBA entries are initialized as follows:
______________________________________
(a) VDSNXRBA set to address of next RBA entry or
zero if last one.
(b) VDSBUFLN set to length of buffer to receive
VVR.
(c) VDSBUFAD set to address of buffer to receive
VVR.
(d) VDSCMPLN set to 0.
(e) VDSCATLN set to number of characters in next
field (specify only in first RBA
entry).
(f) VDSCATNM set to catalog name.
______________________________________
The VVDS manager returns the following information, as well as the VVR's themselves in the supplied buffers:
______________________________________
(a) VDSNWRBA set to the RBA of the CI containing
the desired VVR.
______________________________________
DELETE CATALOG NAME The specified catalog name is deleted from the VSAM Volume Control Record if no VVR's can be found in the VVDS that belong to the catalog name being deleted. The header portion of the parameter list is initialized and one RBA entry is specified. The RBA entry is initialized as follows:
______________________________________
(a) VDSNXRBA set to zero.
(b) VDSCMPLN set to zero.
(c) VDSCATLN set to number of characters in the next
field.
(d) VDSCATNM set to catalog name to be deleted.
______________________________________
RETURN CATALOG NAMES Returns the portion of the VSAM Volume Control Record (Table 17) containing the list of catalog names. The header portion is initialized and one RBA entry is specified. The RBA entry is initialized as follows:
______________________________________
(a) VDSNXRBA set to zero.
(b) VDSBUFLN set to length of buffer to contain
the list of catalog names.
(c) VDSBUFAD set to address of buffer to contain
the list of catalog names.
______________________________________
GENERIC READ GENERIC READ returns an array of generic read entries of the following format: (1) length of a VVR. (2) the RBA of the VVR. (3) a flag indicating primary or secondary VVR and data or index VVR. (4) the VVRAMATR byte from the AMDSB. VVDS manager scans the entire VVDS for any VVR's matching the desired specifications. The above information is supplied by VVDS manager for each VVR specification match (key match). The header portion of the parameter list is initialized and one RBA entry is specified. The RBA entry is initialized as follows:
______________________________________
(a) VDSNXRBA set to zero.
(b) VDSBUFLN set to length of buffer to contain
the generic read entries.
(c) VDSBUFAD set to address of buffer to contain
the generic read entries.
(d) VDSCMPLN set to number of characters in next
field.
(e) VDSCMPNM set to component name.
(f) VDSCATLN set to number of characters in next
field.
(g) VDSCATNM set to catalog name.
______________________________________
The generic search key consists of the VDSCMPNM field (if specified) and the VDSCATNM field (if specified). If the search is to be performed by catalog name only, VDSCMPLN is set to zero and the catalog name specified in VDSCATNM. If the search is to be performed by component name only, VDSCMPNM is initialized and VDSCATLN set to zero. If both fields are to be used as a key, then both fields are initialized. In general, the length fields are initialized for the key entries. For example, if no Key Range is to be specified as part of the key, the length must be set to 0 to indicate a zero length. For multiple key requests, the VVDS manager searches the variable section of the parameter list for each of the 3 parts of the key. If the RBA specified is incorrect, VVDS manager 34 automatically searches the entire VVDS for a VVR matching the specified key. This situation can occur if the VVR has been moved into a different CI due to an update request with a length change. The new (updated) VVR may be too long to fit back in the same CI, which forces the VVDS manager to find a new CI in which to place the record. The RBA of the CI in which the updated record is placed is returned in the VDSNWRBA field of the current entry and the VDSERRBA bit in VDSERRFG is set. If the VVR cannot be found during the search, an error indication is returned. The user may suppress the automatic search by setting the VDSNOSCH bit in the VDSENTFG for the current entry. If the caller does not know the RBA of the CI needed, or wants VVDS manager to search the entire VVDS, the caller supplies an RBA of zero. If the buffer passed to VVDS manager (by the caller) is not large enough to contain the VVR requested, the VDSERBUF bit in VDSERRFG is set, and the correct buffer length needed will be placed in the current entry's VDSNWBFL field. The caller must then call VVDS manager again providing the proper record length. The caller indicates the type of call by initializing VDSRQTYP. The field VDSUCBAD may be initialized to contain a UCB address (if known) or the device type (from the Catalog). If a device type is specified, the bit VDSDVTYP in VDSFLAG1 is also set. In this case, VVDS manager will handle allocating a unit and mounting/verifying the correct volume when necessary. If a UCB address is specified, VVDS manager 34 assumes that the device is allocated to this job step and proceeds accordingly. The volume serial number must always be specified in order that VVDS manager may ensure that the proper volume is being used. The only other field in the Header Cell is VDSLNCHG in VDSFLAG1 which is initialized for GET/PUT for UPDATE requests. It is set to 1 if the length of the VVR is to be changed (eg.: data set extend). The field VDSNXRBA is initialized to point to the next RBA entry or zero if no more entries. The VDSNOSCH bit in VDSRBAFG may be set to 1 if the caller wants to suppress the VVDS automatic search function. The VDSCATLG bit in VDSRBAFG must be set during INSERT, DELETE, and GET/PUT UPDATE calls to indicate that the VVR is for a catalog. The field VDSBUFAD will normally point to a buffer that contains a VVR to be written, or that is to be used to place the VVR during a read operation. For the Rename Catalog call, VDSBUFAD will point to the new catalog name and VDSCATNM will contain the old catalog name. For Get for Update calls with no length change (eg.: VDSLNCHG=OFF), VDSBUFAD points to a 4K (CI size) buffer. VVDS manager reads the VVR and moves it into the buffer. The caller then modifies the VVR and calls VVDS manager for Put for Update (using the same parameter list as was used in the Get for Update call previously). The field VDSRBA must be initialized to the RBA of the CI containing the desired VVR for READ, GET for UPDATE, DELETE, and PUT for UPDATE calls. In Table 18 below, are set forth in pseudo code the process steps executed by the computing system under control of VVDS manager 34 for building and opening a VVDS and for invoking a requested VVDS function (read, write, etc.).
TABLE 18
______________________________________
VVDS Manager
______________________________________
340 Request dynamic allocation to ensure that the required
volume is available.
341 If the required VVDS is not already open, then
342 If there is no VVDS on the volume, then
343 Call DADSM to allocate DASD space for the VVDS.
344 Build the control blocks required to access the VVDS;
i.e. Open the VVDS.
345 If the VVDS has not already been preformatted, then
346 Call media manager to preformat the VVDS.
347 Build a VVCR and a VVDS self-describing VVR.
348 Call media manager to write the VVCR and the
self-describing VVR.
349 Serialize VVDS access appropriately for this request.
350 Invoke the requested VVDS function (read, write, BCS
open, etc.)
351 Release VVDS serialization.
______________________________________
Referring now to FIG. 12, the operation of VVDS manager 34 is described for those requests which require that a VVR be written into the VVDS, including INSERT and PUT for UPDATE. In step 251, the VVCR (Table 17) is read into main storage 28, and then searched for the catalog name VDSCATNM in the VVDSPARM (Table 16). If, in step 252, the catalog name is not found in the VVCR, in step 253 the catalog entry is made in VVCR (Table 17). In step 254, the next VVR to be written is selected, as a user may pass a number of such VVR's to the VVDS manager for writing. In step 255, the VVCR (Table 16) is searched for a control interval (CI, which is the smallest unit of addressable space) containing sufficient free space for the VVR. The selected control unit is read, in step 256, into main storage 28. In step 257, the VVR is written into the control interval record in the VVDS on DASD. For this purpose, VVDS 34 passes control to media manager 54. In step 258, the VDSCATLG bit in VVDSPARM is tested to determine if the VVR to be written is a catalog self-describing VVR 72, 73. If so, in step 259, the RBA entries for the catalog are updated in the VVCR. These RBA records are needed for bootstrapping to open a BCS. In step 260, the free space information for the control interval containing the VVR is updated. In step 261, the VVCR is written out to DASD. In step 262, the RBA of the VVR is returned to the caller of VVDS manager so that information can be written into the sphere record for the data set described by the VVR. In step 263, if more VVR's are to be written, steps 254-262 are repeated. In Table 19 below, are set forth in pseudo code the process steps executed by the computing system under control of VVDS manager 34 for processing a write request.
TABLE 19
______________________________________
VVDS Manager - Write Request Processing
______________________________________
370 Allocate the VVDS on the correct volume and serialize
for write access.
371 Call media manager to retrieve the VVCR.
372 Do for each VVR to be written:
373 Search the space map in the VVCR for a CI with
sufficient free space for the VVR.
374 Call media manager to retrieve the selected CI.
375 Return the RBA of the CI.
376 Search the VVCR for the catalog name.
377 If the catalog name is not in the VVCR, then
378 Insert the catalog name into the VVCR.
379 If the VVR to be written is for the catalog, then
380 Update the appropriate RBA in the catalog entry
in the VVCR.
381 Copy the VVR into the selected CI.
382 Update the space map in the VVCR.
383 Call media manager to write the VVCR and the new VVR.
384 End.
385 Release VVDS serialization.
______________________________________
Referring now to FIG. 13, the operation of VVDS manager 34 is described for those requests which require that a VVR be read into main storage 28, including READ, GENERIC READ, and GET for UPDATE. This is necessary for the user to obtain from the VVR the information required to open data set(s). As the user can request that a plurality of VVR's be read by specifying a plurality VDSCMPNM data set name (or key) and VDSRBA address pointers, in step 264 the first or next VVR request is selected. In step 265, it is determined if the caller provided the RBA (field VDSRBA) for direct access of the VVR. If so, then in step 266 the control interval CI specified by field VDSRBA is read into main storage 28. In step 267 the VVR key field VVRKEY (Table 3) is compared with the key field VDSCMPNM provided in VVDS Manager Protocol Parameter List (VVDSPARM, Table 16) by the requester. If these match, in step 270 the requested VVR is loaded into the buffer specified by the requester in fields VDSBUFAD (address) and VDSBURLN (length) in VVDSPARM, Table 16. If more VVR's have been requested, step 271 returns control to step 264 to repeat the process. If, in step 267, the keys (VVRKEY and VDSCMPNM) do not match, as is expected, for example, when the catalog pointers are not updated following a relocation of the VVR, then it is necessary (unless the requester suppresses the search) to key search in step 268, VVDS for the correct VVR. When it is found, the RBA of the control interval containing the correct VVR is loaded in step 269 into VDSNWRBA (Table 16) and thus returned to the requester for updating field VOLVVRBA of the sphere record for the data set (Table 14). By way of further explanation, the machine-implemented method of the invention will be described in Table 20 in a pseudo code listing which, as is apparent to those skilled in the art, can be converted into a compilable language, such as PL/1, without undue experimentation.
TABLE 20
______________________________________
VVDS Manager, Read Request Processing
______________________________________
400 Allocate the VVDS on the correct volume and
serialize (Table 18, line 6376) for read access.
401 Do for each VVR requested:
402 If the caller specified an RBA for the VVR, then
403 If the CI identified by the RBA is not already
in storage, then
404 Set up a buffer for the desired CI.
405 End.
406 If any CI's have been identified which must be read,
then,
407 Call Media Manager to retrieve the CI's.
408 Do for each VVR requested:
409 If the caller specified an RBA for the VVR, then
410 Look for the VVR in the specified CI.
411 If the VVR is in the CI, then
412 Indicate VVR found.
413 Else VVR not found
414 Indicate the caller's RBA is incorrect.
415 End.
416 Do for each CI in the VVDS until all CI's processed
or all VVR's found.
417 If the next CI is not already in storage, then
call Media Manager to retrieve the CI.
418 Do for each VVR not already found:
419 Look for the VVR in CI
420 If VVR is in the CI, then
Indicate VVR found.
421 End.
422 End.
423 Do for each VVR requested:
424 If the VVR was found, then
425 If the caller's RBA was incorrect,
or if the caller did not specify an RBA, then
426 Return the correct RBA value.
427 Copy the VVR into the caller's buffer.
428 Else the VVR was not found.
429 Return the VVR-not-found code.
430 End.
431 Release VVDS serialization.
______________________________________
Referring now to FIG. 14, the operation of VVDS manager 34 is described for the BCSOPEN request. In a situation where a user cannot get to the sphere record of his catalog to get the RBA's of VVR's describing his catalog, the BCSOPEN request is made (e.g. the BCS, which contains the self-describing catalog sphere record, is not in an open state, and the VVR's describing the BCS are required to open the BCS). In step 272, the VVCR (Table 17) is searched for the catalog name VDSCATNM provided in the VVDSPARM (Table 16). Once found, in step 273, the DATA RBA, INDEX RBA, and SEQSET RBA (see Table 17) for that catalog name are loaded into VDSNWRBA fields (Table 16). In step 275, READVVR (FIG. 13) is invoked using as RBA's those obtained from the VVCR in step 273 to retrieve the self-describing catalog data, index, and sequence set VVR's. In step 276, as the RBA's in the VVCR could have been bad, a test is made of field VDSERRBA in the VVDSPARM (Table 16). If the VVR RBA's were not correct, in step 277 these are updated in the VVCR from the VDSNWRBA field (Table 16). In step 278 the catalog VVR's are returned to the requester in the buffers specified by the VDSBUFLN and VDSBUFAD fields. FIGS. 15 and 16 describe the operation of the computing system for extending a VSAM data set. In this processing, VVR logical records within the VVDS can be physically moved to different locations within the VVDS; whenever this happens, the new location within the VVDS is updated in the BCS sphere record. A system failure after a VVR move, but prior to updating the BCS sphere record, can leave a down-level VVR pointer in the BCS. This type of error is dynamically corrected by the method of the invention, having particular reference to the operation of FIG. 13, steps 266-269 and FIG. 6, steps 211-214. In step 279, DADSM is invoked to allocate additional space to the data set to be extended, and in step 280 to obtain extent information from VTOC for that additional space, as well as all previously existing space. In step 281, VSAM record manager 52 is invoked to search BCS to obtain the sphere record for the data set to be extended, which is stored in main storage 28. In step 282, the extent information in the VVR is updated according to the method of FIG. 16. If, as is determined in step 283, the data component is being extended and the sequence set is located on the same cylinders as the data component, then in step 284 the sequence set VVR extent information is also updated. In FIG. 16, the detailed steps for steps 282, 284 (FIG. 15) are set forth. In step 285, the sphere record read into main storage 28 is examined to obtain the VVR RBA for the data set component (data, index, or sequence set) being extended. In step 286, VVDS manager 34 is invoked to read (FIG. 13) the VVR, which, in step 287, is updated to add extent information obtained in step 280 from VTOC describing the new allocation of the data set. In step 288, VVDS manager 34 is invoked to write (FIG. 12) the updated VVR. In step 262 (FIG. 12) the RBA of the written VVR is returned, and in step 289 it is determined if the VVR moved to a new location. If so, in step 290 the RBA in the volume cell of the sphere record is updated, and in step 291 written back out to the BCS data set. If a system failure occurs between steps 288 and 291, the sphere record volume cell will include an RBA which is not correct for the moved VVR. This possible lack of synchronization is handled in an advantageous way by the method of the invention. Referring now to FIGS. 17, 18, the catalog serialization routine which enables loosely coupled CPU's 29, 26 to share a catalog 60 and consequently the cataloged data sets, will be described. Each CPU 29, 26 maintains in its own main storage 27, 28 CPU catalog control blocks, created to describe catalog 60 when the CPU opens it. If CPU 29 writes into (or extends) catalog 60, altering its characteristics, the catalog control blocks in main storage 28 become obsolete. Also, if CPU 29 causes the relocation of a VVR and then crashes before updating BCS 60, the catalog control blocks in main storage 28 are not down level, but BCS 60 is not synchronized with respect to the VVR. Consequently, in accordance with the invention, under the control of their respective ICF 30, CPU's 29 and 26 are operated to assure the integrity of BCS 60. Upon entering the catalog serialization procedure, in step 292, it is determined if the resource is to be released or locked. If it is to be released, and if (step 293) it is a catalog residing on shared DASD (such as is shown in FIG. 1, DASD 20), the volume is released in step 294. In step 295, the catalog locks are released, and the catalog is available for locking by another loosely coupled CPU or (in a single processor, multi-programming environment) by another application. If the resource is to be locked (for shared or for exclusive usage), in step 296 it is determined if the resource (catalog) resides on shared DASD, thus loosely coupling two or more CPU's. If so, in step 297 the volume on which it resides is locked out from all CPU's other than that CPU performing serialization. In step 298, it is determined if the request is for updating the catalog and, if so, in step 299 the catalog is locked for exclusive usage. Otherwise, in step 300, the catalog is locked for shared usage. With the catalog locked, and if it resides on shared DASD (step 301), then in step 302 the time stamp check of FIG. 18 is performed. In step 303, VVDS manager 34 is called to retrieve self-describing VVR's for the catalog, and in step 304 the catalog time stamp and the VVR time stamp are compared. If not equal, steps 305-308 are performed to ensure exclusive control of the catalog, invalidate the catalog buffers, update the catalog control blocks from the data set characteristics in the VVR's, and set the catalog time stamp equal to the VVR time stamp. Having described the invention with respect to the system environment, the method steps performed by such a system, and in machine and programming language independent pseudo-code, the method of the invention will be next described in a high-level procedure oriented language, similar to PL/1 that is readily converted into machine instructions by compilers and linkage editors. Compiler and linkage editor design for PL/1 type languages are well within the state of the art and beyond the scope of this invention. It is believed that a proper appreciation of the invention, method and means for cataloging data sets, would be enhanced by describing a typical VVDS manager having the responsibility of locating a volume record (VVR) and returning the same to the user. This VVDS manager is set forth in sequences of PL/1 type language in Tables 21-23 for reading a VVR, and corresponds generally to the method described in FIG. 13 and Table 20.
TABLE 21
__________________________________________________________________________
VVDS Manager Process A Read Request
(Module IGGOCLE0)
__________________________________________________________________________
6305
IGGPVRED:
6306
PROC OPTIONS(NOSAVEAREA,NOSAVE):
/* SPECIFY PROCEDURE OPTIONS
*/
6555
R1=1; /* GET ONE BUFFER */
6556
CALL IGGPVGWA; /* */
6367
VWOENQS=ON; /* ENQ SHARED */
6376
CALL IGGPVALO: /* ALLOC VVDS AND ENQ SHARE
*/
6377
ZRENTRYP=VDSFRBA; /* FIRST VVR ENTRY */
6378
RFY
6379
VDSENTRY BASED(ZRENTRYP);
6380
ZR1=1; /* FIRST WA VVR ENTRY
*/
6381
DO WHILE ZRENTRYP.noteq.0; /* FOR ALL ENTRIES */
6382
DO VWCMPLN(ZR1)=VDSCMPLN TO 1 BY-1 WHILE
6383
VDSCMPNM(VWCMPLN(ZR1))="; /* SET COMPRESSED COMPONENT
6384 NAME LENGTH IN VVR ENTRY
*/
6385
END;
6386
IF VDSSEQS=ON THEN /* IF SEQUENCE SET VVR
*/NTED
6387
DO;
6388
VWVSINDX(ZR1)=ON; /* SEARCH FOR INDEX VVR
*/
6389
VWVSSEQS(ZR1)=ON; /* SEARCH FOR SEQUENCE SET
*/R
6390
END;
6391
VWENTRYP(ZR1)=ZRENTRYP; /* ADDRESS OF PARM LIST
*/TRY
6392
VWVRBA(ZR1)=VDSRBA; /* RBA PASSED */
6393
IF VWVRBA(ZR1)-=0 THEN /* IF NOT ZERO */
6394
VWVFCRBA(ZR1)=ON; /* READ PASSED RBA FIRST
*/
6395
ELSE
6396
VWVRBA(ZR1)=VVVRFST; /* START SEARCH AT FIRST
6397 USER CI */
6398
IF VDSNOSCH=ON THEN /* IF NOT TO AUTO SEARCH
*/
6399
VWVFNOSC(ZR1)=ON;
6400
VWVFRD(ZR1)=ON; /* VVR SHOULD BE READ
*/
6401
VWVSCOMP(ZR1)=ON; /* SEARCH BY COMPONENT
*/ME
6402
IF VDSLKRGL-=0 THEN /* IF LOW KEYRANGE SPECIFIED
*/
6403
VWVSLOKR(ZR1)=ON; /* SEARCH ON IT */
6404
ZRENTRYP=VDSNXRBA; /* NEXT VVR ENTRY */
6405
ZR1=ZR1+1; /* NEXT WA VVR ENTRY */
6406
END;
6414
CALL IGGPVRDX; /* READ THE VVRS */
6415
ZRENTRYP=VDSFRBA; /* FIRST VVR ENTRY */
6416
ZR2=1; /* FIRST WA VVR ENTRY
*/
6417
DO WHILE ZRENTRYP-=0; /* FOR ALL ENTRIES */
6418
IF VWVFINCR(ZR2)=ON THEN /* IF RBA PASSED INCORRECT
*/
6419
DO;
6420
VDSERRBA=ON; /* SET INCORRECT IN PARM
*/
6421
VDSNWRBA=VWVRBA(ZR2); /* NEW RBA */
6427
END;
6428
IF VWVFZIP(ZR2)=OFF THEN /* IF VVR FOUND */
6429
DO;
6442
R0=VDSBUFAD; /* POINT TO USERS BUFFER
*/
6443
R8=VWVVVRP(ZR2); /* ADDRESS OF VVR IN CI
*/
6444
R9=R8->VVRLEN; /* SIZE OF VVR */
6445
IF VDSBUFLN>=VWVVVRP(ZR2)->VVRLEN THEN
/* IF COMPLETE VVR
6446 WILL FIT IN USERS BUFFER
*/
6447
R1=R9; /* SIZE OF VVR */
6448
ELSE /* USERS BUFFER TOO SMALL
*/
6449
DO;
6450
R1=VDSBUFLN; /* MOVE ALL THAT WILL FIT
*/
6451
VDSERBUF=ON; /* SET INCORRECT IN PARM
*/
6452
VDSNWBFL=VWVVVRP(ZR2)->VVRLEN;
/* CORRECT LEN */
6458
END;
6459
MVCL(R0,R8); /* MOVE VVR TO USERS BUFFER
*/
6465
END;
6466
ELSE /* VVR NOT FOUND */
6467
DO;
6481
CALL IGGPVXIT; /* EXIT TO CALLER */
6482
END;
6483
ZRENTRYP=VDSNXRBA; /* NEXT VVR ENTRY */
6484
ZR2=ZR2+1; /* NEXT WA VVR ENTRY */
6485
END;
6494
CALL IGGPVXIT; /* EXIT */
6500
END; /* END OF INNER PROCEDURE
*/
__________________________________________________________________________
| ||||||
