02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using <strong>SAS</strong> Data Libraries Using Multivolume <strong>SAS</strong> Data Libraries 63<br />

volume until 16 extents have been allocated <strong>for</strong> the data set on that volume, or the<br />

volume does not contain enough free space to satisfy the request. If the space request<br />

cannot be satisfied, the system will attempt to find space on the next volume, if any,<br />

that is allocated to the library data set. If no additional volumes are allocated to the<br />

data set, the system will issue a system B37 abend, which <strong>SAS</strong> intercepts and reports<br />

as a library full condition.<br />

Requesting Space As Needed<br />

These examples show how to request space as needed <strong>for</strong> <strong>SAS</strong> direct access bound<br />

data libraries.<br />

The following LIBNAME statement allocates a temporary library of up to three<br />

volumes:<br />

libname tmp ’&lib’ unit=(sysda,3) space=(cyl,(300,100));<br />

The following DD statement creates a direct access bound library. The unit count<br />

makes three volumes to be available <strong>for</strong> the job that creates the library. Note that there<br />

must be three available units in the system <strong>for</strong> this example to work, even if the data<br />

library does not require space on all three volumes, because the system chooses the<br />

candidate volumes at allocation time.<br />

//WORK DD DSN=MY.MASTER.LIBRARY,DISP=(NEW,CATLG,DELETE),<br />

// UNIT=(DISK,3),SPACE=(CYL,(300,100))<br />

To extend this library to as many as five volumes using another job, the following DD<br />

statement could be used. The secondary space allocation specified at library creation<br />

time is used to determine the size of the secondary extents added.<br />

//WORK DD DSN=MY.MASTER.LIBRARY,DISP=OLD,UNIT=(DISK,5)<br />

If you want to extend an existing library, but only on the volumes that it already<br />

occupies, it is not necessary to specify the UNIT parameter.<br />

As shown below, it is also possible extend an existing library (not SMS-managed) via<br />

the LIBNAME statement EXTEND option, which is equivalent to specifying UNIT=(,n),<br />

where n is one more than the current number of volumes in the existing library:<br />

libname payroll ’my.master.library’ disp=old extend;<br />

The following DD statement creates an SMS-managed data library, which can extend<br />

to as many as four volumes. For SMS-managed libraries allocated without an explicit<br />

list of volumes, the unit count specified when creating the library, specifies the volume<br />

count <strong>for</strong> the library data set. Note that the volume count can also be specified via the<br />

data class instead of the unit count.<br />

//TEST1 DD DSN=MY.PROJECT.LIBRARY,DISP=(NEW,CATLG),<br />

// UNIT=(DISK,4),SPACE=(CYL,(200,200)),<br />

// STORCLAS=<strong>SAS</strong>STD,DATACLAS=<strong>SAS</strong>STD,DCB=(DSORG=PS,RECFM=FS)<br />

The volume count represents the maximum number of volumes to which the data set<br />

can be extended in creating jobs as well as in subsequent jobs. There<strong>for</strong>e, this library<br />

could be extended to as many as four volumes using the following DD statement:<br />

//TEST1 DD DSN=MY.PROJECT.LIBRARY,DISP=OLD<br />

The following LIBNAME statement could be used as well:<br />

libname project ’my.project.library’;<br />

Extending an existing SMS-managed library does not require a UNIT count, nor does<br />

it have any effect. To increase the volume count <strong>for</strong> an existing SMS-managed library,<br />

use the ADDVOL command of the IDCAMS utility.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!