Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

Allocating Multivolume SAS Data Libraries

A non-HFS SAS data library on disk that was created in Version 6 or later may span more than one volume. The operating environment data set that contains the SAS data library may exist on multiple DASD volumes, but it is processed by SAS software as one logical entity. This capability greatly increases the storage capacity of a data library.

There is no SAS limit on the number of DASD volumes that a data library may occupy. You will likely take one of two general approaches to allocating new multivolume libraries, depending on why you need them. If you have an extremely large data library, requiring more than one DASD volume, you will probably want to preallocate the library on the desired volumes, most likely in full volume increments. If you have medium to large libraries requiring less than a full volume of space, and you need multivolume support because your available DASD space is fragmented across many volumes, then you will probably want to allocate them dynamically. Both allocation methods are described below.


General Guidelines

When creating a multivolume SAS data library, observe the following guidelines:


Preallocating New Multivolume Libraries

These examples show some typical multivolume preallocations. They all show full-volume space allocations for a 3390, because this would be a typical case for preallocating large data libraries, but any allocation size will work. Note that multivolume libraries are not required to consume whole volumes. Also, because SAS will attempt to acquire secondary space allocations only on the last volume of a multivolume data library, you should not specify secondary space allocations on preallocated libraries. (IEFBR14 is an IBM utility program that simply returns immediately, allowing you to force the system through normal batch step allocation/deallocation processing.)

The following JCL will prealocate a three-volume 3390 data library:

//ALLOC   EXEC PGM=IEFBR14
//VOL1     DD  DSN=MY.PAYROLL.LIBRARY,DISP=(NEW,KEEP),
//             DCB=(DSORG=PS,RECFM=FS,LRECL=27648,
//             BLKSIZE=27648),UNIT=3390,
//             SPACE=(CYL,1113),VOL=SER=PR0001
//VOL2     DD  DSN=MY.PAYROLL.LIBRARY,DISP=(NEW,KEEP),
//             DCB=(DSORG=PS,RECFM=FS,LRECL=27648,
//             BLKSIZE=27648),UNIT=3390,
//             SPACE=(CYL,1113),VOL=SER=PR0002
//VOL3     DD  DSN=MY.PAYROLL.LIBRARY,DISP=(NEW,KEEP),
//             DCB=(DSORG=PS,RECFM=FS,LRECL=27648,
//             BLKSIZE=27648),UNIT=3390,
//             SPACE=(CYL,1113),VOL=SER=PR0003
//CATDD    DD  DSN=MY.PAYROLL.LIBRARY,
//             DISP=(OLD,CATLG),UNIT=3390,
//             VOL=SER=(PR0001,PR0002,PR0003)

The following JCL will add a fourth volume to the library allocated in the previous example. Notice that you must maintain the original sequence for the volume serial numbers when recataloging the data library.

//ALLOC   EXEC PGM=IEFBR14
//UNCATDD  DD  DSN=MY.PAYROLL.LIBRARY,
//             DISP=(OLD,UNCATLG)
//NEWVOL   DD  DSN=MY.PAYROLL.LIBRARY,
//             DISP=(NEW,KEEP_,DCB=(DSORG=PS,
//             RECFM=FS,LRECL=27648,
//             BLKSIZE=27648),UNIT=3390,
//             SPACE=(CYL,1113),VOL=SER=PR0004
//CATDD    DD  DSN=MY.PAYROLL.LIBRARY,
//             DISP=(OLD,CATLG),UNIT=3390,
//             VOL=SER=(PR0001,PR0002,PR0003,
//             PR0004)

The following JCL will preallocate a three-volume data library in an SMS environment. Note that the SMS STORCLAS specified must allow multiunit allocations and have the GUARANTEED SPACE attribute. Your SMS system administrator will need to set up the specified storage class for you. The SASMV storage class name is used only as an example. The GUARANTEED SPACE attribute causes the system to allocate the primary space amount on each volume when the library is allocated.

