Accessing BMDP, SPSS, and OSIRIS Files |
Overview of OSIRIS Files |
Although OSIRIS runs only under z/OS and CMS, the SAS OSIRIS engine accepts a z/OS data dictionary from any other operating environment that is running SAS software. The layout of an OSIRIS data dictionary is the same on all operating environments. The data dictionary and data files should not be converted between EBCDIC and ASCII, however, because the OSIRIS engine expects EBCDIC data.
Assigning a Libref to an OSIRIS File |
In order to access an OSIRIS file, you must use the LIBNAME statement or LIBNAME function to assign a libref to the file. Specify the OSIRIS engine in the LIBNAME statement as follows:
LIBNAME libref OSIRIS 'physical-filename ' DICT='dictionary-filename'; |
is the physical filename of the dictionary file. The dictionary-filename can also be a ddname. However, if you use a ddname for the dictionary-filename, do not use quotation marks.
LIBNAME(libref, 'physical-filename ', 'OSIRIS', "DICT='dictionary-filename'") |
If you previously used a TSO ALLOC command or a JCL DD statement to assign a ddname to the OSIRIS file, you can omit the physical-filename in the LIBNAME statement or function. However, you must still use the DICT= option, because the engine requires both files.
Referencing OSIRIS Files |
OSIRIS data files do not have individual names. Therefore, for these files you can use a member name of your choice in SAS programs. You can also use the member name _FIRST_ for an OSIRIS file.
Under OSIRIS, the contents of the dictionary file determine the file layout of the data file. A data file has no other specific layout.
You can use a dictionary file with an OSIRIS data file only if the data file conforms to the format that the dictionary file describes. Generally, each data file should have its own DICT file.
Examples of Accessing OSIRIS Files |
Suppose you want to read the data file MY.OSIRIS.DATA, and the data dictionary is MY.OSIRIS.DICT. The following statements assign a libref to the data file and then run PROC CONTENTS and PROC PRINT on the file:
libname xxx osiris 'my.osiris.data' dict='my.osiris.dict'; proc contents data=xxx._first_; proc print data=xxx._first_; run;
The next example uses JCL. In this example, the DD statements can be omitted if the physical names are referenced in the LIBNAME statement.
//JOBNAME JOB //STEP1 EXEC SAS //OSIR DD DSN=MY.OSIRIS.DATA,DISP=SHR //DICT DD DSN=MY.OSIRIS.DICT,DISP=SHR //SYSIN DD * /* Any one of the following libname */ /* statements can be used. */ libname osir osiris dict=dict; libname xxx osiris 'my.osiris.data' dict=dict; libname osir osiris dict='my.osiris.dict'; /* Use this if the osir libref is used */ proc print data=osir._first_; /* Use this if the xxx libref is used */ proc print data=xxx._first_; //
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.