Transfer SAS datasets between UNIX and PC
PC=> UNIX
Let's assume your have a dataset "mydata.sd2" on a diskette in drive a:.
- On the PC run the following program in SAS for
Windows:
LIBNAME IN1 "A:\"; LIBNAME OUT1 XPORT "C:XPORT.DAT"; PROC COPY IN=IN1 OUT=OUT1; SELECT MYDATA; RUN;
- FTP "xport.dat" to the SUN using binary format (File Type Data).
- On the SUN run the following program in SAS
for UNIX:
LIBNAME IN1 XPORT "XPORT.DAT"; LIBNAME OUT1 '.'; PROC COPY IN=IN1 OUT=OUT1; RUN;
The dataset in UNIX format is named "mydata.ssd01".
UNIX=> PC-SAS
Assume "mydata.ssd01" is in the current directory.
- On the SUN run the following program in SAS
for UNIX:
LIBNAME IN1 "."; LIBNAME OUT1 XPORT "XPORT.DAT"; PROC COPY IN=IN1 OUT=OUT1; SELECT MYDATA; RUN;
- FTP "xport.dat" to the PC using binary format (File Type Data).
- On the PC run the following program in SAS for
Windows:
LIBNAME IN1 XPORT "C:XPORT.DAT"; LIBNAME OUT1 "A:"; PROC COPY IN=IN1 OUT=OUT1; RUN;
lm: March 6, 2002
