|SAS Companion for the OS/2 Environment|
This section briefly reviews basic concepts about SAS files, specifically those that are stored under OS/2. For additional information about SAS files, see SAS Language Reference: Concepts.
|What Is a SAS File?|
The SAS System creates and uses a variety of specially structured files called SAS files. Although OS/2 manages SAS files for the SAS System by storing them, the operating environment cannot process files. 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 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 folders that the SAS System can access. Each SAS data library has an access engine that is 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: Concepts.
Through SAS Multiple Engine Architecture, various engines enable the SAS System to access different formats or versions of SAS files and other vendors' files. Multiple Engine Architecture, combined with conversion utilities, provides access to Version 8 files and SAS files that were created with previous releases of the SAS System (beginning with Version 5), whether they were created under either OS/2 or other operating environments. Multiple Engine Architecture also provides access to files that were created by other vendors' products, including database files. For details, see Multiple Engine Architecture.
The following sections highlight information you need in order to create and use SAS files with the various engines under OS/2.
Note: 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.
|Types of SAS Files|
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 folder 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, V7, and V8 engines. For more information about engines, see Multiple Engine Architecture.
|V7 and V8
File Extension (Short)
|V7 and V8
File Extension (Long)
|SAS Member Type||Description|
|.ss2||.ss7||.sas7bpgm||Program||stored program (DATA step)|
|.sv2||.sv7||.sas7bvew||View||data set view|
|.si2||.si7||.sas7bndx||Index||data set index. Indexes are stored as separate files but are treated by the SAS System as integral parts of the SAS data file.|
|.sa2||.sa7||.sas7bacs||Access||access descriptor file|
|.sf2||.sf7||.sas7bfdb||FDB||consolidation database file|
|.sm2||.sm7||.sas7bmdb||MDDB||multidimensional database file|
|none||.s7m||.sas7bdmd||DMDB||data mining database file|
|none||.sr7||.sas7bitm||Itemstor||item store file|
Note: In your WORK and SASUSER data libraries, you may see files with file extensions other than those listed in the table. 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 by using operating environment commands
in order to regain disk space.
Version 8 libraries can be either short file extension libraries or long file extension libraries. Although both the OS/2 HPFS file system and Version 8 SAS software support long filenames, short file extension libraries are necessary to access OS/2 FAT file systems and libraries that reside on servers that support only short file extensions.
You can specify in the LIBNAME statement whether the library supports short or long file extensions. 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:\sasv8' 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
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 that are formatted by the SAS System. These are the SAS data sets that you may be familiar with from previous versions of the SAS System under other operating environments. In the SAS System under OS/2, native SAS data files can be indexed. The index is an auxiliary file that is 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 that has been 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.
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: Concepts.
Interface SAS data views contain descriptor information for data that has been 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 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 8 to access catalogs that were created with earlier releases of the SAS System for OS/2, you must first convert the catalogs from the earlier releases to Version 8 format before you can use them in a Version 8 SAS program.
For more information about how to convert SAS catalogs,
see Moving and Accessing SAS Files across Operating Environments.
program file is a compiled DATA step that is generated by the Stored
Program Facility. For more information about this type of SAS file, see SAS Language Reference: Concepts.
Descriptor files that have been created by the ACCESS procedure in SAS/ACCESS software have a member type of ACCESS and are used when you are creating interface SAS data views. Descriptor files describe the data that have been 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.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.