<?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: i want to create a macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-create-a-macro-variable/m-p/541301#M149428</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265036"&gt;@bismilla&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i want a create a macro variable by taking all the values of the variable into the macro variable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ex;-&lt;/P&gt;
&lt;P&gt;data ds1;&lt;/P&gt;
&lt;P&gt;set sashelp.class;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do want all values of one variable stored in a macro variable or do you want all values of all variables in one macro-variable?&lt;/P&gt;
&lt;P&gt;As said by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;,&amp;nbsp;storing data in macro variables is almost always not necessary and you will be forced to write more code, than necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is, by the way, one of the very, very rare cases, in which using proc sql is justified:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
  select Name 
    into :NameList separated by ' '
    from sashelp.class
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Mar 2019 06:10:01 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2019-03-08T06:10:01Z</dc:date>
    <item>
      <title>i want to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-create-a-macro-variable/m-p/541289#M149423</link>
      <description>&lt;P&gt;i want a create a macro variable by taking all the values of the variable into the macro variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex;-&lt;/P&gt;&lt;P&gt;data ds1;&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 05:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-create-a-macro-variable/m-p/541289#M149423</guid>
      <dc:creator>bismilla</dc:creator>
      <dc:date>2019-03-08T05:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: i want to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-create-a-macro-variable/m-p/541292#M149424</link>
      <description>&lt;P&gt;Data belongs in datasets, not in macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create macro variables in data steps, use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1vvi5gjow523pn1tmx7cy8ox692.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;call symput()&lt;/A&gt; subroutine.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 05:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-create-a-macro-variable/m-p/541292#M149424</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-08T05:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: i want to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-create-a-macro-variable/m-p/541301#M149428</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265036"&gt;@bismilla&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i want a create a macro variable by taking all the values of the variable into the macro variable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ex;-&lt;/P&gt;
&lt;P&gt;data ds1;&lt;/P&gt;
&lt;P&gt;set sashelp.class;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do want all values of one variable stored in a macro variable or do you want all values of all variables in one macro-variable?&lt;/P&gt;
&lt;P&gt;As said by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;,&amp;nbsp;storing data in macro variables is almost always not necessary and you will be forced to write more code, than necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is, by the way, one of the very, very rare cases, in which using proc sql is justified:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
  select Name 
    into :NameList separated by ' '
    from sashelp.class
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Mar 2019 06:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-create-a-macro-variable/m-p/541301#M149428</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-08T06:10:01Z</dc:date>
    </item>
  </channel>
</rss>

