<?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: How to format an existing variable in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-format-an-existing-variable/m-p/9665#M730</link>
    <description>Putting the LENGTH statement before the SET statement should do it.</description>
    <pubDate>Wed, 08 Jun 2011 23:17:22 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2011-06-08T23:17:22Z</dc:date>
    <item>
      <title>How to format an existing variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-format-an-existing-variable/m-p/9664#M729</link>
      <description>I have a data set which has a few variables. One variable is called sex, which has a fixed length of 1, and formatted as $1. (i.e. M, or Female). This variable also has missing values. Now the question is to set the missing values as 'Other'. The following is what I did:&lt;BR /&gt;
&lt;BR /&gt;
DATA work.test;&lt;BR /&gt;
SET user.birth;&lt;BR /&gt;
LENGTH sex $5.;&lt;BR /&gt;
FORMAT sex $5.;&lt;BR /&gt;
IF age=' ' THEN  age='Other';&lt;BR /&gt;
&lt;BR /&gt;
Unfortunately, the missing values are set to be 'O'. How can I correct this without using any new variable names?</description>
      <pubDate>Wed, 08 Jun 2011 21:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-format-an-existing-variable/m-p/9664#M729</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-06-08T21:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to format an existing variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-format-an-existing-variable/m-p/9665#M730</link>
      <description>Putting the LENGTH statement before the SET statement should do it.</description>
      <pubDate>Wed, 08 Jun 2011 23:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-format-an-existing-variable/m-p/9665#M730</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-06-08T23:17:22Z</dc:date>
    </item>
  </channel>
</rss>

