Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

Accessing OSIRIS Files

Although OSIRIS runs only under OS/390 and CMS, the SAS OSIRIS engine accepts an OS/390 data dictionary from any other operating environment that is running the SAS System. 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-file-name';

libref
is a SAS libref.

OSIRIS
is the OSIRIS engine.

physical-filename
is the physical file name of the data file.

dictionary-file-name
is the physical file name of the dictionary file. The dictionary-file-name can also be a DDname. However, if you use a DDname for the dictionary-file-name, do not use quotes.

Specify the OSIRIS engine in the LIBNAME function as follows:

LIBNAME(libref, 'physical-filename ', 'OSIRIS', "DICT='dictionary-file-name'");
You do not need to use a LIBNAME statement or function before running PROC CONVERT if you are using PROC CONVERT to convert an OSIRIS file to a SAS data file. (See CONVERT.)

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. (See Accessing OSIRIS 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_;
//


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.