<?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 CALL SYMPUT problem in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451895#M69780</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to save parameters as macro value. I have a variable called beta with values 1-8, represented beta1 - beta8. I would like to save each betaas as a macro value called 1bar-8bar, but I am having trouble with the naming of the variable 'ibar' in the symput statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I achieve this or similar result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*store the estimated parameters;
data _null_;
 set t0;
do i= 1 to 8;
if beta = i then 
 call symput('ibar', Estimate);
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 06 Apr 2018 14:15:20 GMT</pubDate>
    <dc:creator>GKati</dc:creator>
    <dc:date>2018-04-06T14:15:20Z</dc:date>
    <item>
      <title>CALL SYMPUT problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451895#M69780</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to save parameters as macro value. I have a variable called beta with values 1-8, represented beta1 - beta8. I would like to save each betaas as a macro value called 1bar-8bar, but I am having trouble with the naming of the variable 'ibar' in the symput statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I achieve this or similar result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*store the estimated parameters;
data _null_;
 set t0;
do i= 1 to 8;
if beta = i then 
 call symput('ibar', Estimate);
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 14:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451895#M69780</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2018-04-06T14:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: CALL SYMPUT problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451903#M69781</link>
      <description>&lt;P&gt;Try something like--&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
 set t0;
do i= 1 to 8;
if beta = i then 
 call symput(cats('ibar',i), Estimate);
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 14:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451903#M69781</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-04-06T14:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: CALL SYMPUT problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451904#M69782</link>
      <description>&lt;P&gt;Post some test data, I can't see anything from that code.&amp;nbsp; Also, why do you want to put things into macro paramters?&amp;nbsp; Datasets are for data.&amp;nbsp; You cannot have macro variables (or any variables) called Xbar, where X is a number, this is invalid as variables need to start with a non-numeric value.&amp;nbsp; Also, if you have multiple rows, then ibar may get overwritten each time.&amp;nbsp; Of course without data I can't say for sure.&amp;nbsp; Perhaps post test data, and what you want to see as 100% sure there is a better method.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 14:27:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451904#M69782</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-06T14:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: CALL SYMPUT problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451918#M69784</link>
      <description>&lt;P&gt;You cannot&amp;nbsp;start with a macro variable name with a number per the naming rules. If you do _ibar or bari instead, either would likely work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
1    %let 8bar=2;
ERROR: Expecting a variable name after %LET.
2    %put &amp;amp;8bar.;
&amp;amp;8bar.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 14:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-SYMPUT-problem/m-p/451918#M69784</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-06T14:48:13Z</dc:date>
    </item>
  </channel>
</rss>

