Chapter Contents


Moving and Accessing SAS Files across Operating Environments

Using Version 8 Short Filename Extensions on FAT-style Disk Drives

By default, Version 8 filenames are appended with an eight-character filename extension. For example, a Version 8 filename extension for a data set on the UNIX, OpenVMS, OS/2, and Windows hosts is .sas7bdat.

Note:   Version 7 and Version 8 filename extensions are identical.  [cautionend]

However, the Version 8default eight-character filename extension requirement conflicts with a valid three-character filename extension that supports FAT- (File Allocation Table) style disk devices that are used exclusively in OS/2 and Windows environments.

Version 8 fails to recognize Version 8 files that have short filename extensions under these circumstances:

Although specifying the V8 engine in a LIBNAME statement does 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 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 Version 8 to recognize valid three-character filename extension equivalents. An example of a short extension for a Version 8 data set is .sd7. Here is an example of setting the SHORTFILEEXT option in the LIBNAME statement on an OS/2 or Windows host:

libname grades 'c:\chemistry' shortfileext;

The SHORTFILEEXT option allows Version 8 to recognize short filename extensions, which enables you to create, read from, and write to Version 8 files on a FAT device. For more information about the SHORTFILEEXT option, see SAS Companion for the OS/2 Environment or SAS Companion for the Microsoft Windows Environment, whichever is applicable.

Because Version 8 can recognize Version 8 files that have either long or short filename extensions, but not both, you may use PROC COPY to copy the Version 8 files that have short names to a Version 8 library that uses a long name, by default. Short names are converted to long names automatically.

Note:   If Version 8 files that have short names are located on FAT devices, be sure to copy these files elsewhere.  [cautionend]

Do not set the SHORTFILEEXT system option at SAS invocation. Because SAS initialization relies on internal start-up files that are appended with Version 8 filename extensions, setting the SHORTFILEEXT option would cause SAS initialization to fail.  [cautionend]

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.