MIGRATE Procedure

Migrating Files with Short Extensions on PC Operating Environments

Overview

In SAS 7 and 8, the SHORTFILEEXT option creates a file with a shortened, three-character extension on PC operating environments only. This feature is necessary for operating systems that use a FAT (file allocation table) file system. The FAT file system is also referred to as 8.3 because a filename can include up to eight characters and a file extension can include up to three characters. These files are created on PC environments. They are not usable by SAS on other environments.
Note: SAS 6 files all have three-character extensions but are not affected by this issue. You can distinguish SAS 6 files because their extensions do not contain the number 7.
Below is a table of the short and standard extensions for SAS 7 and 8 files. To determine whether a library contains files with short extensions, look at the filenames in the SAS Explorer or use the file management tools of your operating environment.
Short and Standard File Extensions for SAS 7 and 8 Files
Memtype
Short Extension
Standard Extension
ACCESS
sa7
sas7bacs
AUDIT
st7
sas7baud
CATALOG
sc7
sas7bcat
DATA
sd7
sas7bdat
DMDB
s7m
sas7bdmd
FDB
sf7
sas7bfdb
INDEX
si7
sas7bndx
ITEMSTOR
sr7
sas7bitm
MDDB
sm7
sas7bmdb
PROGRAM
ss7
sas7bpgm
PUTILITY
sp7
sas7bput
UTILITY
su7
sas7butl
VIEW
sv7
sas7bvew

SAS®9 Compatibility with Short-Extension Files

SAS 9.0
supports the SHORTFILEEXT option, although it is not documented. If you use this option, you have Read and Write access to your existing short-extension files.
SAS 9.1 and 9.1.2
do not support any access to short-extension files. You can use PROC COPY in SAS 8 to copy the short file extensions to standard file extensions before migrating your files to SAS®9.
As an alternative to PROC COPY, if you are comfortable using operating system commands or file management tools, you can manually change the file's extension to the standard extension. The content of a short-extension file is identical to the content of a standard-extension file. The use of operating system commands is not supported by SAS.
SAS 9.1.3 and later
support Read-Only access to existing short-extension files. You can migrate your library to the current release of SAS by using PROC MIGRATE. You must specify the SHORTFILEEXT option in the LIBNAME statement for the source library. The files are written to the target library with standard extensions; the files support full access.
For example, a library named MYLIB contains two files with short extensions: a SAS data set named mydata.sd7 and a catalog named mycat.sc7. Use the following code to migrate the library to SAS®9:
libname mylib v8 'source-library-pathname' shortfileext;
libname newlib v9 'target-library-pathname';

proc migrate in=mylib out=newlib;
run;
After migration, the target library NEWLIB contains two files with standard extensions: a SAS data set named mydata.sas7bdat and a catalog named mycat.sas7bcat.
If your library also contains standard-extension files, then perform an additional migration without the SHORTFILEEXT option in the LIBNAME statement to migrate those files. Make sure that no short-extension files have the same name as a standard-extension file. In the target library, all files have a standard extension. If a short-extension file and a standard-extension file have the same name and same member type in the target library, the second one fails to migrate.