BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Is there a good way to do error handling in proc fcmp and throw an error message to the SAS log in red font?  

The only way I have been handling error messages in fcmp is by doing something like this:

if lettercase not in("U", "L") then do;
     put  "ERROR The second argument to the letters function must be one of U, u, L, or l."; 

but this only writes the message to the log in standard black font.  I want the font to mirror the SAS system error messages.  Also, is there a preferred or specific value I shoudl be returning for errors?



Accepted Solutions
Super User Tom
Super User

Why didn't you include the colon?


Quartz | Level 8

Ahhh.  Thanks.  I didn't realize I simply had to put in a colon.  That worked!


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 1 like
  • 2 in conversation