Reading Raw Data |
Submitting the DATA Step Program![]() |
Invalid Data
When you submit the revised DATA step and check the log, you see a note
indicating that invalid data appears for the variable
This note is followed by a column ruler and the actual data line showing
the invalid value for |
NOTE: Invalid data for RecHR in line 14 35-37. RULE: ----+----1----+----2----+----3----+----4----+----5--- 14 2575 Quigley, M 74 152 Q13 11 26 I 45 ID=2575 Name=Quigley, M RestHR=74 MaxHR=152 RecHR=. TimeMin=11 TimeSec=26 Tolerance=I _ERROR_=1 _N_=14 NOTE: 21 records were read from the infile TESTS. The minimum record length was 45. The maximum record length was 45. NOTE: The data set CLINIC.STRESS has 21 observations and 8 variables. NOTE: DATA statement used: real time 2.04 seconds cpu time 0.06 seconds |
The value Q13 is a data entry error, incorrectly
entered for the variable RecHR .
Notice, though, that the DATA step does not fail as a result of the invalid data but continues to execute. Unlike syntax errors, invalid data errors do not cause the SAS System to stop processing a program. Assuming that you have a way to to edit the file and can justify a correction, the best course of action is to correct the invalid value and rerun the DATA step. If you did this, the log would then show that the data set Clinic.Stress was created with 21 observations, 8 variables, and no messages about invalid data. |
NOTE: The infile TESTS2 is: File Name=C:\My SAS Files\tests2.dat, RECFM=V,LRECL=256 NOTE: 21 records were read from the infile TESTS2. The minimum record length was 45. The maximum record length was 45. NOTE: The data set CLINIC.STRESS has 21 observations and 8 variables. NOTE: DATA statement used: real time 0.40 seconds cpu time 0.10 seconds |
![]() ![]() ![]() ![]() ![]() ![]() |
|
![]() |
![]() |
Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.