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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using <strong>SAS</strong> Data Libraries Direct Access Bound Libraries 41<br />

These <strong>SAS</strong> statements use the V9 engine to create a library named<br />

prefix.STUDY1.<strong>SAS</strong>LIB where prefix is the value of the SYSPREF system option. The<br />

amount of space allocated to the library is derived from the value of the FILEUNIT,<br />

FILESPPRI, and FILESPSEC system options. <strong>SAS</strong> automatically sets the appropriate<br />

DCB attributes. In an interactive session, it is possible to omit the DISP option; in this<br />

case, <strong>SAS</strong> assumes a status of NEW and prompts <strong>for</strong> the value of the normal disposition.<br />

The following example creates an external assignment using JCL:<br />

Example Code 2.2 External Assignment Using JCL<br />

//jobname JOB ...<br />

// EXEC <strong>SAS</strong><br />

//STUDY DD DSN-USER489.STUDY1.<strong>SAS</strong>LIB,DISP=(NEW,CATLG),<br />

// UNIT=DISK,SPACE=(CYL,(200,50)),DCB=DSORG=PS<br />

data study.run1;<br />

...<br />

run;<br />

Assuming that the ENGINE system option uses the default of V9, these <strong>SAS</strong><br />

statements create a library named USER489.STUDY1.<strong>SAS</strong>LIB.<br />

As in the previous example, <strong>SAS</strong> automatically sets the appropriate DCB attributes.<br />

Note that it is not necessary to specify the LIBNAME statement.<br />

The following example explicitly specifies the V6 compatibility engine:<br />

Example Code 2.3 External Assignment Using JCL to Specify a Compatibility Engine<br />

//jobname JOB ...<br />

// EXEC <strong>SAS</strong><br />

//HIST DD DSN=USER489.HISTORY1.<strong>SAS</strong>LIB,DISP=(NEW,CATLG),<br />

// UNIT=3390,SPACE=(CYL,(10,10)),<br />

// DCB=(DSORG=PS,BLKSIZE=27648)<br />

libname hist V6;<br />

data hist.analysis;<br />

...<br />

run;<br />

Like the previous JCL example, this example uses external assignment; however, the<br />

V6 compatibility engine is explicitly specified in the LIBNAME statement. This library<br />

can now be processed by <strong>SAS</strong> Version 6. In addition, the DD statement in the JCL<br />

explicitly specifies the library block size.<br />

General Usage Notes<br />

3 Only one <strong>SAS</strong> session can open a direct access bound library <strong>for</strong> update at a given<br />

time. It is necessary to specify a disposition status of NEW, OLD, or MOD in order<br />

to update a <strong>SAS</strong> data library. However, multiple <strong>SAS</strong> sessions can share a <strong>SAS</strong><br />

data library <strong>for</strong> read-only access using DISP=SHR. Except <strong>for</strong> a special case of<br />

relevance only during the installation of the <strong>SAS</strong> product, <strong>SAS</strong> will not open to<br />

update a library that is allocated DISP=SHR.<br />

3 The data set in which a direct access library resides is itself a simple physical<br />

sequential data set. There<strong>for</strong>e, the library data set can be copied or backed up<br />

(subject to the restrictions below) to disk or to tape using standard z/<strong>OS</strong> utilities<br />

such as IEBGENER, ISPF/PDF 3.3, or DF/HSM. However, the copy of the library<br />

data set cannot be opened by <strong>SAS</strong> unless it resides on DASD.<br />

3 The library data set <strong>for</strong> a direct access bound library must not be copied or backed<br />

up while <strong>SAS</strong> has the library open <strong>for</strong> update. Failure to respect this restriction

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

Saved successfully!

Ooh no, something went wrong!