<?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: Recode a variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541398#M149463</link>
    <description>&lt;P&gt;Thank you all for your help .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 13:35:16 GMT</pubDate>
    <dc:creator>LoPez_Diaz</dc:creator>
    <dc:date>2019-03-08T13:35:16Z</dc:date>
    <item>
      <title>Recode a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541361#M149453</link>
      <description>&lt;P&gt;Hello ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set of multiple dates , and for each data a maturity&amp;nbsp;&lt;/P&gt;&lt;P&gt;the maturities in the data are coded in numbers , for example&amp;nbsp; 2 means 52 weaks , 3 means 2 years , 4 means 5 years ....&lt;/P&gt;&lt;P&gt;I want to recode this variable so that for each number I get the text instead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 12:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541361#M149453</guid>
      <dc:creator>LoPez_Diaz</dc:creator>
      <dc:date>2019-03-08T12:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Recode a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541367#M149454</link>
      <description>&lt;P&gt;Use a format:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n1c16dxnndwfzyn14o1kb8a4312m.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n1c16dxnndwfzyn14o1kb8a4312m.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;That is exactly what they are for.&lt;/P&gt;
&lt;PRE&gt;proc format;
  value tmp
    2="52 weeks"
    3="2 years";
run;

data want;
  set have;
  format var1 var2 tmp.;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Mar 2019 12:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541367#M149454</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-03-08T12:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Recode a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541383#M149455</link>
      <description>&lt;P&gt;Hello and thank you for your fast reply&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to sas , and i'm discovering this functions.&lt;/P&gt;&lt;P&gt;so when I used your code , I got the following error :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;28 6="2Y";&lt;BR /&gt;_&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clue ?&amp;nbsp;&lt;BR /&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 13:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541383#M149455</guid>
      <dc:creator>LoPez_Diaz</dc:creator>
      <dc:date>2019-03-08T13:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Recode a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541384#M149456</link>
      <description>&lt;P&gt;When encountering problems, ALWAYS post the log of the&amp;nbsp;&lt;EM&gt;whole&lt;/EM&gt; step. The cause of the ERROR is further up.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 13:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541384#M149456</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-08T13:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Recode a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541385#M149457</link>
      <description>&lt;P&gt;And use the {i} button for posting logs, to conserve content and formatting.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 13:05:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541385#M149457</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-08T13:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Recode a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541388#M149458</link>
      <description>&lt;P&gt;The error tells you the issue, that statement is used incorrectly.&amp;nbsp; So its likely something before that has gone wrong.&amp;nbsp; As you haven't shown the full log however there is no way I can tell.&amp;nbsp; Refer to the code I presented and see what is different with your code, and then post the log here, all relevant log output.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 13:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541388#M149458</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-03-08T13:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Recode a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541398#M149463</link>
      <description>&lt;P&gt;Thank you all for your help .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 13:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recode-a-variable/m-p/541398#M149463</guid>
      <dc:creator>LoPez_Diaz</dc:creator>
      <dc:date>2019-03-08T13:35:16Z</dc:date>
    </item>
  </channel>
</rss>

