<?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: variable list in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69401#M15041</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Without knowing more about what exactly you want to accomplish you could just put the variables in a macro variable to be used in var statements across procs.  Something like&lt;BR /&gt;
&lt;BR /&gt;
%let vars=Jan_10 Feb_10 Mar_10 Apr_10 May_10 Jun_10 Jul_10;&lt;BR /&gt;
&lt;BR /&gt;
then in your program, lets say in proc print, you would use&lt;BR /&gt;
&lt;BR /&gt;
proc print data=dsn;&lt;BR /&gt;
var &amp;amp;vars;&lt;BR /&gt;
run;</description>
    <pubDate>Thu, 02 Sep 2010 14:01:07 GMT</pubDate>
    <dc:creator>RickM</dc:creator>
    <dc:date>2010-09-02T14:01:07Z</dc:date>
    <item>
      <title>variable list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69400#M15040</link>
      <description>Hello&lt;BR /&gt;
&lt;BR /&gt;
I would like to define a list like this&lt;BR /&gt;
var Jan_10 Feb_10 Mar_10 Apr_10 May_10 Jun_10 Jul_10;&lt;BR /&gt;
&lt;BR /&gt;
then call it from any program when needed, how can i do this simply?&lt;BR /&gt;
&lt;BR /&gt;
Fred</description>
      <pubDate>Thu, 02 Sep 2010 13:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69400#M15040</guid>
      <dc:creator>fredbell</dc:creator>
      <dc:date>2010-09-02T13:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: variable list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69401#M15041</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Without knowing more about what exactly you want to accomplish you could just put the variables in a macro variable to be used in var statements across procs.  Something like&lt;BR /&gt;
&lt;BR /&gt;
%let vars=Jan_10 Feb_10 Mar_10 Apr_10 May_10 Jun_10 Jul_10;&lt;BR /&gt;
&lt;BR /&gt;
then in your program, lets say in proc print, you would use&lt;BR /&gt;
&lt;BR /&gt;
proc print data=dsn;&lt;BR /&gt;
var &amp;amp;vars;&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 02 Sep 2010 14:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69401#M15041</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2010-09-02T14:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: variable list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69402#M15042</link>
      <description>Investigate using the old-style MACRO statement or MACRO variable  for simple context substitution.  Samples are listed below:&lt;BR /&gt;
&lt;BR /&gt;
%LET XXXX = %QUOTE( * this is a comment; );&lt;BR /&gt;
&lt;BR /&gt;
MACRO _YYYY&lt;BR /&gt;
  * this is also a comment; &lt;BR /&gt;
%&lt;BR /&gt;
&lt;BR /&gt;
The first example is referenced by  &amp;amp;XXXX  in your program.&lt;BR /&gt;
&lt;BR /&gt;
The second example is referenced by the character string  _YYYY   -- in this case, the SAS code parser sees the MACRO statement declaration and then will make the substitution in its place.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 02 Sep 2010 14:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69402#M15042</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-09-02T14:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: variable list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69403#M15043</link>
      <description>Thanks RickM, i had attempted this myself and it did not work but it did this time.&lt;BR /&gt;
&lt;BR /&gt;
Crazy but often it does not work until you show someone, then it does and makes you look like a clown.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again&lt;BR /&gt;
&lt;BR /&gt;
Fred</description>
      <pubDate>Thu, 02 Sep 2010 14:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/variable-list/m-p/69403#M15043</guid>
      <dc:creator>fredbell</dc:creator>
      <dc:date>2010-09-02T14:29:39Z</dc:date>
    </item>
  </channel>
</rss>

