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) ... ;
The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
SASuserlot
Barite | Level 11

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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 5 replies
  • 733 views
  • 7 likes
  • 4 in conversation