SAS Version 8 is much more flexible with respect to data set format. Therefore, it is no longer necessary to prepare transport files to move files between most operating systems. The information given below is useful primarily a case where you need to prepare or import a SAS data set from one of the exceptions (CMS, OS/390).
If you are preparing a file for transport to another platform, read the first section below, "Creating a Transport File." If you are reading a transport file, read the second section below, "Reading a Transport File". NOTE: SAS datasets which are transported across operating systems must be in transport format.
CREATING A TRANSPORT FILE STEP 1. Use PROC COPY to make a SAS transport library: libname old '~/dir'; libname moveit xport 'file1.xpt'; proc copy in=old out=moveit; select file1; The first LIBNAME identifies the directory where the current SAS library is found. The second LIBNAME identifies the dataset "engine" (xport) and the filename and extension of the new export library. The optional SELECT statement can be used to restrict PROC COPY to include only the listed datasets. You may leave out the SELECT statement to create an export library of all datasets in the current input library. In this example, the SAS dataset known as file1.ssd will be exported to file1.xpt. If you are moving a file from another platform to the U cluster, you should supply appropriate filenames and directory references. SAS data sets are given an SD2 extension in Windows. STEP 2. If your data set is large, use a utility such as gzip to compress it. Directions for compressinging files depend on the utility used. STEP 3. Transfer the new export library as a binary file using FTP. ftp machinename.nodenamebin put file1.xpt quit If the file is zipped, you should supply the name of the zipped file. READING A TRANSPORT FILE STEP 1. Unzip the transport file using the appropriate utility if it has arrived in compressed mode. STEP 2. Use PROC COPY to convert the export library: libname new '~/dir'; libname moveit xport 'file1.xpt'; proc copy in=moveit out=new; select file1; The first LIBNAME identifies the directory where the new dataset will be created. If the directory does not yet exist, use the Unix mkdir command to create it: mkdir perm On Unix systems, SAS libraries are represented by a directory. All of the datasets found in the directory will be considered part of the same SAS library. The second LIBNAME simply identifies the transferred export library. Again, the optional SELECT statement can be used to explicitly identify which datasets to extract. The default action is to extract all datasets contained in the export library. NOTES: 1. The new dataset can be used in SAS programs as follows: libname new 'perm'; proc glm data=new.file1; ...etc... or libname project 'perm'; data new1; set project.file1; ...etc... 2. A LIBNAME can identify any absolute or relative directory path: libname abc '/scr1/joe/my.sas.stuff'; libname myfiles 'sasfiles/project1'; libname survey '$HOME/survey'; or can simply point to the current working directory: libname project '';