BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SASuserlot
Barite | Level 11

We trying to have a macro to check issues. I came across, "UWARNING" and "UERROR" in one of the online program in their issues list. I have never encountered these in my experience. In what cases do we see these in the logs?

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

@SASuserlot wrote:

We trying to have a macro to check issues. I came across, "UWARNING" and "UERROR" in one of the online program in their issues list. I have never encountered these in my experience. In what cases do we see these in the logs?


Probably when you have code that generates them.

%if not %sysfunc(exist(DM)) %then %do;
%put UERROR: DM dataset not found. ;
%end;

View solution in original post

5 REPLIES 5
Tom
Super User Tom
Super User

@SASuserlot wrote:

We trying to have a macro to check issues. I came across, "UWARNING" and "UERROR" in one of the online program in their issues list. I have never encountered these in my experience. In what cases do we see these in the logs?


Probably when you have code that generates them.

%if not %sysfunc(exist(DM)) %then %do;
%put UERROR: DM dataset not found. ;
%end;
SASuserlot
Barite | Level 11

Thank you for the quick reply; so, these are customized warnings or notes we put for our tracking purposes, not usual issues we see in the log? is my understanding correct?

ballardw
Super User

I won't say that I've seen every error or warning SAS may generate bu those look like user written code.

 

Open the code for the macro and search for the text "UERROR" and / or "UWARNING" in the code. If you see them in %PUT or Put statements that's your answer. As well as the likely conditions causing them.

 

I would say there is chance that these warnings are also associated with code to skip other bits of code that might cause other errors that would appear.

Quentin
Super User

@SASuserlot wrote:

Thank you for the quick reply; so, these are customized warnings or notes we put for our tracking purposes, not usual issues we see in the log? is my understanding correct?


I think that's  a good bet. I would assume the U is for "user" as in "user-generated error message".  

 

I sometimes use:

put "ERROR: (USER)  something bad happened " ;

So that the message starts with ERROR: and will be highlighted in the log like other errors.  But I know it's an error message written by me, not SAS.

 

Since my name is Quentin I use Q for a lot of stuff, so I also do:

put "ERROR: (QQQ) something bad happened " ;

when I'm talking to myself. : )

 

Inside a macro definition, I use:

%put ERROR: (%nrstr(%%)&sysmacroname) ... ;
BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
SASuserlot
Barite | Level 11

Understood. Thank you @Quentin , @ballardw , @Tom  for your help

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 5 replies
  • 424 views
  • 7 likes
  • 4 in conversation