<?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 replace an ID variable (convert from numeric into character) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333922#M75318</link>
    <description>&lt;P&gt;Hi, thank you so much for your answer! Best regards&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2017 20:15:04 GMT</pubDate>
    <dc:creator>mikiduta</dc:creator>
    <dc:date>2017-02-17T20:15:04Z</dc:date>
    <item>
      <title>how to replace an ID variable (convert from numeric into character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333916#M75315</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a file and its first variable is an ID variable that is numeric, when it should be character. If I convert it and rename it, the new variable is placed at the end of the file, which is cumbersome. I tried using "retain" to reorder the file, but somehow the ID variable remains at the end (not sure what I do wrong). Is there an easier way of doing this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks:)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333916#M75315</guid>
      <dc:creator>mikiduta</dc:creator>
      <dc:date>2017-02-17T20:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace an ID variable (convert from numeric into character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333921#M75317</link>
      <description>&lt;P&gt;To reorder the variables the retain statement has to come BEFORE the set statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333921#M75317</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-17T20:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace an ID variable (convert from numeric into character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333922#M75318</link>
      <description>&lt;P&gt;Hi, thank you so much for your answer! Best regards&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333922#M75318</guid>
      <dc:creator>mikiduta</dc:creator>
      <dc:date>2017-02-17T20:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace an ID variable (convert from numeric into character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333923#M75319</link>
      <description>&lt;P&gt;Use next skiltom code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;format id; &amp;nbsp; /* force ID to be 1st , you can add other variables in desired order*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set have(rename=(id=_id));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID = input(_id, best8.); &amp;nbsp; &amp;nbsp;/* adapt to length of ID */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333923#M75319</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-02-17T20:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace an ID variable (convert from numeric into character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333925#M75320</link>
      <description>&lt;P&gt;Thank you so much! Best regards!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-an-ID-variable-convert-from-numeric-into/m-p/333925#M75320</guid>
      <dc:creator>mikiduta</dc:creator>
      <dc:date>2017-02-17T20:16:50Z</dc:date>
    </item>
  </channel>
</rss>

