SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Raw Data
Submitting the DATA Step Program


Verifying the Data

It's a good idea to use the OBS= option in the INFILE statement so that you can verify that the correct data is being read before the entire data file is read.

The program below reads the first ten records in the raw data file assigned the fileref Tests. The data is stored in a permanent SAS data set, named Stress, in a SAS data library that is assigned the libref Clinic. Don't forget a RUN statement, which tells the SAS System to execute the previous SAS statements.

    data clinic.stress;        
       infile tests obs=10;  
       input ID 1-4 Name $ 6-25 
             RestHR 27-29 MaxHR 31-33        
             RecHR 35-37 TimeMin 39-40 
             TimeSec 42-43 Tolerance $ 45;       
    run;

SAS Data Set Clinic.Stress
ID Name RestHR MaxHR RecHR TimeMin TimeSec Tolerance
2458 Murray, W 72 185 128 12 38 D
2462 Almers, C 68 171 133 10 5 I
2501 Bonaventure, T 78 177 139 11 13 I
2523 Johnson, R 69 162 114 9 42 S
2539 LaMance, K 75 168 141 11 46 D
2544 Jones, M 79 187 136 12 26 N
2552 Reberson, P 69 158 139 15 41 D
2555 King, E 70 167 122 13 13 I
2563 Pitts, D 71 159 116 10 22 S
2568 Eberhardt, S 72 182 122 16 49 N



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement