Hi all,
I theorically map a file to a SAS table but usually some data are not matching as it should.
For example:
NOTE: Invalid data for DT_ECH_LAST in line 287 151-158.
It's not so much important as I just need a part of the data in the following, and the part I need matches correctly.
But i still get a warning about it:
WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
I want to avoid two things:
1/ I read on Internet that if the number of non-matching data is superior to 50, the warning becomes an error. Is it true? How can I avoid it?
2/ I don't want the program to display the warning of this type, because in my program, it's kind of normal and it's not a warning. Can I do this?
Thanks
These warnings are NOT "normal". Tolerating such warnings is just a sign of sloppy/lazy programming. See my Maxims 22 & 25.
Read those values into character variables, and then do a conversion to numeric in a controlled way, selectively recognizing "valid missing" values.
That way you will be informed if you get unexpected data.
For more in-depth help, post your import code and some of the incriminating lines from the input file.
Thanks Kurt,
In this case I prefer to extract only the useful part from my file. Like this, no more non-matching issue and no more warning.
Yes I know it's a bit lazy way of doing it, but why doing more? ^^
Your log message is:
Invalid data for DT_ECH_LAST in line 287 151-158.
it means that somewhere in your reading file program, you have a line like:
input ... 151-158 DT_ECH_LAST ...
if you don't need this variable you can skip reading it, than you shall not get the warning message at all.
About your question (1) - you can manage how many warnings will be displayed in log by OPTIONS ERRORS=.
When count exeeds the option given, there will be no more warnings except an ERROR message at the end of the data step
log, but it is still treated as a warning.
I warmly suugest to use @Kurt_Bremser advise and correct your program to deal with missing value or other failure of data.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.