<?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: Passing multiple values in call symputx in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490737#M21547</link>
    <description>&lt;P&gt;Run this again on a new SAS session, and you'll find that the &amp;amp;n variables are not defined either. They are not created because of the if _n_ = 1 condition, similar to the &amp;amp;m.&lt;/P&gt;
&lt;P&gt;What did you want to achieve with the if _n_ = 1?&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2018 06:46:09 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-08-29T06:46:09Z</dc:date>
    <item>
      <title>Passing multiple values in call symputx</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490674#M21544</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using a macro symputx statement to output needed values that store so I can use them later in my program.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data maxall;
set maxall0;
	by tx descending aval;
	if _n_ = 1 then call symputx("n"||tx,strip(put(aval,best.)));
	if _n_ = 1 then call symputx("m"||tx,cnsr1);
run;
%put &amp;amp;nA &amp;amp;nB &amp;amp;nC &amp;amp;nD &amp;amp;nE &amp;amp;nF &amp;amp;nG &amp;amp;nT;
%put &amp;amp;mA &amp;amp;mB &amp;amp;mC &amp;amp;mD &amp;amp;mE &amp;amp;mF &amp;amp;mG &amp;amp;mT;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;All of the cnsr1 values are populated with character values.&amp;nbsp; Macro variables starting with 'n' are resolving fine.&amp;nbsp; However,&amp;nbsp;only the first macro variable beginning with 'm' is resolving.&amp;nbsp; I am getting errors like this:&amp;nbsp; 'WARNING: Apparent symbolic reference MB not resolved.'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure why I'm getting this error.&amp;nbsp; Does anyone see any ideas on what might be happening?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 23:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490674#M21544</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2018-08-28T23:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Passing multiple values in call symputx</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490687#M21545</link>
      <description>&lt;P&gt;Why do you have if _n_=1 if you want multiple macro variables? It would only create a macro variable for the first record and no others.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try removing the IF condition and see if you get what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also recommend the&amp;nbsp;CATT function instead of || since it doesn't deal with spaces the same way and you can get some issues with that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I am guessing though, Since we don't really know what you're trying to do overall (can't see the source data) its hard to say what else is needed.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59697"&gt;@jenim514&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using a macro symputx statement to output needed values that store so I can use them later in my program.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data maxall;
set maxall0;
	by tx descending aval;
	if _n_ = 1 then call symputx("n"||tx,strip(put(aval,best.)));
	if _n_ = 1 then call symputx("m"||tx,cnsr1);
run;
%put &amp;amp;nA &amp;amp;nB &amp;amp;nC &amp;amp;nD &amp;amp;nE &amp;amp;nF &amp;amp;nG &amp;amp;nT;
%put &amp;amp;mA &amp;amp;mB &amp;amp;mC &amp;amp;mD &amp;amp;mE &amp;amp;mF &amp;amp;mG &amp;amp;mT;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;All of the cnsr1 values are populated with character values.&amp;nbsp; Macro variables starting with 'n' are resolving fine.&amp;nbsp; However,&amp;nbsp;only the first macro variable beginning with 'm' is resolving.&amp;nbsp; I am getting errors like this:&amp;nbsp; 'WARNING: Apparent symbolic reference MB not resolved.'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure why I'm getting this error.&amp;nbsp; Does anyone see any ideas on what might be happening?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 00:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490687#M21545</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-29T00:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passing multiple values in call symputx</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490737#M21547</link>
      <description>&lt;P&gt;Run this again on a new SAS session, and you'll find that the &amp;amp;n variables are not defined either. They are not created because of the if _n_ = 1 condition, similar to the &amp;amp;m.&lt;/P&gt;
&lt;P&gt;What did you want to achieve with the if _n_ = 1?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 06:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490737#M21547</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-29T06:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Passing multiple values in call symputx</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490739#M21548</link>
      <description>&lt;P&gt;And depending on the further use of those macro variables, it may well turn out that you'd be better off creating dynamic code directly off the dataset with call execute.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 06:53:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Passing-multiple-values-in-call-symputx/m-p/490739#M21548</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-29T06:53:40Z</dc:date>
    </item>
  </channel>
</rss>

