How to Import data from another Computer
To read in a SAS dataset created somewhere other here at MIT, use the
SAS procedure COPY with the engine XPORT. (An engine is the mechanism
which SAS uses to read in a data set and is used in the libname
statement to assign a libref. The name of the default engine
corresponds to the SAS version. As of summer 1997, the default version
of SAS on the Suns is 6.12; on the DECstations it is 6.07. The
corresponding library engines are v612 and v607.)
For example, to read in a dataset in a file called hgtwgt on a Sun
running SAS version 6.12:
libname tref xport '/mit/joeuser/sasuser/hgtwgt';
libname outref v612 '/mit/joeuser/sasuser/';
proc copy in=tref out=outref;
run;
After running this, you will have a file called hgtwght.ssd01.
The same program on a DECstation would read:
libname tref xport '/mit/joeuser/sasuser/hgtwgt';
libname outref v607 '/mit/joeuser/sasuser/';
proc copy in=tref out=outref;
run;
The resulting data set file will be named hgtwght.ssd02.
(last updated July 24 1997)
|