Defining a Master Catalog
The sample DLBL command used in the preceding example is almost
identical with the one you would issue to define a master catalog
using AMSERV. The only difference is that you can enter the EXTENT
option so you can list the data spaces that this master catalog is
to control. As an example, suppose that you have a 30-cylinder 3390 minidisk assigned
to you to use for testing your VSAM programs
under CMS. If the minidisk is in your directory at address 333, you
should first access it:
access 333 d
D (333) R/W - DOS
If you formatted the minidisk
yourself, you know what label you assigned it. If not, you can find
out the label assigned to the disk by issuing the CMS command:
query search
The
response might be:
USR191 191 A R/W
VSAM03 333 D R/W - DOS
SYS109 190 S R/O
SYS19E 19E Y/S R/O
Use the volume label VSAM03 in the MASTCAT AMSERV file:
DEFINE MASTERCATALOG -
(NAME (MASTCAT ) -
VOLUME (VSAM03) -
CYL (4) -
FILE (IJSYSCT) )
To find out what extents on the minidisk you can allocate for VSAM,
use the LISTDS command with the FREE option:
listds d (free
The
response from LISTDS might look like this:
FREESPACE INFORMATION FOR 'D' DISK:
CYL-HEAD (RELTRK) TO CYL-HEAD (RELTRK) TRACKS
00000 00001 1 00000 00009 9 9
00000 00011 11 00029 00018 569 560
From this response, you can see that the VTOC is located on the first
cylinder, so you can allocate cylinders 1 through 29 for VSAM:
dlbl ijsysct d dsn mastcat (perm extent
DMSDLB331R Enter extent specifications:
19 551
(null line)
After entering the extents, in tracks, giving
the relative track number of the first track to be allocated followed
by the number of tracks, you must enter a null line to complete the
command. (A null line is required because, when you enter multiple
extents, entries may be placed on more than one line.)Now you can issue the AMSERV command:
amserv mastcat
A
ready message with no return code indicates that the master catalog
is defined. You do not need to reissue the DLBL command to identify
the master catalog for additional AMSERV functions.