BookmarkSubscribeRSS Feed
moreka
Obsidian | Level 7

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?

1 REPLY 1
ballardw
Super User

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?

sas-innovate-2024.png

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!

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.

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
  • 1 reply
  • 733 views
  • 0 likes
  • 2 in conversation