Posts

Showing posts with the label .XPT files

In SAS, how do I create a transport data set file?

In SAS, how do I create a transport data set file? Source/direct link: http://kb.iu.edu/data/aevb.html A SAS transport data set file is a machine-independent file that allows you to move a SAS data set from one operating system to another. A SAS transport data set file can also be read directly by several statistical software packages (e.g., SPSS, BMDP). Following is an example of SAS code to copy the SAS data set file job1.sas7bdat to a SAS transport data set file portable.xpt in the outdata directory: LIBNAME misc ' ~/work' ; LIBNAME sasxpt XPORT ' ~/outdata/portable.xpt' ; PROC COPY IN=misc OUT=sasxpt ; SELECT job1; RUN ; In the example above: The first LIBNAME statement aliases the library reference (libref) misc to the work directory. The second LIBNAM E statement aliases the libref sasxpt with the physical name of a SAS transport format file (in this case, portable.xpt in the outdata directory). The COPY procedure copies one or more SAS data sets in the IN = l...