<?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: is there a way to create a macro variable which can further used for concatination in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401290#M97351</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  counter = countw(sec_all, ',');
  do i=1 to counter by 2;
   sec_cat = trim(catt("&amp;amp;sec_at", scan(sec_all, i, ','));
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 11:39:05 GMT</pubDate>
    <dc:creator>Criptic</dc:creator>
    <dc:date>2017-10-05T11:39:05Z</dc:date>
    <item>
      <title>is there a way to create a macro variable which can further used for concatination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401285#M97348</link>
      <description>&lt;P&gt;I am using the below step to check if the variables are not missing than concatenate. can i use these sec1 and sec2 in macro call because i dont know how many sec.. will be&amp;nbsp; coming later.&lt;/P&gt;&lt;P&gt;any idea?&lt;/P&gt;&lt;PRE&gt;if SEC1 ne '' and SEC2 ne '' then do;
        sec_r=catx(';', of SEC:);¨
end;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Oct 2017 11:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401285#M97348</guid>
      <dc:creator>mj5</dc:creator>
      <dc:date>2017-10-05T11:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to create a macro variable which can further used for concatination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401287#M97349</link>
      <description>I did something like this where I passed all these values as one String in a macro variable separated by ','. Then I count the number of words (countw()) and do a do-loop in which I concat the variables into a new variable.</description>
      <pubDate>Thu, 05 Oct 2017 11:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401287#M97349</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-05T11:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to create a macro variable which can further used for concatination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401289#M97350</link>
      <description>&lt;P&gt;I am sorry, I don't follow you.&amp;nbsp; The catx(';',of sec:) will concatenate all non missing variables with prefix sec together.&amp;nbsp; I don't see where the need to use macro or check missing comes from?&amp;nbsp; Please provide good examples - post test data in the form of a datastep and what you expect as output.&amp;nbsp; Remember macro SAS is&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/U&gt; a replacement for Base SAS, and doesn't do anything magical.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 11:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401289#M97350</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-10-05T11:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to create a macro variable which can further used for concatination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401290#M97351</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  counter = countw(sec_all, ',');
  do i=1 to counter by 2;
   sec_cat = trim(catt("&amp;amp;sec_at", scan(sec_all, i, ','));
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 11:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-there-a-way-to-create-a-macro-variable-which-can-further-used/m-p/401290#M97351</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-05T11:39:05Z</dc:date>
    </item>
  </channel>
</rss>

