Usage Note 2555: Short filename extensions versus long filename extensions
The SAS System Version 8 produces two different filename
extensions. The reason two different filename extensions are generated
is dependent on the different types of file systems. NTFS allows long
filename extensions, while FAT and older Novell drives do not.
By default, the SAS System Version 8 filenames are appended with an
eight-character filename extension. For example, the SAS System Version
8 filename extension for a data set is .sas7bdat. However, the SAS
System Version default eight-character filename extension requirement
conflicts with valid three-character filename extensions supported by
FAT-style disk devices.
The SAS System Version 8 fails to recognize SAS Version 8 files that
have short filename extensions under the following circumstances:
* When a Version 8 file that has a short filename extension is copied
from a FAT drive to a new library location that contains a mixture
of SAS Version 6 files and SAS Version 7 and Version 8 files
* When concatenated with other SAS Version 6, SAS Version 7 or SAS
Version 8 libraries.
Although specifying the V8 engine in a LIBNAME statement does not
exclusively identify Version 8 files for access, the V8 engine alone
does not recognize Version 8 files with short filename extensions.
In order to access both SAS Version 8 files that have short filename
extensions, you must set the SHORTFILEEXT option in the LIBNAME
statement. Setting SHORTFILEEXT overrides the default LONGFILEEXT,
allowing the SAS System Version 8 to recognize valid three character
filename extension equivalents. An example of a short extension for a
SAS Version 8 dataset is .sd7. Below is an example of the usage of the
SHORTFILEEXT option:
libname mylib 'c:\mysasdata' shortfileext;
The SHORTFILEEXT option allows Version 8 to recognize and create files
with short filename extensions.
The SAS System Version 8 can recognize SAS Version 8 files with long or
short filename extensions but not both unless a combined libname
statement is used, such as following:
libname myshort 'yourdirectory' shortfileext;
libname mylong 'yourdirectory';
libname new (myshort,mylong);
The LIBNAME for the new libref can see both the short and the long
filename extensions in the SAS explorer. However, if you write out a new
data set to this directory, it will use whichever engine is specified
first. In the previous example, a shortfile extension would be written
because that libref is specified first in the combined LIBNAME
statement. If the libname had been specified as the following
libname new (mylong,myshort);
it would create a long file extension if a new data set were created.
There, it is recommended that this technique be used only for reading
data sets and not writing them unless you are sure of the engine.
The same technique can be used to cover different engine versions,
such as V6 and V8.
You can use PROC COPY to copy the SAS Version 8 files that have short
filename extensions to a SAS Version 8 library that uses a long name by
default. Short filename extensions are converted to long filename
extensions automatically.
See SAS Note #001878 .
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | Base SAS | Microsoft Windows NT Workstation | 8 TS M0 | |
| OS/2 | 8 TS M0 | |
| Microsoft Windows 2000 Professional | 8 TS M0 | |
| Microsoft Windows 95/98 | 8 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | |
| Topic: | SAS Reference ==> Procedures ==> OPTIONS
|
| Date Modified: | 2003-02-06 15:56:10 |
| Date Created: | 2000-05-01 10:47:20 |