<?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: Formatting value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366816#M87279</link>
    <description>&lt;P&gt;Your explanations were not clear. Always show&amp;nbsp;: this is what I have &amp;amp; this is what&amp;nbsp;I want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
  length RESULT $1000;
  RESULT= "(C1='y' and b1='N' and a1='y')" ;
  RESULT=transtrn(RESULT,'C1=','CUSTOMER1=');
  RESULT=transtrn(RESULT,'b1=','CUSTOMERB=');
  putlog RESULT=;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RESULT=(CUSTOMER1='y' and CUSTOMERB='N' and a1='y')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't forget&amp;nbsp;to make your string longer.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2017 01:41:12 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2017-06-14T01:41:12Z</dc:date>
    <item>
      <title>Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366325#M87133</link>
      <description>Hello, please help me in the below issue for formatting in sas&lt;BR /&gt;I have a file containing variable Result which has value of&lt;BR /&gt;(C1='y' and b1='N' and a1='y') like that&lt;BR /&gt;I want to replace a1,b1,c1 etc with text. Like customer1='y' and customerb ='n'</description>
      <pubDate>Mon, 12 Jun 2017 20:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366325#M87133</guid>
      <dc:creator>rgururaj1980</dc:creator>
      <dc:date>2017-06-12T20:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366327#M87134</link>
      <description>&lt;P&gt;Just to be clear, you have a character variable called Result which contains a string like "&lt;SPAN&gt;(C1='y' and b1='N' and a1='y')" ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 20:07:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366327#M87134</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-12T20:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366347#M87137</link>
      <description>Yes</description>
      <pubDate>Mon, 12 Jun 2017 21:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366347#M87137</guid>
      <dc:creator>rgururaj1980</dc:creator>
      <dc:date>2017-06-12T21:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366348#M87138</link>
      <description>I have lot of values like d1, e1 etc</description>
      <pubDate>Mon, 12 Jun 2017 21:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366348#M87138</guid>
      <dc:creator>rgururaj1980</dc:creator>
      <dc:date>2017-06-12T21:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366349#M87139</link>
      <description>&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi30/001-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/001-30.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This paper walks through how to recode variables using a format. It's well written and clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another standard way to recode is IF/THEN statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 21:48:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366349#M87139</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-12T21:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366396#M87156</link>
      <description>&lt;P&gt;C1 is your variable name, so you want to rename your variables.&lt;/P&gt;
&lt;P&gt;You'll need something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
  set HAVE(rename=(C1=CUSTOMER1 
                   B1=CUSTOMERB)
          );
  RESULT=(CUSTOMER1 ='Y' &amp;amp; CUSTOMERB='N' );
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 05:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366396#M87156</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-06-13T05:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366599#M87229</link>
      <description>Formula is my variable name and it contains "c1=yes,b1=no, z3=yes" . It has value like this . I want to change c1 b1 e1 with text</description>
      <pubDate>Tue, 13 Jun 2017 14:34:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366599#M87229</guid>
      <dc:creator>rgururaj1980</dc:creator>
      <dc:date>2017-06-13T14:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366602#M87231</link>
      <description>I have different values for different observation</description>
      <pubDate>Tue, 13 Jun 2017 14:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366602#M87231</guid>
      <dc:creator>rgururaj1980</dc:creator>
      <dc:date>2017-06-13T14:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366816#M87279</link>
      <description>&lt;P&gt;Your explanations were not clear. Always show&amp;nbsp;: this is what I have &amp;amp; this is what&amp;nbsp;I want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
  length RESULT $1000;
  RESULT= "(C1='y' and b1='N' and a1='y')" ;
  RESULT=transtrn(RESULT,'C1=','CUSTOMER1=');
  RESULT=transtrn(RESULT,'b1=','CUSTOMERB=');
  putlog RESULT=;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RESULT=(CUSTOMER1='y' and CUSTOMERB='N' and a1='y')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't forget&amp;nbsp;to make your string longer.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 01:41:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-value/m-p/366816#M87279</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-06-14T01:41:12Z</dc:date>
    </item>
  </channel>
</rss>

