Chapter Contents |
Previous |
Next |
SAS Companion for the OpenVMS Operating Environment |
OSIRIS | accesses OSIRIS files. |
SPSS | accesses SPSS files that were created under Release 9 of SPSS as well as SPSS-X system files and portable files. |
You can use these engines in any SAS applications or procedures that do not require random access. For example, by using one of the engines with the CONTENTS procedure and its _ALL_ option, you can determine the contents of an entire SPSS file at once.
Restrictions on the Use of These Engines |
Accessing OSIRIS Files |
In
order to access an OSIRIS file, you must use the LIBNAME statement or LIBNAME
function to assign a libref to the file. (Alternately, you can select
Default
as the type in the
Engine:
field of the New Library
dialog box.) Specify the OSIRIS engine in the LIBNAME statement as follows:
LIBNAME libref OSIRIS 'data-filename'
|
You do not need to use a LIBNAME statement before running the CONVERT procedure if you are using PROC CONVERT to convert an OSIRIS file to a SAS data file. (For more information, see the procedure CONVERT.)
Note that the LIBNAME statement has no engine/host options for the SPSS engine.
If you previously assigned a fileref or an OpenVMS logical name to the OSIRIS file, then you can omit the data-filename in the LIBNAME statement. However, you must still use the DICT= option, because the engine requires both files. (For details, see Example: Accessing OSIRIS Files.)
You can use the same
dictionary file with different
data files. Enter a separate LIBNAME statement for each data 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.
libname mylib osiris 'test1.dat' dict='test1.dic'; proc contents data=mylib._first_; run; proc print data=mylib._first_; run;
Accessing SPSS Files |
This engine can read only SPSS data files that were
created under the same operating environment. For example, the SPSS engine
under OpenVMS cannot read SPSS files
that were created under the OS/390 operating environment. The only exception
is an SPSS portable file, which can originate from any operating environment.
In
order to access an SPSS file, you must use the LIBNAME statement or LIBNAME
function to assign a libref to the file. (Alternately, you can select
Default
as the type in the
Engine:
field of the New Library
dialog box.) Specify the SPSS engine in the LIBNAME statement as follows:
LIBNAME libref SPSS 'filename'; |
You do not need to use a LIBNAME statement before running the CONVERT procedure if you are using PROC CONVERT to convert an SPSS file to a SAS data file. (For more information, see the procedure CONVERT.)
Note that the LIBNAME statement has no engine/host options for the SPSS engine.
If you previously assigned a fileref or an OpenVMS logical
name to the SPSS file, then you can omit the file-specification in the LIBNAME statement. SAS uses the physical filename that
is associated with the fileref or logical name. (For details, see Example: Accessing SPSS Files.)
SPSS data files have only one logical member per file.
Therefore, you can use _FIRST_ in your SAS programs to refer to the first
data file.
libname mylib spss 'myspssx.dat'; proc contents data=mylib._first_; run; proc print data=mylib._first_; run;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.