Key Concepts About Extracting and Saving NHANES Data Files in a SAS-Accessible Library

In the preceding task, you saved SAS transport files (.XPT) containing NHANES data in your DOWNLOAD folder.  These transport files are created by the XPORT engine. You will use the XPORT engine and the PROC COPY procedure to convert the datasets from the SAS transport format to the standard SAS dataset format, so they are ready for analysis.   

To extract the file, assign one library name (LIBNAME) to the transport file and another to the location where you want the SAS-accessible data file to be stored. Include the XPORT statement in line of SAS code that has the libname of the transport file. Then, use the PROC COPY procedure to save the transport file's libname IN and the SAS-accessible dataset's libname OUT.

After you have run the SAS program, check your library (if you followed Task 1, it would be C:/NHANES/DATA) to make sure that the dataset now appears there. 

 

close window icon Close Window