<?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 SAS Tip: Using GETOPTION to Save and Restore Options in SAS Tips from the Community</title>
    <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-GETOPTION-to-Save-and-Restore-Options/m-p/442588#M136</link>
    <description>&lt;P&gt;You can use the &lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n096vc8shtf7mzn1rlvx6003ayho.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;GETOPTION function&lt;/A&gt; to query for the current value of an option. And if you wrap the call the GETOPTION function with the &lt;A href="http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n1mix0b315l1dpn0zmhebdzifjne.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;%SYSFUNC macro function&lt;/A&gt;, you can save the value in a macro variable so it can be easily restored. For example, the following will enable you to use NOCENTER NONUMBER NODATE for some output and then reset the values back to their original values:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let saveOptions = %sysfunc(getoption(CENTER)) %sysfunc(getoption(NUMBER)) %sysfunc(getoption(DATE));
options nocenter nonumber nodate;

/* your code that depends on these options */

options &amp;amp;saveOptions; /* reset options to original values */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;
&lt;P&gt;Thanks to Don Henderson&amp;nbsp;for sharing this tip on sasCommunity.org.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Mar 2018 00:58:33 GMT</pubDate>
    <dc:creator>SAS_Tipster</dc:creator>
    <dc:date>2018-03-22T00:58:33Z</dc:date>
    <item>
      <title>SAS Tip: Using GETOPTION to Save and Restore Options</title>
      <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-GETOPTION-to-Save-and-Restore-Options/m-p/442588#M136</link>
      <description>&lt;P&gt;You can use the &lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n096vc8shtf7mzn1rlvx6003ayho.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;GETOPTION function&lt;/A&gt; to query for the current value of an option. And if you wrap the call the GETOPTION function with the &lt;A href="http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n1mix0b315l1dpn0zmhebdzifjne.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;%SYSFUNC macro function&lt;/A&gt;, you can save the value in a macro variable so it can be easily restored. For example, the following will enable you to use NOCENTER NONUMBER NODATE for some output and then reset the values back to their original values:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let saveOptions = %sysfunc(getoption(CENTER)) %sysfunc(getoption(NUMBER)) %sysfunc(getoption(DATE));
options nocenter nonumber nodate;

/* your code that depends on these options */

options &amp;amp;saveOptions; /* reset options to original values */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;
&lt;P&gt;Thanks to Don Henderson&amp;nbsp;for sharing this tip on sasCommunity.org.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 00:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-GETOPTION-to-Save-and-Restore-Options/m-p/442588#M136</guid>
      <dc:creator>SAS_Tipster</dc:creator>
      <dc:date>2018-03-22T00:58:33Z</dc:date>
    </item>
  </channel>
</rss>

