BookmarkSubscribeRSS Feed
nickspencer
Obsidian | Level 7
Hi All,
I have a code which is writing some data in the log as a part of note/warning.
I want to suppress writing the column names and their values in the log. Is there any option that will prevent writing column names and their values? I am fine with the note though.

Note: Invalid numeric data at line 520 column 35
column1=abc Column2=500 column3=12345………



Thanks in advance
Nick
1 REPLY 1
Tom
Super User Tom
Super User

Yes.  Change the code so it does not cause that note/warning.

 

If there is a syntax error you should see in the LOG the code with underlines below it showing what part of the code is generating that note.  If not then you probably will see notes about trying to convert strings to numbers.

 

So what code is on line 520 of your program?  What statement/function call starts at column 35?

 

Example:

1233  data test;
1234   set sashelp.class;
1235   x = sex*name;
1236  run;

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
      1235:6    1235:10
NOTE: Invalid numeric data, Sex='M' , at line 1235 column 6.
NOTE: Invalid numeric data, Name='Alfred' , at line 1235 column 10.
Name=Alfred Sex=M Age=14 Height=69 Weight=112.5 x=. _ERROR_=1 _N_=1

So on line 1235 this program is trying to treat SEX and NAME as if they had NUMERIC values.  So SAS happily tried to convert M and Alfred to numbers, but it couldn't.

So the fix is not to treat character variables as numbers.  If the character variable has a value that could be a number then convert it yourself using the appropriate informat.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 400 views
  • 0 likes
  • 2 in conversation