<?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 count and merge in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245225#M45731</link>
    <description>&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a sample of MyData which include three data sets, first is the crash data includes single obesrvation of each crashe info., second &lt;SPAN&gt;is the&amp;nbsp;&lt;/SPAN&gt;vehicle data includes vehicels info. that involved in a crash, third &lt;SPAN&gt;is the&amp;nbsp;&lt;/SPAN&gt;participant info. &amp;nbsp;who&amp;nbsp;&lt;SPAN&gt;involved in a crash,&lt;/SPAN&gt; as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data acc;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Severity $ InjurMajor Deaths InjMinor BranchId;&lt;BR /&gt;&lt;SPAN&gt;datalines &lt;/SPAN&gt;;&lt;BR /&gt;8505804 36412 Damage 0 0 0 31&lt;BR /&gt;8581794 36412 Deaths 0 2 0 32&lt;BR /&gt;8530886 36412 Damage 0 0 0 34&lt;BR /&gt;8536144 38802 Damage 0 0 0 32&lt;BR /&gt;8528435 38802 Damage 0 0 0 31&lt;BR /&gt;9324143 38802 Damage 0 0 0 34&lt;BR /&gt;8525667 38802 Deaths 0 2 0 33&lt;BR /&gt;9344281 40400 Damage 0 0 0 34&lt;BR /&gt;9357307 40400 Deaths 0 2 0 31&lt;BR /&gt;8503111 40400 Damage 0 0 0 33&lt;BR /&gt;8538023 32675 Deaths 1 34&lt;BR /&gt;8595057 32675 Damage 0 0 0 32&lt;BR /&gt;8733084 33281 Deaths 3 1 0 31&lt;BR /&gt;8643633 33281 Damage 0 0 0 34&lt;BR /&gt;8449397 33281 Damage 0 0 0 32&lt;BR /&gt;8743224 38323 Damage 0 0 0 32&lt;BR /&gt;8517348 38323 Damage 0 0 0 33&lt;BR /&gt;9345729 38323 Damage 0 0 0 34&lt;BR /&gt;8544720 38323 Deaths 0 1 0 31&lt;BR /&gt;9325908 40503 Damage 0 0 0 31&lt;BR /&gt;9336147 40503 Damage 0 0 0 34&lt;BR /&gt;9352576 40503 Serious injuries 1 0 0 33&lt;BR /&gt;9352537 40663 Damage 0 0 0 33&lt;BR /&gt;9359019 40663 Damage 0 0 0 34&lt;BR /&gt;9353437 40663 Minor injuries 0 0 1 31&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data veh;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Percentage BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 100 31&lt;BR /&gt;8505804 36412 0 31&lt;BR /&gt;8530886 36412 100 34&lt;BR /&gt;8530886 36412 0 34&lt;BR /&gt;8581794 36412 100 32&lt;BR /&gt;8525667 38802 100 33&lt;BR /&gt;8528435 38802 0 31&lt;BR /&gt;8528435 38802 100 31&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;9324143 38802 100 34&lt;BR /&gt;9324143 38802 0 34&lt;BR /&gt;8503111 40400 100 33&lt;BR /&gt;8503111 40400 0 33&lt;BR /&gt;9344281 40400 100 34&lt;BR /&gt;9344281 40400 0 34&lt;BR /&gt;9357307 40400 0 31&lt;BR /&gt;9357307 40400 100 31&lt;BR /&gt;8538023 32675 0 34&lt;BR /&gt;8538023 32675 100 34&lt;BR /&gt;8595057 32675 0 32&lt;BR /&gt;8595057 32675 100 32&lt;BR /&gt;8449397 33281 0 32&lt;BR /&gt;8449397 33281 100 32&lt;BR /&gt;8643633 33281 100 34&lt;BR /&gt;8643633 33281 0 34&lt;BR /&gt;8733084 33281 100 31&lt;BR /&gt;8517348 38323 100 33&lt;BR /&gt;8517348 38323 0 33&lt;BR /&gt;8544720 38323 100 31&lt;BR /&gt;8743224 38323 0 32&lt;BR /&gt;9345729 38323 0 34&lt;BR /&gt;9345729 38323 100 34&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 100 31&lt;BR /&gt;9336147 40503 100 34&lt;BR /&gt;9336147 40503 0 34&lt;BR /&gt;9352576 40503 75 33&lt;BR /&gt;9352576 40503 25 33&lt;BR /&gt;9352537 40663 100 33&lt;BR /&gt;9352537 40663 0 33&lt;BR /&gt;9353437 40663 0 31&lt;BR /&gt;9353437 40663 100 31&lt;BR /&gt;9359019 40663 100 34&lt;BR /&gt;9359019 40663 0 34&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data par;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Age PartyType $ HealthStatus $ BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8530886 36412 0 Driver intact 34&lt;BR /&gt;8581794 36412 0 Driver intact 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8525667 38802 0 Driver Death in hospital 33&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;8525667 38802 0 Passenger Death in hospital 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9357307 40400 24 Driver Death at the site 31&lt;BR /&gt;9357307 40400 39 Driver intact 31&lt;BR /&gt;9357307 40400 16 Passenger Death at the site 31&lt;BR /&gt;8538023 32675 0 Driver Other 34&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8538023 32675 0 Runaway driver Death in hospital 34&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8733084 33281 35 Driver Death at the site 31&lt;BR /&gt;8733084 33281 30 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8544720 38323 54 Driver Death at the site 31&lt;BR /&gt;8544720 38323 0 Driver Other 31&lt;BR /&gt;8743224 38323 0 Driver intact 32&lt;BR /&gt;9345729 38323 0 Driver intact 34&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9352576 40503 0 Driver Taken to hospital 33&lt;BR /&gt;9352576 40503 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9353437 40663 0 Driver Treated on-site 31&lt;BR /&gt;9353437 40663 0 Driver intact 31&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I want is to have one observation for each crash includes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kroki Key_ID BranchId Severity InjNo DeathsNo VehNo ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where all (Acc) variables will be included&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Veh) only who&amp;nbsp;has (100 of Percentage)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Par) only main driver&lt;BR /&gt;VehNo = total number of vehicles involved in a crash (1: single, 2:multiple, 3+: morethan2)&lt;BR /&gt;InjNo = total number of injuries&lt;BR /&gt;DeathsNo = total number of deaths&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help or suggestion and thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2016 16:47:14 GMT</pubDate>
    <dc:creator>samnan</dc:creator>
    <dc:date>2016-01-21T16:47:14Z</dc:date>
    <item>
      <title>count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245225#M45731</link>
      <description>&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a sample of MyData which include three data sets, first is the crash data includes single obesrvation of each crashe info., second &lt;SPAN&gt;is the&amp;nbsp;&lt;/SPAN&gt;vehicle data includes vehicels info. that involved in a crash, third &lt;SPAN&gt;is the&amp;nbsp;&lt;/SPAN&gt;participant info. &amp;nbsp;who&amp;nbsp;&lt;SPAN&gt;involved in a crash,&lt;/SPAN&gt; as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data acc;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Severity $ InjurMajor Deaths InjMinor BranchId;&lt;BR /&gt;&lt;SPAN&gt;datalines &lt;/SPAN&gt;;&lt;BR /&gt;8505804 36412 Damage 0 0 0 31&lt;BR /&gt;8581794 36412 Deaths 0 2 0 32&lt;BR /&gt;8530886 36412 Damage 0 0 0 34&lt;BR /&gt;8536144 38802 Damage 0 0 0 32&lt;BR /&gt;8528435 38802 Damage 0 0 0 31&lt;BR /&gt;9324143 38802 Damage 0 0 0 34&lt;BR /&gt;8525667 38802 Deaths 0 2 0 33&lt;BR /&gt;9344281 40400 Damage 0 0 0 34&lt;BR /&gt;9357307 40400 Deaths 0 2 0 31&lt;BR /&gt;8503111 40400 Damage 0 0 0 33&lt;BR /&gt;8538023 32675 Deaths 1 34&lt;BR /&gt;8595057 32675 Damage 0 0 0 32&lt;BR /&gt;8733084 33281 Deaths 3 1 0 31&lt;BR /&gt;8643633 33281 Damage 0 0 0 34&lt;BR /&gt;8449397 33281 Damage 0 0 0 32&lt;BR /&gt;8743224 38323 Damage 0 0 0 32&lt;BR /&gt;8517348 38323 Damage 0 0 0 33&lt;BR /&gt;9345729 38323 Damage 0 0 0 34&lt;BR /&gt;8544720 38323 Deaths 0 1 0 31&lt;BR /&gt;9325908 40503 Damage 0 0 0 31&lt;BR /&gt;9336147 40503 Damage 0 0 0 34&lt;BR /&gt;9352576 40503 Serious injuries 1 0 0 33&lt;BR /&gt;9352537 40663 Damage 0 0 0 33&lt;BR /&gt;9359019 40663 Damage 0 0 0 34&lt;BR /&gt;9353437 40663 Minor injuries 0 0 1 31&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data veh;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Percentage BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 100 31&lt;BR /&gt;8505804 36412 0 31&lt;BR /&gt;8530886 36412 100 34&lt;BR /&gt;8530886 36412 0 34&lt;BR /&gt;8581794 36412 100 32&lt;BR /&gt;8525667 38802 100 33&lt;BR /&gt;8528435 38802 0 31&lt;BR /&gt;8528435 38802 100 31&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;9324143 38802 100 34&lt;BR /&gt;9324143 38802 0 34&lt;BR /&gt;8503111 40400 100 33&lt;BR /&gt;8503111 40400 0 33&lt;BR /&gt;9344281 40400 100 34&lt;BR /&gt;9344281 40400 0 34&lt;BR /&gt;9357307 40400 0 31&lt;BR /&gt;9357307 40400 100 31&lt;BR /&gt;8538023 32675 0 34&lt;BR /&gt;8538023 32675 100 34&lt;BR /&gt;8595057 32675 0 32&lt;BR /&gt;8595057 32675 100 32&lt;BR /&gt;8449397 33281 0 32&lt;BR /&gt;8449397 33281 100 32&lt;BR /&gt;8643633 33281 100 34&lt;BR /&gt;8643633 33281 0 34&lt;BR /&gt;8733084 33281 100 31&lt;BR /&gt;8517348 38323 100 33&lt;BR /&gt;8517348 38323 0 33&lt;BR /&gt;8544720 38323 100 31&lt;BR /&gt;8743224 38323 0 32&lt;BR /&gt;9345729 38323 0 34&lt;BR /&gt;9345729 38323 100 34&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 100 31&lt;BR /&gt;9336147 40503 100 34&lt;BR /&gt;9336147 40503 0 34&lt;BR /&gt;9352576 40503 75 33&lt;BR /&gt;9352576 40503 25 33&lt;BR /&gt;9352537 40663 100 33&lt;BR /&gt;9352537 40663 0 33&lt;BR /&gt;9353437 40663 0 31&lt;BR /&gt;9353437 40663 100 31&lt;BR /&gt;9359019 40663 100 34&lt;BR /&gt;9359019 40663 0 34&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data par;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Age PartyType $ HealthStatus $ BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8530886 36412 0 Driver intact 34&lt;BR /&gt;8581794 36412 0 Driver intact 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8525667 38802 0 Driver Death in hospital 33&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;8525667 38802 0 Passenger Death in hospital 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9357307 40400 24 Driver Death at the site 31&lt;BR /&gt;9357307 40400 39 Driver intact 31&lt;BR /&gt;9357307 40400 16 Passenger Death at the site 31&lt;BR /&gt;8538023 32675 0 Driver Other 34&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8538023 32675 0 Runaway driver Death in hospital 34&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8733084 33281 35 Driver Death at the site 31&lt;BR /&gt;8733084 33281 30 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8544720 38323 54 Driver Death at the site 31&lt;BR /&gt;8544720 38323 0 Driver Other 31&lt;BR /&gt;8743224 38323 0 Driver intact 32&lt;BR /&gt;9345729 38323 0 Driver intact 34&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9352576 40503 0 Driver Taken to hospital 33&lt;BR /&gt;9352576 40503 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9353437 40663 0 Driver Treated on-site 31&lt;BR /&gt;9353437 40663 0 Driver intact 31&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I want is to have one observation for each crash includes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kroki Key_ID BranchId Severity InjNo DeathsNo VehNo ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where all (Acc) variables will be included&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Veh) only who&amp;nbsp;has (100 of Percentage)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Par) only main driver&lt;BR /&gt;VehNo = total number of vehicles involved in a crash (1: single, 2:multiple, 3+: morethan2)&lt;BR /&gt;InjNo = total number of injuries&lt;BR /&gt;DeathsNo = total number of deaths&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help or suggestion and thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 16:47:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245225#M45731</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-01-21T16:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245238#M45738</link>
      <description>&lt;P&gt;Could you please show what the output would look like for one or two values of &amp;nbsp;key_id&amp;nbsp;such as 36412?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your PAR data set code isn't quite correct. With space delimited none of the values for BRANCHID are correct when the HealthStatus is more than one word. There is also&amp;nbsp;the same&amp;nbsp;issue with what looks like "Runaway driver" for Partytype. And the character variables will need to have a declared length long enough to hold the full text.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 17:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245238#M45738</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-21T17:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245240#M45739</link>
      <description>&lt;P&gt;I made some assumptions but I think this is close:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data acc;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Severity $ InjurMajor Deaths InjMinor BranchId;&lt;BR /&gt;datalines ;&lt;BR /&gt;8505804 36412 Damage 0 0 0 31&lt;BR /&gt;8581794 36412 Deaths 0 2 0 32&lt;BR /&gt;8530886 36412 Damage 0 0 0 34&lt;BR /&gt;8536144 38802 Damage 0 0 0 32&lt;BR /&gt;8528435 38802 Damage 0 0 0 31&lt;BR /&gt;9324143 38802 Damage 0 0 0 34&lt;BR /&gt;8525667 38802 Deaths 0 2 0 33&lt;BR /&gt;9344281 40400 Damage 0 0 0 34&lt;BR /&gt;9357307 40400 Deaths 0 2 0 31&lt;BR /&gt;8503111 40400 Damage 0 0 0 33&lt;BR /&gt;8538023 32675 Deaths 1 34&lt;BR /&gt;8595057 32675 Damage 0 0 0 32&lt;BR /&gt;8733084 33281 Deaths 3 1 0 31&lt;BR /&gt;8643633 33281 Damage 0 0 0 34&lt;BR /&gt;8449397 33281 Damage 0 0 0 32&lt;BR /&gt;8743224 38323 Damage 0 0 0 32&lt;BR /&gt;8517348 38323 Damage 0 0 0 33&lt;BR /&gt;9345729 38323 Damage 0 0 0 34&lt;BR /&gt;8544720 38323 Deaths 0 1 0 31&lt;BR /&gt;9325908 40503 Damage 0 0 0 31&lt;BR /&gt;9336147 40503 Damage 0 0 0 34&lt;BR /&gt;9352576 40503 Serious injuries 1 0 0 33&lt;BR /&gt;9352537 40663 Damage 0 0 0 33&lt;BR /&gt;9359019 40663 Damage 0 0 0 34&lt;BR /&gt;9353437 40663 Minor injuries 0 0 1 31&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;proc sort data=acc;by key_id kroki;&lt;/P&gt;
&lt;P&gt;data acc_prep;&lt;BR /&gt;set acc;&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;DeathsNo+deaths;&lt;BR /&gt;if first.key_id then DeathsNo = deaths;&lt;BR /&gt;InjNo=sum(injurmajor,injminor);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data veh;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Percentage BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 100 31&lt;BR /&gt;8505804 36412 0 31&lt;BR /&gt;8530886 36412 100 34&lt;BR /&gt;8530886 36412 0 34&lt;BR /&gt;8581794 36412 100 32&lt;BR /&gt;8525667 38802 100 33&lt;BR /&gt;8528435 38802 0 31&lt;BR /&gt;8528435 38802 100 31&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;9324143 38802 100 34&lt;BR /&gt;9324143 38802 0 34&lt;BR /&gt;8503111 40400 100 33&lt;BR /&gt;8503111 40400 0 33&lt;BR /&gt;9344281 40400 100 34&lt;BR /&gt;9344281 40400 0 34&lt;BR /&gt;9357307 40400 0 31&lt;BR /&gt;9357307 40400 100 31&lt;BR /&gt;8538023 32675 0 34&lt;BR /&gt;8538023 32675 100 34&lt;BR /&gt;8595057 32675 0 32&lt;BR /&gt;8595057 32675 100 32&lt;BR /&gt;8449397 33281 0 32&lt;BR /&gt;8449397 33281 100 32&lt;BR /&gt;8643633 33281 100 34&lt;BR /&gt;8643633 33281 0 34&lt;BR /&gt;8733084 33281 100 31&lt;BR /&gt;8517348 38323 100 33&lt;BR /&gt;8517348 38323 0 33&lt;BR /&gt;8544720 38323 100 31&lt;BR /&gt;8743224 38323 0 32&lt;BR /&gt;9345729 38323 0 34&lt;BR /&gt;9345729 38323 100 34&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 100 31&lt;BR /&gt;9336147 40503 100 34&lt;BR /&gt;9336147 40503 0 34&lt;BR /&gt;9352576 40503 75 33&lt;BR /&gt;9352576 40503 25 33&lt;BR /&gt;9352537 40663 100 33&lt;BR /&gt;9352537 40663 0 33&lt;BR /&gt;9353437 40663 0 31&lt;BR /&gt;9353437 40663 100 31&lt;BR /&gt;9359019 40663 100 34&lt;BR /&gt;9359019 40663 0 34&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;proc sort data=veh;by key_id kroki;&lt;/P&gt;
&lt;P&gt;data veh_prep;&lt;BR /&gt;set veh;&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;VehNo+1;&lt;BR /&gt;if first.key_id then vehno = 1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table max_veh as&lt;BR /&gt;select kroki,key_id,Percentage,max(vehno) as VehNo&lt;BR /&gt;from veh_prep&lt;BR /&gt;group by key_id&lt;BR /&gt;order by key_id,kroki;&lt;BR /&gt; &lt;BR /&gt;data par;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Age PartyType $ HealthStatus $ BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8530886 36412 0 Driver intact 34&lt;BR /&gt;8581794 36412 0 Driver intact 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8525667 38802 0 Driver Death in hospital 33&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;8525667 38802 0 Passenger Death in hospital 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9357307 40400 24 Driver Death at the site 31&lt;BR /&gt;9357307 40400 39 Driver intact 31&lt;BR /&gt;9357307 40400 16 Passenger Death at the site 31&lt;BR /&gt;8538023 32675 0 Driver Other 34&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8538023 32675 0 Runaway driver Death in hospital 34&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8733084 33281 35 Driver Death at the site 31&lt;BR /&gt;8733084 33281 30 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8544720 38323 54 Driver Death at the site 31&lt;BR /&gt;8544720 38323 0 Driver Other 31&lt;BR /&gt;8743224 38323 0 Driver intact 32&lt;BR /&gt;9345729 38323 0 Driver intact 34&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9352576 40503 0 Driver Taken to hospital 33&lt;BR /&gt;9352576 40503 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9353437 40663 0 Driver Treated on-site 31&lt;BR /&gt;9353437 40663 0 Driver intact 31&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;proc sort data=par;by key_id kroki;&lt;/P&gt;
&lt;P&gt;data want(keep=Kroki Key_ID BranchId Severity InjNo DeathsNo VehNo) ;&lt;BR /&gt;merge acc_prep(in=a)&lt;BR /&gt; max_veh(in=b where=(percentage=100))&lt;BR /&gt; par(in=c where=(PartyType='Driver'));&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;if a;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 17:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245240#M45739</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-01-21T17:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245245#M45741</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is an example of (&lt;SPAN&gt;36412&lt;/SPAN&gt;),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kroki &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key_ID &amp;nbsp; BranchId Severity InjurMajor Deaths InjMinor Percentage Age PartyType HealthStatus InjNo DeathsNo VehNo&lt;BR /&gt;8505804 &amp;nbsp;36412 &amp;nbsp; &amp;nbsp; 31 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Damage &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Driver &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;intact &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;8581794 &amp;nbsp;36412 &amp;nbsp; &amp;nbsp; 32 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Deaths &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Driver &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;intact &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;8530886 &amp;nbsp;36412 &amp;nbsp; &amp;nbsp; 34 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Damage &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Driver &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;intact &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as&amp;nbsp;you can see that there are (Acc) of (&lt;SPAN&gt;36412&lt;/SPAN&gt;) for each there is diff.&amp;nbsp;&lt;SPAN&gt;Kroki and&amp;nbsp;BranchId for (veh) and (prt) info. e.g. second one is (Deaths) the driver is (intact) and there are 2 deaths which is single vehicle crash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 18:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245245#M45741</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-01-21T18:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245264#M45748</link>
      <description>&lt;P&gt;Minor changes for the solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data acc;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Severity $ InjurMajor Deaths InjMinor BranchId;&lt;BR /&gt;datalines ;&lt;BR /&gt;8505804 36412 Damage 0 0 0 31&lt;BR /&gt;8581794 36412 Deaths 0 2 0 32&lt;BR /&gt;8530886 36412 Damage 0 0 0 34&lt;BR /&gt;8536144 38802 Damage 0 0 0 32&lt;BR /&gt;8528435 38802 Damage 0 0 0 31&lt;BR /&gt;9324143 38802 Damage 0 0 0 34&lt;BR /&gt;8525667 38802 Deaths 0 2 0 33&lt;BR /&gt;9344281 40400 Damage 0 0 0 34&lt;BR /&gt;9357307 40400 Deaths 0 2 0 31&lt;BR /&gt;8503111 40400 Damage 0 0 0 33&lt;BR /&gt;8538023 32675 Deaths 1 34&lt;BR /&gt;8595057 32675 Damage 0 0 0 32&lt;BR /&gt;8733084 33281 Deaths 3 1 0 31&lt;BR /&gt;8643633 33281 Damage 0 0 0 34&lt;BR /&gt;8449397 33281 Damage 0 0 0 32&lt;BR /&gt;8743224 38323 Damage 0 0 0 32&lt;BR /&gt;8517348 38323 Damage 0 0 0 33&lt;BR /&gt;9345729 38323 Damage 0 0 0 34&lt;BR /&gt;8544720 38323 Deaths 0 1 0 31&lt;BR /&gt;9325908 40503 Damage 0 0 0 31&lt;BR /&gt;9336147 40503 Damage 0 0 0 34&lt;BR /&gt;9352576 40503 Serious injuries 1 0 0 33&lt;BR /&gt;9352537 40663 Damage 0 0 0 33&lt;BR /&gt;9359019 40663 Damage 0 0 0 34&lt;BR /&gt;9353437 40663 Minor injuries 0 0 1 31&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;proc sort data=acc;by key_id kroki;&lt;/P&gt;
