BookmarkSubscribeRSS Feed
FP12
Obsidian | Level 7

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

3 REPLIES 3
Kurt_Bremser
Super User

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.

FP12
Obsidian | Level 7

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?  ^^

Shmuel
Garnet | Level 18

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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 697 views
  • 1 like
  • 3 in conversation