Step 2


Best Practices Migration with PROC MIGRATE: Migrate Files

Special Topic: Migrating Files with Short Extensions on PC Operating Environments

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 environments that use a FAT (file allocation table) file system, which is also referred to as "8.3" because a file name can include up to eight characters and a file extension can include up to three characters.

Determining Whether a Library Contains Short-Extension Files

These files should only be found on PC operating environments. They are unusable by SAS on other environments.

Version 6 files: Although they all have three-character extensions, Version 6 files are not affected by this issue. You can distinguish Version 6 files because their extensions do not contain the number 7. See the PROC MIGRATE Calculator for migration instructions.

Version 7 and 8 files: Below is a list of the short and standard extensions for Version 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.

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 Compatibility with Short-Extension Files

Deciding Whether to Migrate

If the above compatibility is adequate for your short-extension files, use the Compatibility Calculator to be certain that you have no other reason to migrate.

If the above compatibility is not adequate, then you have two choices:

Migrating Files to SAS 9.1.3 or Later

Migrate the library by using PROC MIGRATE. You must specify the SHORTFILEEXT option on the LIBNAME statement for the source library. The files are written to the target library with standard extensions. See the PROC MIGRATE Calculator to learn whether you can use PROC MIGRATE. If so, then remember to specify SHORTFILEEXT as noted above. If you can't use PROC MIGRATE, then follow the instructions given below for SAS 9.1 and 9.1.2.

In the following example, a library named MyLib contains two files with short extensions: a data set named MyData.sd7 and a catalog named MyCat.sc7. The following code migrates the library to SAS 9.1.3 or later:

libname MyLib v8 'path-name' shortfileext;
libname NewLib v9 'another-path-name';

proc migrate in=MyLib out=NewLib;

After migration, the target library NewLib contains two files with standard extensions: a 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 on the LIBNAME statement to migrate those files. In this case, take care with filenames. In the target library, all files will have a standard extension. If, in the source library, a short-extension file and a standard-extension file have the same name, then in the target library, the second one will fail to migrate because a name and member of the same type already exists.

Migrating Files to SAS 9.1 or SAS 9.1.2

The SHORTFILEEXT option is not supported in SAS 9.1 or SAS 9.1.2. Instead, you can use PROC COPY in Version 8 to copy the short file extensions to standard file extensions before migrating your files to a newer release of SAS. See the PROC MIGRATE Calculator for the remainder of your migration instructions.

As an alternative to PROC COPY, if you are comfortable using operating environment commands or file management tools, you can manually change the file's extension to the standard extension shown in the table above. The contents of a short-extension file are completely identical to those of a standard-extension file. The use of operating system commands is not supported by SAS.

Return to Step 2.