//ALLOC   EXEC PGM=IEFBR14
//DD1      DD  DSN=MY.PAYROLL.LIBRARY,
//             DISP=(NEW,CATLG),DCB=(DSORG=PS,
//             RECFM=FS,LRECL=27648,
//             BLKSIZE=27648),SPACE=(CYL,1113),
//             UNIT=(DISK,3),STORCLAS=SASMV
//             


Dynamically Allocating New Multivolume Data Libraries

These examples show typical dynamic multivolume allocations for SAS direct access bound data libraries. The resulting data libraries will contain only as many volumes as the application requires. Only the primary space allocation amount will be obtained at allocation time. SAS will acquire the secondary allocations as they are required, just as with a single-volume data library, but additional volumes will also be acquired whenever secondary allocations are no longer possible on the (current) last volume.

The following JCL allocates a large direct access bound library, using up to three volumes, if required. Note that there must be three available units in the system for this example to work, even if the data library does not require space on all three volumes, because the system chooses the candidate volumes at allocation time.

//SAS     EXEC SAS
//WORK     DD  DSN=MY.MASTER.LIBRARY,DISP=(NEW,CATLG,DELETE),
//             UNIT=(DISK,3),SPACE=(CYL,(300,100))

The following LIBNAME statement allocates a temporary library of up to three volumes.

libname tmp '&&LIB' unit=(sysda,3) space=(cyl,(300,100));

In an SMS environment, you will need to specify a data class with the DATACLAS parameter, which includes a volume count attribute high enough to satisfy your needs. Note that an SMS storage class wtih the GUARANTEED SPACE atttribute is not required as it is when you are preallocating data libraries.


Dynamically Extending Data Libraries to New Volumes

The following JCL example allocates an existing cataloged library that occupies an unspecified and possibly unknown number of volumes that is less than 50. If the original library allocation did not include a secondary allocation amount, then it should be specified here.

For this example to work, there must be 50 available units in the system, even if less than 50 of them are used.

//SAS       EXEC SAS
//PAYROLL    DD  DSN=MY.PAYROLL.LIBRARY,DISP=OLD,
//               UNIT=(,50)

The following LIBNAME statement accomplishes the same thing as the previous JCL example:

libname payroll 'MY.PAYROLL.LIBRARY' disp=old unit=(,50);

This next LIBNAME statement uses the EXTEND option, which is equivalent to UNIT=(,n), where n is one more than the current number of volumes in the existing library:

libname payroll 'MY.PAYROLL.LIBRARY' disp=old extend;


Allocating an Existing Multivolume SAS Data Library

After a multivolume SAS data library has been initially allocated or extended to additional DASD volumes, any of the following statements can be used for allocation as long as the data library is cataloged in volume sequence order.

libname usevols 'sas.mvdatlib';
//USEVOLS   DD DSN=SAS.MVDATLIB,DISP=OLD
x alloc fi(usevols) da('sas.mvdatlib') shr;

Cataloging a multivolume SAS data library ensures that SAS can process it properly without requiring the VOL=SER= list each time the library is allocated for use.

The information in this section applies to the SMS environment as well. There are no special requirements for allocating existing multivolume data libraries in the SMS environment.


Allocating a Multivolume Generation Data Group

As explained in Allocating Generation Data Sets, a SAS data library can be stored and managed as a generation data group (GDG). To allocate a GDG that spans multiple volumes, use either of the following methods:
SMS Define the GDG with a standard IDCAMS job. Ensure that the job does not contain a DD card for the data set; otherwise, the DEFINE GENERATION DATA GROUP statement generates duplicate data set messages and fails. (If you use the GUARANTEED SPACE attribute in an SMS environment, data set information is allocated on all designated packs; the DEFINE recognizes that information has been duplicated and fails.) When creating a new generation, use the relative form of the data set name in your DD card.
IEFBR14 Define the GDG with a standard IDCAMS job. When creating a new generation, observe the guidelines provided in Allocating Multivolume SAS Data Libraries and use the absolute form of the data set name (for example, DSN=XXX.MULTI.GDG.G0001V00).


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.