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.

libref<br />

is a <strong>SAS</strong> libref.<br />

<strong>OS</strong>IRIS<br />

is the <strong>OS</strong>IRIS engine.<br />

Accessing BMDP, SPSS, and <strong>OS</strong>IRIS Files Examples of Accessing <strong>OS</strong>IRIS Files 71<br />

physical-filename<br />

is the physical file name of the data file.<br />

dictionary-filename<br />

is the physical file name of the dictionary file. The dictionary-filename can also be<br />

a DDname. However, if you use a DDname <strong>for</strong> the dictionary-filename, do not use<br />

quotation marks.<br />

Specify the <strong>OS</strong>IRIS engine in the LIBNAME function as follows:<br />

LIBNAME(libref, ’physical-filename ’, ’<strong>OS</strong>IRIS’, “DICT=’dictionary-filename’”)<br />

You do not need to use a LIBNAME statement or function be<strong>for</strong>e running PROC<br />

CONVERT if you are using PROC CONVERT to convert an <strong>OS</strong>IRIS file to a <strong>SAS</strong> data<br />

file. (See “CONVERT Procedure” on page 308.)<br />

If you previously used a TSO ALLOC command or a JCL DD statement to assign a<br />

DDname to the <strong>OS</strong>IRIS file, you can omit the physical-filename in the LIBNAME<br />

statement or function. However, you must still use the DICT= option, because the<br />

engine requires both files.<br />

Referencing <strong>OS</strong>IRIS Files<br />

<strong>OS</strong>IRIS data files do not have individual names. There<strong>for</strong>e, <strong>for</strong> these files you can<br />

use a member name of your choice in <strong>SAS</strong> programs. You can also use the member<br />

name _FIRST_ <strong>for</strong> an <strong>OS</strong>IRIS file.<br />

Under <strong>OS</strong>IRIS, the contents of the dictionary file determine the file layout of the<br />

data file. A data file has no other specific layout.<br />

You can use a dictionary file with an <strong>OS</strong>IRIS data file only if the data file con<strong>for</strong>ms to<br />

the <strong>for</strong>mat that the dictionary file describes. Generally, each data file should have its<br />

own DICT file.<br />

Examples of Accessing <strong>OS</strong>IRIS Files<br />

Suppose you want to read the data file MY.<strong>OS</strong>IRIS.DATA, and the data dictionary is<br />

MY.<strong>OS</strong>IRIS.DICT. The following statements assign a libref to the data file and then run<br />

PROC CONTENTS and PROC PRINT on the file:<br />

libname xxx osiris ’my.osiris.data’<br />

dict=’my.osiris.dict’;<br />

proc contents data=xxx._first_;<br />

proc print data=xxx._first_;<br />

run;<br />

The next example uses JCL. In this example, the DD statements can be omitted if<br />

the physical names are referenced in the LIBNAME statement.<br />

//JOBNAME JOB<br />

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

//<strong>OS</strong>IR DD DSN=MY.<strong>OS</strong>IRIS.DATA,DISP=SHR<br />

//DICT DD DSN=MY.<strong>OS</strong>IRIS.DICT,DISP=SHR<br />

//SYSIN DD *<br />

/* Any one of the following libname */

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

Saved successfully!

Ooh no, something went wrong!