There are three steps to extracting a SAS data file and copying it to a permanent library:
In the SAS code file for the Medical Examination, Ages 1-74 years, 4233, you downloaded in the previous task, you will need to modify the pathway for the Filename where you downloaded the data file and assign a libname to the place where you'd like the permanent file to be. The example below and the complete, downloadable program, available on the Downloads page, assume that you used the directory structure shown in Task 1 of this module.
Statements | Explanation |
---|---|
Filename In "C:\NHANES I\TEMP\DU4233.TXT" LRECL=850; |
Assigns the filename "In" and identifies the path for the data file you will read into the SAS code as the C:\NHANES I\TEMP folder. This is where you downloaded and inflated the DU4233.TXT out of the 4233.EXE file from the NHANES website. Remember to modify the pathname according to your actual location and surround the pathname in quotation marks. Leave the LRECL statement intact as this identifies the size of the file being read into the program. |