<?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: When I change a character variable to numeric, it deletes the rest of the data set. HELLPP!!! in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480460#M71542</link>
    <description>&lt;P&gt;What does the log say?&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jul 2018 14:44:03 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-07-23T14:44:03Z</dc:date>
    <item>
      <title>When I change a character variable to numeric, it deletes the rest of the data set. HELLPP!!!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480451#M71540</link>
      <description>&lt;P&gt;So when I try to change one of my variables in a data set (397 observations), it deletes the entire data set. I am not sure what im doing wrong, but I am constantly running into the same problem. I made a copy of the original data set so I would not erase the original. Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data cat.pat93;&lt;BR /&gt;set cat.pat92;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data cat.pat93;&lt;BR /&gt;set cat.pat93;&lt;BR /&gt;fldVL_1_numeric=input(fldVL_1,best5.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc contents of cat.pat92&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="proc92.PNG" style="width: 264px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21932iD5F66E29651BB5C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="proc92.PNG" alt="proc92.PNG" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc contents of cat.pat93&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="proc93.PNG" style="width: 321px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21934iC0FEFE7E0F538D63/image-size/large?v=v2&amp;amp;px=999" role="button" title="proc93.PNG" alt="proc93.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 14:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480451#M71540</guid>
      <dc:creator>cathreid</dc:creator>
      <dc:date>2018-07-23T14:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: When I change a character variable to numeric, it deletes the rest of the data set. HELLPP!!!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480452#M71541</link>
      <description>&lt;P&gt;This would happen if your DATA step with the INPUT function omitted the SET statement (by mistake).&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 14:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480452#M71541</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-23T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: When I change a character variable to numeric, it deletes the rest of the data set. HELLPP!!!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480460#M71542</link>
      <description>&lt;P&gt;What does the log say?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 14:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480460#M71542</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-07-23T14:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: When I change a character variable to numeric, it deletes the rest of the data set. HELLPP!!!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480468#M71543</link>
      <description>&lt;P&gt;I suspect the error is in something else not here. Check your log thoroughly for notes or warnings.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I highly recommend against the coding style used below where you use the same name in the data and set statement. Once you make a mistake in a step it's hard to correct or test with this style, instead make sure the DATA and SET statements refer to unique data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data cat.pat93;&lt;BR /&gt;set cat.pat92;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;data cat.pat93;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;set cat.pat93;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;fldVL_1_numeric=input(fldVL_1,best5.);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 15:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480468#M71543</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-23T15:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: When I change a character variable to numeric, it deletes the rest of the data set. HELLPP!!!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480555#M71548</link>
      <description>&lt;P&gt;As can be seen in the output from proc contents,&amp;nbsp;&lt;SPAN&gt;fldVL_1 is already numeric, so the conversion makes no sense.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And POST THE LOG.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 17:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/When-I-change-a-character-variable-to-numeric-it-deletes-the/m-p/480555#M71548</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-23T17:48:22Z</dc:date>
    </item>
  </channel>
</rss>

