<?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 symput in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416958#M67671</link>
    <description>This worked.thanks a lot.</description>
    <pubDate>Wed, 29 Nov 2017 05:07:58 GMT</pubDate>
    <dc:creator>Sharathr</dc:creator>
    <dc:date>2017-11-29T05:07:58Z</dc:date>
    <item>
      <title>Passing multiple values in call symput</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416842#M67655</link>
      <description>Hi forum,&lt;BR /&gt;Is it possible to pass multiple values to a macro variable created in call symput.&lt;BR /&gt;Data sample;&lt;BR /&gt;Infile data lines;&lt;BR /&gt;Input name $;&lt;BR /&gt;Data lines;&lt;BR /&gt;John&lt;BR /&gt;Mark&lt;BR /&gt;Carl&lt;BR /&gt;;&lt;BR /&gt;Data _null_;&lt;BR /&gt;Set sample;&lt;BR /&gt;Call symput(name1,name);&lt;BR /&gt;Run;&lt;BR /&gt;&lt;BR /&gt;How can I assign the each data step values separately to macro variable and use it in my code?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2017 20:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416842#M67655</guid>
      <dc:creator>Sharathr</dc:creator>
      <dc:date>2017-11-28T20:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Passing multiple values in call symput</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416845#M67656</link>
      <description>&lt;P&gt;Are you trying to create a single macro variable or many here? Personally, I find SQL easier to use in these cases.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Multiple macro variables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql noprint;
Select name into : name1-
From sashelp.class;
Quit;&lt;BR /&gt;&lt;BR /&gt;%put &amp;amp;name1.;&lt;BR /&gt;%put &amp;amp;name19.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Single macro variable, delimited by space:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql noprint;
Select name into :name_list separated by “ “
From sashelp.class; 
Quit;&lt;BR /&gt;%put &amp;amp;name_list;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Nov 2017 20:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416845#M67656</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-28T20:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Passing multiple values in call symput</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416850#M67659</link>
      <description>&lt;P&gt;The following datastep creates a single macro variable for each record in your set and a variable that has the count.&lt;/P&gt;
&lt;PRE&gt;Data _null_;
   Set sample;
   mvarname= catt('name',_n_);
   Call symputx(mvarname,name);
   call symputx('numnames',_n_);
Run;&lt;/PRE&gt;
&lt;P&gt;Old school, as in SAS 6. I would go with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s Proc SQL most of the time these days.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 20:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416850#M67659</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-28T20:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Passing multiple values in call symput</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416958#M67671</link>
      <description>This worked.thanks a lot.</description>
      <pubDate>Wed, 29 Nov 2017 05:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/416958#M67671</guid>
      <dc:creator>Sharathr</dc:creator>
      <dc:date>2017-11-29T05:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Passing multiple values in call symput</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/417098#M67677</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/179995"&gt;@Sharathr&lt;/a&gt;&amp;nbsp;please choose someone else's answer as the solution, not your own.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 15:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Passing-multiple-values-in-call-symput/m-p/417098#M67677</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-29T15:42:38Z</dc:date>
    </item>
  </channel>
</rss>

