<?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 How to replace value with variables name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342731#M78585</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;I wonder if some one can help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see below original chart:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 288pt;" border="0" width="384" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="6" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl63" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;A&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;B&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;C&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;D&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;001&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;002&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;003&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;004&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;005&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;006&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to replace all the (=2) values to the variables name.&lt;/P&gt;
&lt;P&gt;see what I want:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 288pt;" border="0" width="384" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="6" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;A&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;B&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;C&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;D&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;001&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;002&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;003&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;004&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;005&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;006&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then the final result will be:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD colspan="2" width="128" class="xl67" style="border-left: none; width: 96pt;"&gt;COMBINE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;001&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;B,E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;002&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;A,C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;003&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;B,D&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;004&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;005&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;C,E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;006&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;A,E&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2017 19:42:08 GMT</pubDate>
    <dc:creator>ursula</dc:creator>
    <dc:date>2017-03-20T19:42:08Z</dc:date>
    <item>
      <title>How to replace value with variables name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342731#M78585</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;I wonder if some one can help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see below original chart:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 288pt;" border="0" width="384" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="6" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl63" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;A&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;B&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;C&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;D&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;001&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;002&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;003&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;004&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;005&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;006&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to replace all the (=2) values to the variables name.&lt;/P&gt;
&lt;P&gt;see what I want:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 288pt;" border="0" width="384" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="6" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;A&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;B&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;C&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;D&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;001&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;002&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;003&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;D&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;004&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;005&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;006&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then the final result will be:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD colspan="2" width="128" class="xl67" style="border-left: none; width: 96pt;"&gt;COMBINE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;001&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;B,E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;002&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;A,C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;003&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;B,D&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;004&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;005&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;C,E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;006&lt;/TD&gt;
&lt;TD colspan="2" class="xl68" style="border-left: none;"&gt;A,E&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:42:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342731#M78585</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2017-03-20T19:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace value with variables name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342732#M78586</link>
      <description>&lt;P&gt;Do you only have 1/2's in your data set?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:32:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342732#M78586</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-20T19:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace value with variables name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342736#M78589</link>
      <description>&lt;P&gt;it's a good question.&lt;/P&gt;
&lt;P&gt;actually some others are 0 or 3, but I only need values that =2.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342736#M78589</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2017-03-20T19:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace value with variables name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342744#M78590</link>
      <description>&lt;P&gt;One way:&lt;/P&gt;
&lt;PRE&gt;data have;
   input ID A B C D E ;
   array x  A B C D E;
   length result $ 10;
   do i= 1 to dim(x);
      if x[i] = 2 then result= catx(',',result,vname(x[i]));
   end;
   drop i;
datalines;
001 1 2 1 3 2 
002 2 1 2 1 1 
003 1 2 1 2 1 
004 1 2 0 1 1 
005 1 1 2 1 2 
006 2 1 1 1 2 
run;
&lt;/PRE&gt;
&lt;P&gt;I didn't replace anything just accumulated the desired values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342744#M78590</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-20T19:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace value with variables name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342745#M78591</link>
      <description>&lt;P&gt;Use PROC TRANSPOSE to flip and filter your dataset and then a data step to collate the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have; 
input ID $	A $	B	 $C	 $ D	 $ E $;
cards;
001	1	2	1	3	2
002	2	1	2	1	1
003	1	2	1	2	1
004	1	2	0	1	1
005	1	1	2	1	2
006	2	1	1	1	2
;
run;


proc transpose data=have out=flipped (where=(col1='2')) ;
by id;
var a b c d e;
run;

data want;
set flipped;
by id;
retain string;
if first.id then string=_name_;
else string = catx(',', string, _name_);

if last.id then output;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342745#M78591</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-20T19:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace value with variables name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342752#M78593</link>
      <description>&lt;P&gt;or, if you need the intermediary array as well AND your variable names are really A thru E:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want (drop=i);
  set have;
  length combine $10;
  array iarray(5) a--e;
  array oarray(5) $ ca cb cc cd ce;
  do i=1 to dim(iarray);
    if iarray(i) eq '2' then oarray(i)=byte(i+64);
  end;
  combine=catx(',',of oarray(*));
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 20:05:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-replace-value-with-variables-name/m-p/342752#M78593</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-20T20:05:06Z</dc:date>
    </item>
  </channel>
</rss>

