<?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: creation of a numeric id value using two other variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204227#M267042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;A __default_attr="260198" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;'s method. This is also handy when creating a numeric combination of year and month:&lt;/P&gt;&lt;P&gt;wanted_var = year * 100 + month;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jun 2015 06:18:28 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2015-06-12T06:18:28Z</dc:date>
    <item>
      <title>creation of a numeric id value using two other variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204225#M267040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a 4-5 digit ID number (final_id) using something that looks like the following data: &lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;pat_id&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;state_id&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;county_idhave&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;county_idwant&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;final_id&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;003&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45003&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;54&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;054&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4054&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;798&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;798&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3798&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;369&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;369&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7369&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;98&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;651&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;651&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;98651&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;32&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;006&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;32006&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having two problems:&lt;/P&gt;&lt;P&gt;1. county_idwant needs to be three digits (state_id is to remain untouched). I need to either 1 zero or two zeroes to the front end to some of these values.&lt;/P&gt;&lt;P&gt;2. How do I merge state_id and county_idwant to get one final numeric value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated. Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 21:10:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204225#M267040</guid>
      <dc:creator>jcooper3</dc:creator>
      <dc:date>2015-06-11T21:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: creation of a numeric id value using two other variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204226#M267041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a datastep:&lt;/P&gt;&lt;P&gt;final_id = state_id*1000 + county_idhave;&lt;/P&gt;&lt;P&gt;You can display county_Idhave using a Z3.0 format and not create a new variable for most purposes. If the only purpose was the create the final_id then not needed as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is USA data I would strongly recommend looking into FIPS for place identification codes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 21:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204226#M267041</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-11T21:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: creation of a numeric id value using two other variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204227#M267042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;A __default_attr="260198" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;'s method. This is also handy when creating a numeric combination of year and month:&lt;/P&gt;&lt;P&gt;wanted_var = year * 100 + month;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 06:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204227#M267042</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-06-12T06:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: creation of a numeric id value using two other variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204228#M267043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! This was much simpler than I thought it would. Thanks again. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 19:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-a-numeric-id-value-using-two-other-variables/m-p/204228#M267043</guid>
      <dc:creator>jcooper3</dc:creator>
      <dc:date>2015-06-17T19:31:51Z</dc:date>
    </item>
  </channel>
</rss>

