BookmarkSubscribeRSS Feed
pblls
Calcite | Level 5

It's pretty well known that disabling unnecessary output will speed up most SAS PROCs, in particular when processing large amounts of (by-grouped) data. My standard go-to inside a macro that *only* has to produce a dataset (no actual result output) besides targeted ODS EXCLUDE statements is to check SASHELP.VDEST for open destinations, turn those into macro variables and close them, and then re-open the closed destinations.

 

The one thing that still clutters up the SAS Foundation Results window is ODS output datasets, which when numbering in the tens of thousands can really slow things down. I can get rid of those with an ODS RESULTS OFF (or ODS NORESULTS), but ideally I'd like to restore settings to whatever they were before the call when finished - not forcing things back open if previously closed by the user. Is there any way to programmatically check the ODS RESULTS status like you can do for other destinations? In a similar vein, can this be done for ODS GRAPHICS, or the ODS EXCLUDE list?

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @pblls,

 

The status of ODS GRAPHICS (ON=1, OFF=0) is stored in the SYSODSGRAPHICS automatic macro variable.

 

ODS SELECT or EXCLUDE lists can be retrieved with the ODS SHOW statement. It writes to the log, which can be read programmatically (cf. Re: Macro Variable for SAS/STAT version?).

 

I don't know a solution for the ODS RESULTS status. The 2016 post Re: Catch current setting of "ods escapechar" suggests that there was no simple solution back then. However, things might have changed. In particular, now there is the SYSODSESCAPECHAR automatic macro variable, which contains the current setting of ODS ESCAPECHAR.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 126 views
  • 3 likes
  • 2 in conversation