<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Programmatically check ODS (RESULTS, GRAPHICS, EXCLUDE) status in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-check-ODS-RESULTS-GRAPHICS-EXCLUDE-status/m-p/883890#M349191</link>
    <description>&lt;P&gt;It's&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2013/05/24/turn-off-ods-for-simulations.html" target="_self"&gt;pretty well known&lt;/A&gt;&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;&lt;EM&gt;really&lt;/EM&gt; slow things down. I can get rid of those with an &lt;FONT face="courier new,courier"&gt;ODS RESULTS OFF&lt;/FONT&gt;&amp;nbsp;(or &lt;FONT face="courier new,courier"&gt;ODS NORESULTS&lt;/FONT&gt;), 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?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2023 06:37:57 GMT</pubDate>
    <dc:creator>pblls</dc:creator>
    <dc:date>2023-07-07T06:37:57Z</dc:date>
    <item>
      <title>Programmatically check ODS (RESULTS, GRAPHICS, EXCLUDE) status</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-check-ODS-RESULTS-GRAPHICS-EXCLUDE-status/m-p/883890#M349191</link>
      <description>&lt;P&gt;It's&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2013/05/24/turn-off-ods-for-simulations.html" target="_self"&gt;pretty well known&lt;/A&gt;&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;&lt;EM&gt;really&lt;/EM&gt; slow things down. I can get rid of those with an &lt;FONT face="courier new,courier"&gt;ODS RESULTS OFF&lt;/FONT&gt;&amp;nbsp;(or &lt;FONT face="courier new,courier"&gt;ODS NORESULTS&lt;/FONT&gt;), 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?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 06:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-check-ODS-RESULTS-GRAPHICS-EXCLUDE-status/m-p/883890#M349191</guid>
      <dc:creator>pblls</dc:creator>
      <dc:date>2023-07-07T06:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically check ODS (RESULTS, GRAPHICS, EXCLUDE) status</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-check-ODS-RESULTS-GRAPHICS-EXCLUDE-status/m-p/883944#M349214</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/316001"&gt;@pblls&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The status of ODS GRAPHICS (ON=1, OFF=0) is stored in the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n18k0guu2n0tn5n1b5msizuqdq1u.htm" target="_blank" rel="noopener"&gt;SYSODSGRAPHICS automatic macro variable&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS SELECT or EXCLUDE lists can be retrieved with the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/n039755ylf7oppn141m3puregz1r.htm" target="_blank" rel="noopener"&gt;ODS SHOW statement&lt;/A&gt;. It writes to the log, which can be read programmatically (cf.&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Macro-Variable-for-SAS-STAT-version/m-p/694379/highlight/true#M211759" target="_blank" rel="noopener"&gt;Re: Macro Variable for SAS/STAT version?&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know a solution for the ODS RESULTS status. The 2016 post &lt;A href="https://communities.sas.com/t5/SAS-Programming/Catch-current-setting-of-quot-ods-escapechar-quot/m-p/292899/highlight/true#M311777" target="_blank" rel="noopener"&gt;Re: Catch current setting of "ods escapechar"&lt;/A&gt;&amp;nbsp;suggests that there was no simple solution back then. However, things might have changed. In particular, now there &lt;EM&gt;is&lt;/EM&gt; the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p0qzibu4f9o7rnn1d7fh5lnlwa88.htm" target="_blank" rel="noopener"&gt;SYSODSESCAPECHAR automatic macro variable&lt;/A&gt;, which contains the current setting of ODS ESCAPECHAR.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 12:32:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-check-ODS-RESULTS-GRAPHICS-EXCLUDE-status/m-p/883944#M349214</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-07-07T12:32:25Z</dc:date>
    </item>
  </channel>
</rss>

