<?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 concatenate values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/concatenate-values/m-p/475244#M122195</link>
    <description>&lt;PRE&gt;if aesdth='Y' then do; aereas1="D";flag=1;end ;
if aeshosp='Y' then do; aereas2="RPH";flag=1;end;
if aesdisab='Y' then do; aereas3="PSDI";flag=1;end;
if aeslife='Y' then do;aereas4="LT";flag=1;end;
if aesmie='Y' then do; aereas5="OMI";flag=1;end;
if aescong='Y' then do; aereas6="CA";flag=1;end;
if astserfl='Y' then do;aereas7="AST";flag=1;end;
if (aesdth='Y' or aeshosp='Y' or aesdisab='Y' or aeslife='Y' or aesmie='Y'or aescong='Y' or astserfl='Y') then
newvar=catx(',', aereas1,aereas2) 
 
 &lt;/PRE&gt;&lt;P&gt;i have to concatenate the values where its 'y' .any suggestions how to do this.with above code its not working.&lt;/P&gt;&lt;P&gt;for example if aesmie=y then newvar will have value of 'OMI' if 3 variavles (aesmie,aescong,astserfl)are 'Y' then (newvar=OMI,CA,AST)concatenate that variable values&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jul 2018 16:39:35 GMT</pubDate>
    <dc:creator>paddyb</dc:creator>
    <dc:date>2018-07-03T16:39:35Z</dc:date>
    <item>
      <title>concatenate values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-values/m-p/475244#M122195</link>
      <description>&lt;PRE&gt;if aesdth='Y' then do; aereas1="D";flag=1;end ;
if aeshosp='Y' then do; aereas2="RPH";flag=1;end;
if aesdisab='Y' then do; aereas3="PSDI";flag=1;end;
if aeslife='Y' then do;aereas4="LT";flag=1;end;
if aesmie='Y' then do; aereas5="OMI";flag=1;end;
if aescong='Y' then do; aereas6="CA";flag=1;end;
if astserfl='Y' then do;aereas7="AST";flag=1;end;
if (aesdth='Y' or aeshosp='Y' or aesdisab='Y' or aeslife='Y' or aesmie='Y'or aescong='Y' or astserfl='Y') then
newvar=catx(',', aereas1,aereas2) 
 
 &lt;/PRE&gt;&lt;P&gt;i have to concatenate the values where its 'y' .any suggestions how to do this.with above code its not working.&lt;/P&gt;&lt;P&gt;for example if aesmie=y then newvar will have value of 'OMI' if 3 variavles (aesmie,aescong,astserfl)are 'Y' then (newvar=OMI,CA,AST)concatenate that variable values&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 16:39:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-values/m-p/475244#M122195</guid>
      <dc:creator>paddyb</dc:creator>
      <dc:date>2018-07-03T16:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-values/m-p/475245#M122196</link>
      <description>&lt;P&gt;Can you please provide the community with an INPUT sample data, an OUTPUT(wanted) sample data and your requirement/logic?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 16:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-values/m-p/475245#M122196</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-03T16:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-values/m-p/475254#M122199</link>
      <description>&lt;P&gt;If I understand the question correctly, the formula should be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;.........&amp;nbsp;&amp;nbsp; then newvar = catx(',', of aereas1-aereas7);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 16:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-values/m-p/475254#M122199</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-03T16:44:50Z</dc:date>
    </item>
  </channel>
</rss>

