Recreating a SAS Data Set from a Compressed SAS Transport File
For SAS transport file created by PROC CPORT, follow these steps to recreate the SAS dataset:
Begin by uncompressing the downloaded file. Use unzip if you are unzipping the file on an Unix machine or use WinZip/pkzip if you are unzipping the file on a PC. You will then have the SAS Transport file created using PROC CPORT.
The program listed below will recreate the SAS data set from the Transport file. WARNING: All of the SCF data sets are rather large, make sure you have enough space to recreate the data set before running the program.
LIBNAME OUT 'output SAS library';
FILENAME IN 'input transport file name';
PROC CIMPORT DATA=OUT.dataset INFILE=IN;
RUN;
For SAS transport file created by PROC COPY with an XPORT option, follow these steps to recreate the SAS dataset:
Begin by uncompressing the downloaded file. Use unzip if you are unzipping the file on an Unix machine or use WinZip/pkzip if you are unzipping the file on a PC. You will then have the SAS Transport file created using PROC COPY with an XPORT option.
The program listed below will recreate the SAS data set from the Transport file. WARNING: All of the SCF data sets are rather large, make sure you have enough space to recreate the data set before running the program.
LIBNAME NEW 'output SAS library';
LIBNAME TRANS XPORT 'input transport file name';
PROC COPY IN=TRANS OUT=NEW;
RUN;
ENDSAS;
我有个数据文件,用sas不能直接打开,说是要用上述方法导入,但我不太明白具体步骤和顺序。请大家帮助,谢谢!
[此贴子已经被作者于2008-5-31 11:10:54编辑过]