<?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 Re: Get the value of a system option in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786498#M251130</link>
    <description>&lt;P&gt;Macro variables are more common:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Save the value of the MPRINT system option */
%let mprint_option = %sysfunc(getoption(MPRINT));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18128"&gt;@NN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Everyone,&lt;BR /&gt;Is there a way to get the value of an option into a dataset.\ ?&lt;/P&gt;
&lt;P&gt;for example if i run the below statement it prints the value of option to the log.&lt;/P&gt;
&lt;P&gt;but is there a way to get this value in a dataset so that i can check if mprint option is set to Mprint or nomprint?&lt;/P&gt;
&lt;PRE&gt;proc options option=mprint;
run;
&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Dec 2021 16:03:42 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-12-17T16:03:42Z</dc:date>
    <item>
      <title>Get the value of a system option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786487#M251124</link>
      <description>&lt;P&gt;Hi Everyone,&lt;BR /&gt;Is there a way to get the value of an option into a dataset.\ ?&lt;/P&gt;
&lt;P&gt;for example if i run the below statement it prints the value of option to the log.&lt;/P&gt;
&lt;P&gt;but is there a way to get this value in a dataset so that i can check if mprint option is set to Mprint or nomprint?&lt;/P&gt;
&lt;PRE&gt;proc options option=mprint;
run;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Dec 2021 15:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786487#M251124</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2021-12-17T15:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value of a system option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786495#M251128</link>
      <description>&lt;P&gt;You can use the DMOPTSAVE &lt;STRONG&gt;command&lt;/STRONG&gt; with a data set to save the current settings of all options to a data set such as Work.myopts in the Display Manager. Not sure about other interfaces like Enterprise Guide or SAS Studio.&lt;/P&gt;
&lt;P&gt;How you issue the command depends on your system.&lt;/P&gt;
&lt;P&gt;You could then search for the name of the option, Optname and Optvalue. The on/off type options like MPRINT have values of "0" (off) or "1" (on). The option values are character because many of the system options like FMTSEARCH can have character values.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 15:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786495#M251128</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-17T15:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value of a system option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786498#M251130</link>
      <description>&lt;P&gt;Macro variables are more common:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Save the value of the MPRINT system option */
%let mprint_option = %sysfunc(getoption(MPRINT));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18128"&gt;@NN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Everyone,&lt;BR /&gt;Is there a way to get the value of an option into a dataset.\ ?&lt;/P&gt;
&lt;P&gt;for example if i run the below statement it prints the value of option to the log.&lt;/P&gt;
&lt;P&gt;but is there a way to get this value in a dataset so that i can check if mprint option is set to Mprint or nomprint?&lt;/P&gt;
&lt;PRE&gt;proc options option=mprint;
run;
&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 16:03:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786498#M251130</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-17T16:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value of a system option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786518#M251142</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;for your solutions.&lt;BR /&gt;&lt;BR /&gt;The macro option is a quick solution for my current need hence i shall go ahead with it.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 16:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786518#M251142</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2021-12-17T16:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value of a system option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786601#M251180</link>
      <description>&lt;P&gt;If you ever need to reset that option back to it's original value, you could use this macro (inspired by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13728"&gt;@SASJedi&lt;/a&gt;&amp;nbsp;) :&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__resetoption_8sas.html" target="_blank" rel="noopener"&gt;https://core.sasjs.io/mp__resetoption_8sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 14:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-the-value-of-a-system-option/m-p/786601#M251180</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-12-18T14:30:57Z</dc:date>
    </item>
  </channel>
</rss>

