<?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: Concatenate a symbol to a text string to create a macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488415#M127302</link>
    <description>&lt;P&gt;Is what you want as simple as this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let macvar = test%sysfunc(repeat(+, 3));&lt;BR /&gt;%put &amp;amp;=macvar;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The repeat function takes the first parameter and repeats it n times.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Aug 2018 02:58:02 GMT</pubDate>
    <dc:creator>LaurieF</dc:creator>
    <dc:date>2018-08-21T02:58:02Z</dc:date>
    <item>
      <title>Concatenate a symbol to a text string to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488408#M127301</link>
      <description>&lt;P&gt;Hi All&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a macro variable with value formed by concatenate&amp;nbsp;symbol ("+" ) to a text string.&lt;/P&gt;
&lt;P&gt;for example i need to create the following, attaching "+" based on iterations (4 times) and store it in a macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"test++++"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for all the help.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 01:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488408#M127301</guid>
      <dc:creator>SASSLICK001</dc:creator>
      <dc:date>2018-08-21T01:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate a symbol to a text string to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488415#M127302</link>
      <description>&lt;P&gt;Is what you want as simple as this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let macvar = test%sysfunc(repeat(+, 3));&lt;BR /&gt;%put &amp;amp;=macvar;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The repeat function takes the first parameter and repeats it n times.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 02:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488415#M127302</guid>
      <dc:creator>LaurieF</dc:creator>
      <dc:date>2018-08-21T02:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate a symbol to a text string to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488429#M127307</link>
      <description>&lt;P&gt;Here a coding example if you want to do it inside of a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	length combined $50.;
	base = "Hello";
	combined = cat(base,repeat("+",3));
	call symput("plusString",combined);
run;

%put &amp;amp;plusString;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Aug 2018 05:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488429#M127307</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2018-08-21T05:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate a symbol to a text string to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488433#M127310</link>
      <description>I like the approach of &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/28184"&gt;@Laurie&lt;/a&gt; F, Here is an alternate approach&lt;BR /&gt;&lt;BR /&gt;%let macvar = %sysfunc(cats(test,+++));&lt;BR /&gt;%put &amp;amp;=macvar;</description>
      <pubDate>Tue, 21 Aug 2018 05:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488433#M127310</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-08-21T05:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate a symbol to a text string to create a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488521#M127339</link>
      <description>&lt;P&gt;You mean this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro x;
%let x=test;
%do i=1 %to 3;
  %let x=&amp;amp;x+;
%end;

%put &amp;amp;x;
%mend;

%x &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Aug 2018 12:43:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-a-symbol-to-a-text-string-to-create-a-macro-variable/m-p/488521#M127339</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-08-21T12:43:21Z</dc:date>
    </item>
  </channel>
</rss>

