<?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 RETURN VALUE OPTIONS for GETOPITON in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/RETURN-VALUE-OPTIONS-for-GETOPITON/m-p/426795#M105196</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;whenn I run this code, it works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optsave out= work.default_options;
run;

data _null_;
set work.default_options;
call symputx(compress("optname"||_N_) , compress(optname));
run;

%MACRO do_it;

data append_set  ;
length optionsname optionswert  $100.;
%DO i=1 %TO   &amp;amp;anz_opts. ;
optionsname = "&amp;amp;&amp;amp;optname&amp;amp;i..";
optionswert = getoption("&amp;amp;&amp;amp;optname&amp;amp;i..");
output;
%END;
run;

%mend;
%do_it;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, when I specify a return value option (e.g.: "defaultvalue") as a second argument in the getopiton function:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optsave out= work.default_options;
run;

data _null_;
set work.default_options;
call symputx(compress("optname"||_N_) , compress(optname));
run;

%MACRO do_it;

data append_set  ;
length optionsname optionswert  $100.;
%DO i=1 %TO   &amp;amp;anz_opts. ;
optionsname = "&amp;amp;&amp;amp;optname&amp;amp;i..";
optionswert = getoption("&amp;amp;&amp;amp;optname&amp;amp;i.." ,DEFAULTVALUE );
output;
%END;
run;

%mend;
%do_it;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get a note stating that "Variable DEFAULTVALUE is uninitialized."&lt;/P&gt;&lt;P&gt;As far as I understand the help documentation on "getoption" it should be possible to add a second argument to the function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#n096vc8shtf7mzn1rlvx6003ayho.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#n096vc8shtf7mzn1rlvx6003ayho.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2018 08:18:59 GMT</pubDate>
    <dc:creator>FK1</dc:creator>
    <dc:date>2018-01-11T08:18:59Z</dc:date>
    <item>
      <title>RETURN VALUE OPTIONS for GETOPITON</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RETURN-VALUE-OPTIONS-for-GETOPITON/m-p/426795#M105196</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;whenn I run this code, it works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optsave out= work.default_options;
run;

data _null_;
set work.default_options;
call symputx(compress("optname"||_N_) , compress(optname));
run;

%MACRO do_it;

data append_set  ;
length optionsname optionswert  $100.;
%DO i=1 %TO   &amp;amp;anz_opts. ;
optionsname = "&amp;amp;&amp;amp;optname&amp;amp;i..";
optionswert = getoption("&amp;amp;&amp;amp;optname&amp;amp;i..");
output;
%END;
run;

%mend;
%do_it;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, when I specify a return value option (e.g.: "defaultvalue") as a second argument in the getopiton function:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optsave out= work.default_options;
run;

data _null_;
set work.default_options;
call symputx(compress("optname"||_N_) , compress(optname));
run;

%MACRO do_it;

data append_set  ;
length optionsname optionswert  $100.;
%DO i=1 %TO   &amp;amp;anz_opts. ;
optionsname = "&amp;amp;&amp;amp;optname&amp;amp;i..";
optionswert = getoption("&amp;amp;&amp;amp;optname&amp;amp;i.." ,DEFAULTVALUE );
output;
%END;
run;

%mend;
%do_it;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get a note stating that "Variable DEFAULTVALUE is uninitialized."&lt;/P&gt;&lt;P&gt;As far as I understand the help documentation on "getoption" it should be possible to add a second argument to the function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#n096vc8shtf7mzn1rlvx6003ayho.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#n096vc8shtf7mzn1rlvx6003ayho.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 08:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RETURN-VALUE-OPTIONS-for-GETOPITON/m-p/426795#M105196</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2018-01-11T08:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN VALUE OPTIONS for GETOPITON</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RETURN-VALUE-OPTIONS-for-GETOPITON/m-p/426842#M105210</link>
      <description>&lt;P&gt;Have you tried putting quotes around DEFAULTVALUE?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't test it myself for a few hours,but that's often how a DATA step determines that a word is not a variable name..&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 11:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RETURN-VALUE-OPTIONS-for-GETOPITON/m-p/426842#M105210</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-01-11T11:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN VALUE OPTIONS for GETOPITON</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RETURN-VALUE-OPTIONS-for-GETOPITON/m-p/426845#M105211</link>
      <description>Sometimes the easiest things are the ones that cause trouble &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 11 Jan 2018 11:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RETURN-VALUE-OPTIONS-for-GETOPITON/m-p/426845#M105211</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2018-01-11T11:40:39Z</dc:date>
    </item>
  </channel>
</rss>

