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?
@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 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;
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 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.
@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) ... ;
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!
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.
Ready to level-up your skills? Choose your own adventure.