&lt;P&gt;data acc_prep;&lt;BR /&gt;set acc;&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;DeathsNo+deaths;&lt;BR /&gt;if first.key_id then DeathsNo = deaths;&lt;BR /&gt;InjNo=sum(injurmajor,injminor);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data veh;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Percentage BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 100 31&lt;BR /&gt;8505804 36412 0 31&lt;BR /&gt;8530886 36412 100 34&lt;BR /&gt;8530886 36412 0 34&lt;BR /&gt;8581794 36412 100 32&lt;BR /&gt;8525667 38802 100 33&lt;BR /&gt;8528435 38802 0 31&lt;BR /&gt;8528435 38802 100 31&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;8536144 38802 0 32&lt;BR /&gt;9324143 38802 100 34&lt;BR /&gt;9324143 38802 0 34&lt;BR /&gt;8503111 40400 100 33&lt;BR /&gt;8503111 40400 0 33&lt;BR /&gt;9344281 40400 100 34&lt;BR /&gt;9344281 40400 0 34&lt;BR /&gt;9357307 40400 0 31&lt;BR /&gt;9357307 40400 100 31&lt;BR /&gt;8538023 32675 0 34&lt;BR /&gt;8538023 32675 100 34&lt;BR /&gt;8595057 32675 0 32&lt;BR /&gt;8595057 32675 100 32&lt;BR /&gt;8449397 33281 0 32&lt;BR /&gt;8449397 33281 100 32&lt;BR /&gt;8643633 33281 100 34&lt;BR /&gt;8643633 33281 0 34&lt;BR /&gt;8733084 33281 100 31&lt;BR /&gt;8517348 38323 100 33&lt;BR /&gt;8517348 38323 0 33&lt;BR /&gt;8544720 38323 100 31&lt;BR /&gt;8743224 38323 0 32&lt;BR /&gt;9345729 38323 0 34&lt;BR /&gt;9345729 38323 100 34&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 0 31&lt;BR /&gt;9325908 40503 100 31&lt;BR /&gt;9336147 40503 100 34&lt;BR /&gt;9336147 40503 0 34&lt;BR /&gt;9352576 40503 75 33&lt;BR /&gt;9352576 40503 25 33&lt;BR /&gt;9352537 40663 100 33&lt;BR /&gt;9352537 40663 0 33&lt;BR /&gt;9353437 40663 0 31&lt;BR /&gt;9353437 40663 100 31&lt;BR /&gt;9359019 40663 100 34&lt;BR /&gt;9359019 40663 0 34&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;proc sort data=veh;by key_id kroki;&lt;/P&gt;
&lt;P&gt;data veh_prep;&lt;BR /&gt;set veh;&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;VehNo+1;&lt;BR /&gt;if first.kroki then vehno = 1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table max_veh as&lt;BR /&gt;select kroki,key_id,Percentage,max(VehNo) as VehNo&lt;BR /&gt;from veh_prep&lt;BR /&gt;group by kroki&lt;BR /&gt;order by key_id,kroki;&lt;BR /&gt; &lt;BR /&gt;data par;&lt;BR /&gt;infile datalines dlm = " ";&lt;BR /&gt;input Kroki Key_ID Age PartyType $ HealthStatus $ BranchId;&lt;BR /&gt;datalines;&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8505804 36412 0 Driver intact 31&lt;BR /&gt;8530886 36412 0 Driver intact 34&lt;BR /&gt;8581794 36412 0 Driver intact 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8581794 36412 0 Passenger Death in hospital 32&lt;BR /&gt;8525667 38802 0 Driver Death in hospital 33&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8528435 38802 0 Driver intact 31&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;8536144 38802 0 Driver intact 32&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;9324143 38802 0 Driver intact 34&lt;BR /&gt;8525667 38802 0 Passenger Death in hospital 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;8503111 40400 0 Driver intact 33&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9344281 40400 0 Driver intact 34&lt;BR /&gt;9357307 40400 24 Driver Death at the site 31&lt;BR /&gt;9357307 40400 39 Driver intact 31&lt;BR /&gt;9357307 40400 16 Passenger Death at the site 31&lt;BR /&gt;8538023 32675 0 Driver Other 34&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8595057 32675 0 Driver intact 32&lt;BR /&gt;8538023 32675 0 Runaway driver Death in hospital 34&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8449397 33281 0 Driver intact 32&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8643633 33281 0 Driver intact 34&lt;BR /&gt;8733084 33281 35 Driver Death at the site 31&lt;BR /&gt;8733084 33281 30 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8733084 33281 0 Passenger Taken to hospital 31&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8517348 38323 0 Driver intact 33&lt;BR /&gt;8544720 38323 54 Driver Death at the site 31&lt;BR /&gt;8544720 38323 0 Driver Other 31&lt;BR /&gt;8743224 38323 0 Driver intact 32&lt;BR /&gt;9345729 38323 0 Driver intact 34&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9325908 40503 0 Driver intact 31&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9336147 40503 0 Driver intact 34&lt;BR /&gt;9352576 40503 0 Driver Taken to hospital 33&lt;BR /&gt;9352576 40503 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9352537 40663 0 Driver intact 33&lt;BR /&gt;9353437 40663 0 Driver Treated on-site 31&lt;BR /&gt;9353437 40663 0 Driver intact 31&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;9359019 40663 0 Driver intact 34&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;proc sort data=par;by key_id kroki;&lt;/P&gt;
&lt;P&gt;data want(keep=Kroki Key_ID BranchId Severity InjNo DeathsNo VehNo) ;&lt;BR /&gt;merge acc_prep(in=a)&lt;BR /&gt; max_veh(in=b where=(percentage=100))&lt;BR /&gt; par(in=c where=(PartyType='Driver'));&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;if a;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table test as&lt;BR /&gt;select distinct *&lt;BR /&gt;from want&lt;BR /&gt;where key_id = 36412;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 18:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245264#M45748</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-01-21T18:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245274#M45751</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for&amp;nbsp;your valuable solution but the (want) data set has more obsevations than (acc) data set.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 19:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245274#M45751</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-01-21T19:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245280#M45752</link>
      <description>&lt;P&gt;I was picking up duplicate records where branchid is missing in the PAR dataset.&amp;nbsp; Changing the last two steps will fix the issue:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want(keep=Kroki Key_ID BranchId Severity InjNo DeathsNo VehNo) ;&lt;BR /&gt;merge acc_prep(in=a)&lt;BR /&gt; max_veh(in=b where=(percentage=100))&lt;BR /&gt; par(in=c drop= BranchId where=(PartyType='Driver'));&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;if a;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table final as&lt;BR /&gt;select distinct *&lt;BR /&gt;from want&lt;BR /&gt;order by key_id,kroki;*&lt;BR /&gt;where key_id = 36412;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 20:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245280#M45752</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-01-21T20:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245466#M45812</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why you used (keep), when i removed it, it gave diffeent result.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 15:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245466#M45812</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-01-22T15:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245467#M45813</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have the data set as excel where there is no missing of &lt;SPAN&gt;BRANCHID&lt;/SPAN&gt;, but i provided it here as (input) as a smple.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 15:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245467#M45813</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-01-22T15:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245472#M45814</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also, it seems wrong when i want to add (total number of par) as (vehno) code, as following:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data par_prep;&lt;BR /&gt;set par;&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;ParNo+1;&lt;BR /&gt;if first.kroki then par = 1;&lt;BR /&gt;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table max_par as&lt;BR /&gt;select kroki,key_id,PartyType,max(parno) as Parno&lt;BR /&gt;from par_prep&lt;BR /&gt;group by kroki&lt;BR /&gt;order by key_id,kroki;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then add it to merge as following :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want(keep=Kroki Key_ID BranchId Severity InjNo DeathsNo VehNo) ;&lt;BR /&gt;merge acc_prep(in=a)&lt;BR /&gt;max_veh(in=b where=(percentage=100))&lt;BR /&gt;max_par(in=b where=(PartyType='Driver'))&lt;BR /&gt;par(in=c drop= BranchId where=(PartyType='Driver'));&lt;BR /&gt;by key_id kroki;&lt;BR /&gt;if a;&lt;BR /&gt;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table final as&lt;BR /&gt;select distinct *&lt;BR /&gt;from want&lt;BR /&gt;order by key_id,kroki;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 15:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245472#M45814</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-01-22T15:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245509#M45825</link>
      <description>&lt;P&gt;I'm keeping the variables you said you wanted in your initial question.&amp;nbsp; The drop statement is in the set statement, dropping the column from the input, not the output.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 18:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245509#M45825</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-01-22T18:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245510#M45826</link>
      <description>&lt;P&gt;Give me an example of a record that this produces incorrectly and tell me what the desired output is.&amp;nbsp; Otherwise I have no idea what the problem is.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 18:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245510#M45826</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-01-22T18:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245531#M45834</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i appreciate your help and understanding,&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i mean is there are other variables like age needs to be added, also i need to add&amp;nbsp;(parno) like you did with (vehno)&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 20:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/245531#M45834</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-01-22T20:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247282#M46337</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please find an example attached;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data acc;&lt;BR /&gt;infile cards dlm=' ';&lt;BR /&gt;input Kroki Key_ID AccidentTime $ AccType $ AccPoint $ WLight $ Severity $ PublicDamage $ AccReasons $&lt;BR /&gt;AccidentAngle $ InjurMajor Deaths InjMinor BranchId;&lt;BR /&gt;cards;&lt;BR /&gt;8578421 34969 07/06/201301:58PM Bumpedamovingvehicle - - Damage - preoccupationonDriving - 0 0 0 34&lt;BR /&gt;8799176 34969 09/05/201308:21AM Bumpedamovingvehicle - - Damage - distance - 0 0 0 31&lt;BR /&gt;8732911 34969 05/04/201304:51AM Other Straight Clear Deaths Nothing speeding FacetoFace 1 1 0 32&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;data veh;&lt;BR /&gt;infile cards dlm=' ';&lt;BR /&gt;input Kroki Key_ID Percentage VehicleMake $ VehicleModel VehicleColor $ AccidentPlace $ BranchId;&lt;BR /&gt;cards;&lt;BR /&gt;8578421 34969 0 - 0 - Front 34&lt;BR /&gt;8578421 34969 100 - 0 - Other 34&lt;BR /&gt;8732911 34969 0 to 0 - Other 32&lt;BR /&gt;8732911 34969 100 mr 1992 - Other 32&lt;BR /&gt;8799176 34969 0 cr 2003 - Front 31&lt;BR /&gt;8799176 34969 100 - 0 - Front 31&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;data par;&lt;BR /&gt;infile cards dlm=' ';&lt;BR /&gt;input Kroki Key_ID Age PartyType $ HealthStatus $ Nationality $ BranchId;&lt;BR /&gt;cards;&lt;BR /&gt;8578421 34969 0 Driver intact Ym 34&lt;BR /&gt;8578421 34969 0 Driver Other SD 34&lt;BR /&gt;8732911 34969 0 Driver Takentohospital Ym 32&lt;BR /&gt;8732911 34969 0 Driver intact Pk 32&lt;BR /&gt;8732911 34969 0 Passenger Deathinhospital Pk 32&lt;BR /&gt;8799176 34969 0 Driver intact Other 31&lt;BR /&gt;8799176 34969 0 Driver intact SD 31&lt;BR /&gt;;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;infile cards dlm=' ';&lt;BR /&gt;input Kroki Key_ID AccidentTime $ AccType $ AccPoint $ WLight $ Severity $ PublicDamage $ AccReasons $&lt;BR /&gt;AccidentAngle $ InjurMajor Deaths InjMinor BranchId Percentage VehicleMake $ VehicleModel VehicleColor $&lt;BR /&gt;AccidentPlace $ Age PartyType $ HealthStatus $ Nationality $;&lt;BR /&gt;cards;&lt;BR /&gt;8578421 34969 07/06/201301:58PM Bumpedamovingvehicle - - Damage - preoccupationonDriving - 0 0 0 34 100 - 0 - Other 0 Driver Other SD&lt;BR /&gt;8799176 34969 09/05/201308:21AM Bumpedamovingvehicle - - Damage - distance - 0 0 0 31 100 - 0 - Front 0 Driver intact SD&lt;BR /&gt;8732911 34969 05/04/201304:51AM Other Straight Clear Deaths Nothing speeding FacetoFace 1 1 0 32 100 mr 1992 - Other 0 Driver intact Pk&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247282#M46337</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-02-01T19:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247287#M46341</link>
      <description>&lt;P&gt;In your original post you state:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what I want is to have one observation for each crash includes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kroki Key_ID BranchId Severity InjNo DeathsNo VehNo ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you have here is completely different.&amp;nbsp; You have to re-explain what it is you are trying to achieve.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247287#M46341</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-02-01T19:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247290#M46343</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you are right and i am sorry i did not iclude the VehNo, InjNo&amp;nbsp;and ParNo;&lt;/P&gt;&lt;P&gt;Here I&amp;nbsp;just include all other variables. from orignal post i got how to count (veh) and (Par) based on your code. but it was hard to merge with all variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I want (&amp;nbsp;is to have one observation for each crash includes) all vaiables in additon to the total number of &lt;SPAN&gt;(InjNo),&lt;/SPAN&gt;&amp;nbsp;(veh) and (Par).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the one observation should&amp;nbsp;includes all variables of&amp;nbsp;(acc) &lt;SPAN&gt;in &lt;/SPAN&gt;&lt;SPAN&gt;addition to (InjNo) which is the total&amp;nbsp;of number of (InjurMajor+InjMinor)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;all variables of (Veh) where percentage=100 &amp;nbsp; &amp;nbsp; in addition to (VehNo) which is the count of number of Veh in each crash,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;all variables of (Par) &amp;nbsp;where &amp;nbsp;PartyType='Driver'&amp;nbsp;in &lt;SPAN&gt;addition to (Par)&amp;nbsp;&lt;/SPAN&gt;which is the count of number Par&amp;nbsp;in each crash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so the output should look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data want;&lt;BR /&gt;infile cards dlm=' ';&lt;BR /&gt;input Kroki Key_ID AccidentTime $ AccType $ AccPoint $ WLight $ Severity $ PublicDamage $ AccReasons $&lt;BR /&gt;AccidentAngle $ InjurMajor Deaths InjMinor BranchId Percentage VehicleMake $ VehicleModel VehicleColor $&lt;BR /&gt;AccidentPlace $ Age PartyType $ HealthStatus $ Nationality $ InjNo VehNo ParNo;&lt;BR /&gt;cards;&lt;BR /&gt;8578421 34969 07/06/201301:58PM Bumpedamovingvehicle - - Damage - preoccupationonDriving - 0 0 0 34 100 - 0 - Other 0 Driver Other SD 0 2 2&lt;BR /&gt;8799176 34969 09/05/201308:21AM Bumpedamovingvehicle - - Damage - distance - 0 0 0 31 100 - 0 - Front 0 Driver intact SD 0 2 2&lt;BR /&gt;8732911 34969 05/04/201304:51AM Other Straight Clear Deaths Nothing speeding FacetoFace 1 1 0 32 100 mr 1992 - Other 0 Driver intact Pk 1 2 3&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:42:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247290#M46343</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-02-01T19:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247291#M46344</link>
      <description>&lt;P&gt;How are you selecting what record comes from the 'par' dataset.&amp;nbsp; You only have one nationality per kroki in your output, there are 2-3 in this dataset.&amp;nbsp; What is the criteria?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247291#M46344</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-02-01T19:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247294#M46345</link>
      <description>&lt;P&gt;daer&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that is very good question:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the criteria is only (PartyType)in Par dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me give an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for the 3rd obs of Acc there are two observtions (the 3rd and the 4th) from Veh (meaning VehNo=2) where the (4th&amp;nbsp;obs shows the percentage =100 which i am interested in) to find the info. from Par dataset, there are three observations (&lt;SPAN&gt;meaning ParNo=3&lt;/SPAN&gt;) (3rd, 4th and 5th) the (3rd obs is belong to the 3rd obs from Veh) so the (4th and 5th is belong to the 4th obs from Veh so i will choose the 4th from Par becaese the PartyType ='Driver').&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247294#M46345</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-02-01T19:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247298#M46346</link>
      <description>&lt;P&gt;Kroki 8799176 has two entries in the Par dataset, both of them are driver.&amp;nbsp; How do you select between the two?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 20:02:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247298#M46346</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-02-01T20:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: count and merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247304#M46350</link>
      <description>&lt;P&gt;I will choose the second one (7th obs) because it belong to the Percantage=100 from Veh dataset (6th obs),&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;usually the Percentage =(0,100) or (25,75) which is the blame percentage of crash, to distinguish who is guilty or innocent (from Veh dataset) where the crash involve single vehicle or multiple vehicles. (Par dataset) includes&amp;nbsp;the participants info. e.g PrtyType (Driver, Passenger, pedestrian ...).Therfore, when there are (&lt;SPAN&gt;two entries in the Par dataset, both of them are driver&lt;/SPAN&gt;) meaning there should be two vehicles involved in the crash. First one 0% and the second 100% in this example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 20:17:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/count-and-merge/m-p/247304#M46350</guid>
      <dc:creator>samnan</dc:creator>
      <dc:date>2016-02-01T20:17:34Z</dc:date>
    </item>
  </channel>
</rss>

