SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Raw Data
Submitting the DATA Step Program


Listing the Data Set

The messages in the log seem to indicate that the DATA step program correctly accesses the raw data file. But it's good practice to check the ten observations in the new data set before reading the entire raw data file. You can submit a PROC PRINT step to list the data.


To do this...   Use this SAS statement...
Reference SAS data librarylibname clinic 'c:\users\may\data';
Reference external filefilename tests 'c:\users\tmill.dat';
Name SAS data setdata clinic.stress;
Identify external fileinfile tests obs=10;
Describe Datainput ID 1-4 Name $ 6-25 ...;
Execute the DATA steprun;
List the dataPROC PRINT statment
Execute the final program stepRUN statement


The following PROC PRINT step lists the Stress data set.

     proc print data=clinic.stress;
     run;   

The PROC PRINT output indicates that the variables in the Clinic.Stress data set were read correctly for the first ten records.


Obs ID Name RestHR MaxHR RecHR TimeMin TimeSec Tolerance
1 2458 Murray, W 72 185 128 12 38 D
2 2462 Almers, C 68 171 133 10 5 I
3 2501 Bonaventure, T 78 177 139 11 13 I
4 2523 Johnson, R 69 162 114 9 42 S
5 2539 LaMance, K 75 168 141 11 46 D
6 2544 Jones, M 79 187 136 12 26 N
7 2552 Reberson, P 69 158 139 15 41 D
8 2555 King, E 70 167 122 13 13 I
9 2563 Pitts, D 71 159 116 10 22 S
10 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