I'm trying to add a tool to the toolbar that will submit code (e.g. proc print), and then display the log only if there are errors.
I've tried various combinations of "submit;" followed by "gsubmit" and codes/short macros will run " dm 'log;'; " if the &SYSERR variable outputs anything other than 0. I think at least part of the problem is that the SYSERR is just referencing when the macro is defined and not the previously submitted code that I would like error checked, but I'm not sure how to make SAS execute code conditionally outside of a macro.
Any ideas?
What does your command to print look like so far?
Is it executing a macro? If so what is the code for the macro.
Do mean "switch to the Log window" if there are errors or are you attempting not to have anything in the log for the print if there are no errors.
And what type of errors are you concerned with?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.