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.

x alloc dd(result2) path(’/corp/dev/test2’);<br />

Using <strong>SAS</strong> Data Libraries How <strong>SAS</strong> Assigns an Engine 59<br />

Note that allocating HFS libraries in this way provides a convenient way to<br />

establish an external logical name (DDname) <strong>for</strong> an HFS library. No enqueue is<br />

placed on the library.<br />

3 Allocating a new <strong>SAS</strong> data library<br />

The following TSO command allocates a new sequential <strong>SAS</strong> data library on<br />

disk:<br />

alloc fi(intape) da(V9.seqdata) dsorg(ps) recfm(u) new<br />

Notice that DCB attributes are specified. When you allocate a new <strong>SAS</strong> data<br />

library externally, you must either specify DCB attributes or accept the default<br />

DCB attributes that <strong>SAS</strong> supplies.<br />

3 Specifying additional options <strong>for</strong> a previously allocated <strong>SAS</strong> data library<br />

See “Specifying an Engine <strong>for</strong> Externally Allocated <strong>SAS</strong> Data Libraries” on page<br />

59.<br />

Using a DDname as a Libref<br />

Even though a library has been allocated to a DDname externally to <strong>SAS</strong>, the<br />

assignment process is not complete until the library has been referred to within a <strong>SAS</strong><br />

program or feature that specifies the DDname as a libref. At that point <strong>SAS</strong> completes<br />

the assignment process and adds the DDname to its table of active librefs. For example:<br />

proc contents data=books._all_; run;<br />

The first time that the DDname BOOKS is used in this manner, <strong>SAS</strong> assigns it as a<br />

libref <strong>for</strong> the <strong>SAS</strong> data library.<br />

When a DDname is allocated externally, it is not listed by the LIBNAME LIST<br />

statement or in the <strong>SAS</strong> Explorer until after you have used it as a libref in your <strong>SAS</strong><br />

session. (See “Listing Your Current Librefs” on page 61.)<br />

Specifying an Engine <strong>for</strong> Externally Allocated <strong>SAS</strong> Data Libraries<br />

In most cases, <strong>SAS</strong> can identify the proper engine to use <strong>for</strong> existing libraries.<br />

However, when creating new libraries that were allocated externally, you might need to<br />

use the LIBNAME statement or LIBNAME function to override the engine that <strong>SAS</strong><br />

would use by default. For example, suppose you used an X statement to submit the<br />

following TSO ALLOCATE command, which allocates the <strong>SAS</strong> data library<br />

QUARTER1.MAILING.LIST:<br />

x alloc f(mail) da(’quarter1.mailing.list’) new<br />

dsorg(ps) space(10 1) cyl;<br />

You could instruct <strong>SAS</strong> to use the V9TAPE engine <strong>for</strong> this new library with the<br />

following statement:<br />

libname mail tape;<br />

This LIBNAME statement does not need to specify the name of library data set or<br />

any other options, because that in<strong>for</strong>mation was supplied on the external allocation<br />

referenced by the DDname mail.<br />

How <strong>SAS</strong> Assigns an Engine<br />

In some cases, you might choose not to specify an engine name in the LIBNAME<br />

statement or LIBNAME function, or you might choose not to issue a LIBNAME

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

Saved successfully!

Ooh no, something went wrong!