<?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: sas macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94381#M257641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or is this a situation for a symputx and symgetn?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Sep 2013 12:40:56 GMT</pubDate>
    <dc:creator>Steelers_In_DC</dc:creator>
    <dc:date>2013-09-26T12:40:56Z</dc:date>
    <item>
      <title>sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94380#M257640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a little out of practice, I'd like to macro the following code so it will go through each unique 'pcpid' seperatley (from 1 %to end?) and put the pcpid on the graph as a label.&amp;nbsp; I'm thinking a simple macro loop with symputx to macro the variable through the loop but I don't know how to do it.&amp;nbsp; Any help will be appreciated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;title "PCPID = &amp;amp;pcpid";&lt;/P&gt;&lt;P&gt;proc gplot data=test;&lt;/P&gt;&lt;P&gt;symbol i=join v=circle h=2;&lt;/P&gt;&lt;P&gt;plot distance*month;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 12:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94380#M257640</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2013-09-26T12:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94381#M257641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or is this a situation for a symputx and symgetn?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 12:40:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94381#M257641</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2013-09-26T12:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94382#M257642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just use a BY statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;options nobyline;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;title "PCPID = &lt;STRONG&gt;#byval(pcpid)&lt;/STRONG&gt;";&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc gplot data=test;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;by pcpid ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;symbol i=join v=circle h=2;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;plot distance*month;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 12:48:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94382#M257642</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-09-26T12:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94383#M257643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome suggestion.&amp;nbsp; I'll have to read up on this option as it is new to me.&amp;nbsp; This did exactly what I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 12:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94383#M257643</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2013-09-26T12:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94384#M257644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a number of writeups for how to do something like that. You might start with this one.&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.sascommunity.org/wiki/List_Processing_Basics_Creating_and_Using_Lists_of_Macro_Variables"&gt;http://www.sascommunity.org/wiki/List_Processing_Basics_Creating_and_Using_Lists_of_Macro_Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally for really simple problems I normally create a single macro variable with a space delimited list of values using PROC SQL and remember the number of values by saving the value of the automatic macro variable SQLOBS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc sql noprint;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; select name into :names separated by ' '&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; from sashelp.class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%let n=&amp;amp;sqlobs;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%do i=1 %to &amp;amp;n ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; %let name=%scan(&amp;amp;names,&amp;amp;i,%str( ));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;.... &amp;amp;name ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%end;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 14:21:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro/m-p/94384#M257644</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-09-26T14:21:10Z</dc:date>
    </item>
  </channel>
</rss>

