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.";
return(-1);
end;
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?
Thanks.
Why didn't you include the colon?
Ahhh. Thanks. I didn't realize I simply had to put in a colon. That worked!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.