Chapter Contents |
Previous |
Next |
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? |
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.
V6 File Extension |
V7 and V8 File Extension (Short) |
V7 and V8 File Extension (Long) |
SAS Member Type | Description |
---|---|---|---|---|
.sas | .sas | .sas | none | SAS program |
.ss2 | .ss7 | .sas7bpgm | Program | stored program (DATA step) |
.lst | .lst | .lst | none | output file |
.log | .log | .log | none | log file |
none | .st7 | .sas7baud | Audit | audit file |
.sd2 | .sd7 | .sas7bdat | Data | data set |
.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. |
.sc2 | .sc7 | .sas7bcat | Catalog | SAS catalog |
.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 |
.su2 | .su7 | .sas7butl | Utility | utility file |
.sp2 | .sp7 | .sas7bput | Utility | permanent utility |
.stx | .stx | none | none | transport file |
none | .sb7 | .sas7bbak | none | backup file |
Edit | Rename... |
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.
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.
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:
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.
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.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.