| SAS Companion for the OS/2 Environment |
This section briefly reviews SAS files, taking into account that your SAS files are stored in
OS/2. For additional information about SAS files, see, SAS Language Reference: Dictionary.
The SAS System creates and uses a variety of specially structured files called SAS files. Although OS/2
manages the file for the SAS System by storing it, the operating system cannot process it. For example, you can list SAS files within the OS/2 operating
environment, but
you cannot use an OS/2 text editor to edit SAS files. SAS files are different from external files. While external files can be processed by SAS statements and
commands, they are not managed by the SAS System.
SAS files usually reside in SAS data libraries. Under OS/2, a SAS library is
simply a named collection of SAS files within one or more OS/2 directories that the SAS System can access. Each SAS data library has an access engine associated with it the first time
that a file in the library is accessed. The engine name specifies the access method that the SAS System uses to process the files in the data library. SAS data libraries are described
in detail in SAS Language Reference: Dictionary.
Various engines enable the SAS System to access different formats or versions of SAS files and other vendors'
files. For this reason, the SAS System is said to have Multiple Engine Architecture. Multiple Engine Architecture, combined with conversion utilities, provides access to Version 7 files and SAS
files created with previous releases of the SAS System (back to Version 5), whether they were created under either OS/2 or other operating systems.
Multiple Engine Architecture also provides access to files created by other vendors' products, including database files.
The following sections highlight information you
need in order to create and use SAS files with the various engines under OS/2.
SAS files are stored in SAS data libraries and are referred to as members of a library.
Each member has a member type. The SAS System distinguishes between SAS files and external OS/2 files in a directory by using unique file
extensions.
The SAS System assigns certain file extensions to a general set of SAS member types. OS/2 File Extensions and Their Corresponding SAS Member Types lists the
OS/2 file extensions and their corresponding SAS member types for the V6 and V7 engines. For more information on engines, see
Multiple Engine Architecture.
- CAUTION:
- Do not change the file
extension of a SAS file; doing so can cause unpredictable results.
The file extensions assigned by the
SAS System to SAS files are an integral part of how the SAS System accesses these files. Also, you should not change the filename of a SAS file using operating system commands. If you want to change
the name of a SAS file, use the DATASETS procedure or select the file
in the SAS Explorer window and select
| Edit |
![[arrow]](../common/images/arrow.gif) |
Rename... |
![[cautend]](../common/images/cautend.gif)
Note:
You may see files with other file
extensions in your WORK and SASUSER data libraries. Most of these are temporary utility files that you do not need to access directly; be sure not to delete any of them during your SAS
session.
If for some reason your SAS session ends abnormally, you might need to delete these files, outside of the SAS System in order to regain disk space.
Version 7 libraries can be either short file extension libraries or long file
extension libraries. Although the OS/2 HPFS file system and the SAS System for Version 7 support long file names, short
file extension libraries are necessary to access OS/2 FAT file systems and libraries residing on servers that supports only short file
extensions.
You can specify whether the library supports short or long file extensions on the LIBNAME statement. For example, if your SAS library is on a server mapped as the
S drive
and the server file system supports only short file extensions, your libname statement would look similar to this:
libname mylib 's:\sasv6' shortfileext
For information on specifying short or long file extensions using the LIBNAME statement, see
LIBNAME.
If SAS is not able to create a file with a long file extension the first time it writes to
a library, then the library supports only files with short file extensions. If you specify a file with a long file extension for a library that supports only short file extensions, an error message
informs you that the member name is too long for the system.
SAS data set is an
umbrella term for SAS data files and SAS data views, which are both discussed here. This section provides a brief overview of the concept of SAS data sets. For complete details, see the section on
data sets in SAS Language Reference: Concepts .
Logically, a SAS data set consists of two types of information: descriptor information and data values. The
descriptor information includes such things as data set name, data set type, data set label, and number of variables, as well as the names and labels of the variables in the data set, their types
(character or numeric), their length, their position within a record, and their formats. The data values contain values for the variables. A SAS data set can be visualized as a table consisting
of rows of observations and columns of variable values. SAS Data Set Model illustrates the SAS data set model:
SAS Data Set Model
-
SAS data files (member
type: Data)
-
The SAS data file is probably the most frequently used type of SAS file. SAS data files
have a SAS member type of Data and are created in the DATA step and by certain SAS procedures such as the RANK procedure in base SAS software.
The SAS System defines two types of SAS data files, native and interface. Native data files store data values and descriptor information, as described earlier,
in files formatted by the SAS System. These are the SAS data sets you may be familiar with from previous versions of the SAS System under other operating systems. In the SAS System
under
OS/2, native SAS data files can be
indexed. The index is an auxiliary file created in addition to the SAS data file. The index provides fast access to observations within a SAS data file through a variable or key. Indexes
are stored as separate files but are treated by the SAS System as integral parts of the SAS data file.
The second type of data file is the interface SAS data file. These files store data in a file formatted by other software. Examples of interface SAS data files
are BMDP, OSIRIS and SPSS files, which the SAS System can access as read-only files. See Reading BMDP, OSIRIS and SPSS Files for more
information.
In most cases, the maximum file size for a SAS data set is 2 gigabytes (GB). For
information about the size limitation of a data set under OS/2 , see
Length and Precision of Variables under OS/2.
-
SAS data views (member type: View)
-
SAS data views have a member type of View. They describe data values and tell the SAS System where to find the values, but they do not contain the
actual data values themselves.
Views may be of two kinds, native or interface. A native SAS data view is created with the SQL procedure or with the DATA step and describes
a subset or combination of the data in one or more SAS data files or SAS data views. For information on SQL views, see the SAS Procedures Guide. For information on DATA step views, see
SAS Language Reference: Dictionary.
Interface SAS data views contain descriptor information for data formatted by other software products, for example, a
database management system. Such a view is created with the ACCESS procedure in SAS/ACCESS software. For more information, see SAS/ACCESS Software for PC File Formats: Reference and
other available SAS/ACCESS documentation.
A SAS catalog is a special type of SAS file that can contain multiple entries. You can
keep different types of entries in the same SAS catalog. For example, catalogs can contain windowing applications, key definitions, toolbox definitions, SAS/GRAPH graphs, SAS/IML matrices, and
so on.
If you want to use Version 7 to access catalogs created with earlier releases of the SAS System for OS/2, you must first convert the catalogs from the earlier
releases to Version 7 format before you can use them in a Version 7 SAS program.
For more information on how to convert SAS catalogs, see Moving and Accessing SAS
Files across Operating Environments.
A stored program file is a compiled DATA step
generated by the Stored Program Facility. For more information on this type of SAS file, see SAS Language Reference: Concepts .
Descriptor files created by the ACCESS
procedure in SAS/ACCESS software have a member type of ACCESS and are used when creating interface SAS data views. Descriptor files describe the data formatted by other software products supported by
the SAS System under OS/2. For
more information, see SAS/ACCESS Software for PC File Formats: Reference and other available SAS/ACCESS documentation.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.