Task 3: Key Concepts about Extracting and Saving NHANES Data Files in a SAS-Accessible Library

In the preceding task, you save SAS transport files (.XPT) of NHANES data in your DOWNLOAD folder.  The 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 useable 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 saved. 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've run the code, check your library (if you followed Task 1 it would be C:/NHANES/DATA) to see that the dataset is now there. 


close window icon Close Window to return to module page.