Centers for Disease Control and Prevention


About N C H S graphic and link
InformaciĆ³n en EspaƱol
Fastats A-Z provides health statistics and links to additional sources of information
N C H S help graphic and link
Coming Events graphic and link
Surveys and Data Collection Systems graphic and link
National Health and Nutrition Examination Survey graphic and link
National Health Care Survey graphic and link
National Health Interview Survey graphic and link
National Immunization Survey graphic and link
Longitudinal Studies of Aging (LSOAs)
National Survey of Family Growth graphic and link
State and Local Area Integrated Telephone Survey graphic and link
National Vital Statistics System graphic and link
Initiatives graphic and link
Aging Activities graphic and link
Disease Classification graphic and link
Healthy People graphic and link
Injury graphic and link
Research and Development graphic and link
Research Data Center
NCHS Press Room
News Releases graphic and link
Publications and Information Products graphic and link
Statistical Export and Tabulation System
Listserv graphic and link
Graphic and link to FEDSTATS and other sites
Download graphic
Adobe Acrobat Reader graphic and link
PowerPoint Viewer 2003 graphic and link
National Center for Health Statistics 3311 Toledo Road Hyattsville, Maryland 20782
Toll Free Data Inquiries 1-800-232-4636

CDC Home Search Health Topics A-Z
nchshd.jpg (16250 bytes)

 

Exporting and Extracting Data

Data can be exported or extracted from the SETS 2.0.Template.  Exporting provides:

bullet graphicfiner control over records and fields.

bullet graphicfields to be exported in a nonoverlapping format.

bullet graphicrecords only in a fixed length, carriage return, and line feed delimited format under the ASCII export.

bullet graphicvarious binary formats available under the data base export.

Extracting allows for:

bullet graphica faster way to obtain the records.

bullet graphicall fields to be extracted in the original format.

bullet graphicrecords to be fixed length, nondelimited stream of bites. Fields can also be delimited with carriage returns and line feeds. Trailing spaces can be removed or records padded.

Exporting
Data from SETS 2.0 can be exported into: (1) ASCII files for use in SAS, SPSS, EPIInfo, and Beyond 2020, as well as (2) specific database and spreadsheet formats, such as dBase, Excel, FoxPro, Jet, Lotus, and in a text format.
1. Open SETS 2.0 and the data set.
2. Click on the + to the left of the Data folder. Names of data files drop down. Click on a file name, then from the resulting box, click Export data
>Data base OR Export data>ASCII, depending on the format desired.Export ASCII database image

3. Several windows are opened. The window on top is labeled with the name of the data file. With this window open, you may limit the data in your exported file to certain fields or the complete data set.

bullet graphicYou may select individual fields, by double-clicking on the field.

bullet graphicYou may select several fields by typing in the field names or holding down the Control key while selecting the desired fields.

bullet graphicYou may also hold down the Shift key, to select a group of fields that are listed together.

bullet graphicYou may select all of the fields by clicking on Name (located directly above the field labels list).

4. Click Select. All of the selected field names will appear in the Field list for base file box.
5. When prompted, click Yes to select a subset of records based on the fields listed in the above box. Follow the procedure for Selecting Records. When prompted, click Yes.

bullet graphicIf exporting to data base or spreadsheet formats:
a. Click the appropriate export format. Click Select.Export database image

b. Type the file name with its path in the space indicated. Click Open.
c. A status bar displays the progress of the export. When the file has been exported, you will be offered the option of viewing the exported file. Click Yes to open the files.

bullet graphicIf exporting to an ASCII file:
a. Type the file name with its path in the space indicated. Click Open.
b. Check the destination of the export to make sure the data will be exported to the correct destination. 
c. Check the Write codebook box. 
d. Click the Source code generation tab and choose the options you wish to have generated. 
e. Click Export. A status bar displays the progress of the export. Export ASCII target image

f. When the export is finished, a window will pop-up, click Yes to open the files.

Extracting
When extracting data, you may choose to extract all of the records, a range of the records, or every nth record from the original format.
1. At the opening menu, click the + sign to the left of the word Data, so the names of data files drop down. 
2. Click on a file name
>Extract data.
3. Select the destination drive for storing the extracted data.
4. Name the file and click Open. This will bring up the Extracting original data template. Follow the instructions in order of the destination, code generation, record selection, and record type tabs. Extract original data screen image
(1) Destination: Verify the destination listed in the Destination window by clicking on the #2 tab.
(2) Code generation: Check the desired option boxes and click on tab #3.
(3) Record selection: Choose to extract all of the records or a subset of them, as directed in the window. Click on tab #4.
(4) Record type: Check the options, as per the instructions in this window. 
5. Click Extract. When SETS finishes the extraction, you will return to the Opening menu and the extracted fields will be stored, as designated.

 

This page last reviewed July 10, 2000

H H S Health and Human Services logo and link
U.S. DEPARTMENT OF HEALTH AND HUMAN SERVICES
Centers for Disease Control and Prevention
National Center for Health Statistics
Hyattsville, MD
20782

1-800-232-4636