<?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: Concat Variable names in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142313#M11375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any document related to it. Please share.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Sep 2014 12:40:46 GMT</pubDate>
    <dc:creator>Aman4SAS</dc:creator>
    <dc:date>2014-09-12T12:40:46Z</dc:date>
    <item>
      <title>Concat Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142310#M11372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a data set like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input x y z;&lt;/P&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want a macro variable like x|y|z (concatenating the variable names)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible in sas by proc sql or anyhow?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 11:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142310#M11372</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-09-12T11:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142311#M11373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with proc sql:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;x=1;y=2;z=3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;select name into :allvars separated by '|' from sashelp.vcolumn&lt;BR /&gt;where libname='WORK' and memname='TEST';&lt;BR /&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 12:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142311#M11373</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2014-09-12T12:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142312#M11374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to concatenate the values of the variables into a new field?&amp;nbsp; Or create a SAS macro variable with the variable names?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the latter, try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Consolas; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;noprint&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; name &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;:MyVars separated by &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; &lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sashelp.vcolumn &lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; libname=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"WORK"&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; memname=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"TEST"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;quit&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; &amp;amp;myvars;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;If the former, then you can use one of the CAT functions (such as CATX) to create a new value in your DATA step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;newVal = &lt;/STRONG&gt;CATX(' ',x,y,z);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's not a macro var though.&amp;nbsp; If you need the macro variable you'll need to decide which particular record you want to represent, calculate the value, and you can use CALL SYMPUT to stuff it into a macro variable for use later in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 12:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142312#M11374</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2014-09-12T12:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142313#M11375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any document related to it. Please share.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 12:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Variable-names/m-p/142313#M11375</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-09-12T12:40:46Z</dc:date>
    </item>
  </channel>
</rss>

