General Instructions for Opening an Extract on Your PC
The IHIS extract system does not provide data in the format of any particular statistical package. Instead, we provide raw ASCII data files and the command files necessary for reading the raw data into Stata, SAS and SPSS. The data are provided using gzip compression. Instructions will be provided for SUDAAN users soon.
STATA Users
On the Extract Download page, you will see your extract requests along with the dates of the requests, descriptions of the requests, and links to the data, codebook, and STATA syntax files.
The first step is downloading and decompressing the data "dat.gz" file. First, right click on the "data" link and select "Save Link As." Next, decompress the "dat.gz" file, noting to which directory you save your decompressed ".dat" data file.
The next step is reading the data file into STATA, for which we have provided a STATA ".do" command file. From the Extract Download page, you need to right click on the STATA link and select "Save Link As" or "Save Target As." Be sure to save the STATA ".do" command file in the same directory as you saved the decompressed ".dat" data file.
Now you are ready to read the data into STATA. Upon opening STATA, you will need to be sure STATA is pointing to the directory that contains the ".dat" data file and the ".do" command file. If these files are in a folder called ‘IHIS’ on your C drive, for instance, you should type:
cd "C:\IHIS\"
Next, you will need to execute the ".do" file. If this file were named "jdoe001.do", you would need to type:
do jdoe001.do
You will see ‘end of do-file’ when STATA has finished reading in the data.
SAS Users
On the Extract Download page, you will see your extract requests along with the dates of the requests, descriptions of the requests, and three links on the right side of the page: data, codebook, and SAS.
The first step is downloading and decompressing the data "dat.gz" file. First, right click on the "data" link and select "Save Link As." Next, decompress the "dat.gz" file, noting to which directory you save your decompressed ".dat" data file.
The next step is reading the data file into SAS, for which we have provided a SAS command file. From the Extract Download page, you need to right click on the SAS link and select "Save Link As" or "Save Target As."
Open the SAS command file in SAS. Use the "Find" function under the "Edit" Menu and search for the phrase "IHIS USER." As the note in this portion of the command file indicates, you need to change two of the lines in your SAS command file to indicate the location of the ".dat" data file on your computer. If your IHIS files are called jdoe001.sas and jdoe001.dat, then the three lines below the "IHIS USER" notes in the ".sas" command file will read:
libname ihisdat '<insert path to folder containing data file here>';data ihisdat.jdoe001;
infile '<insert path to folder containing data file here>jdoe001.dat';
If the ".dat" data file is in a folder on your C drive called IHIS, for instance, then you need to change those lines to:
ihisdat 'C:\IHIS';
data ihisdat.jdoe001;
infile 'C:\IHIS\jdoe001.dat';
After making these changes, pull down the "Run" menu and select "Submit." SAS will then read in your data.
SPSS Users
On the Extract Download page, you will see your extract requests along with the dates of the requests, descriptions of the requests, and three links on the right side of the page: data, codebook, and SPSS.
The first step is downloading and decompressing the data "dat.gz" file. First, right click on the "data" link and select "Save Link As." Next, decompress the dat.gz file noting to which directory you save your decompressed data ".dat" file.
The next step is reading the data file into SPSS, for which we have provided an SPSS command file. From the Extract Download page, you need to right click on the SPSS link and select "Save Link As" or "Save Target As."
Open the SPSS command file in SPSS. You need to change the first line of the ".sps" command file to indicate the location of the ".dat" file on your computer. If your IHIS files are called jdoe001.sps and jdoe001.dat, then the first line of the ".sps" file will read:
data list file ='jdoe001.dat'/
If the ".dat" data file is on your C drive, for instance, you need to change that line to:
data list file ='C:\jdoe001.dat'/
After making this change, pull down the "Run" menu and select "All." SPSS will then read in your data.
