<?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: Assign value to all records based upon some criteria in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184361#M46882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We interview all Salmonella cases about their exposure history in the 7 day period before their illness. We have over 3 years worth of exposure data to look at. If a cluster of 2 or more cases is identified within&amp;nbsp; 45 day period, there is a greater chance that there is a common exposure of interest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 45-day period is based on "Today's Date"... whatever day you run the program. If within that 45-day range a cluster of 2 or more cases (serotype/PFGE match) are found, a new dataset is output with that cluster sorted at the top and assigned case=1. If a record has the same serotype/PFGE match, but falls outside of the 45 day window, they will not be considered a part of the cluster. This is a standard way of looking at things as we are trying to identify common exposures during outbreaks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A new dataset is generated for each and every cluster identified. So one week, there may be one cluster identified with one dataset output. In another week, there may be 10 clusters identified...so 10 datasets will be output with one cluster sorted at the top in each dataset. Whichever cluster is at the top will be assigned a value of 1 for the variable case. All other records in the dataset will need to be assigned a value of case=. or case=0. Missing will need to be those records that have the same serotype as the case but different PFGE. Zeros will be those with a different serotype than the case. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each cluster will be evaluated separately. We will compare exposures for those cases to all of the other records in the dataset (excluding those records that have the same serotype as the case but different PFGE). Everything else in the dataset, which is a moving target of records over the last 3 years, will be considered the "control" group. I hope this explains a bit better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The part we are need help with is the assignment of missing and zeros to the variable case. Everything else has been completed. We need to figure out a way to do this based upon what the serotype and PFGE is for the case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Apr 2014 14:11:38 GMT</pubDate>
    <dc:creator>gdaymte</dc:creator>
    <dc:date>2014-04-18T14:11:38Z</dc:date>
    <item>
      <title>Assign value to all records based upon some criteria</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184358#M46879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are working on a case-case comparison project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we are wanting to do is identify clusters of Salmonella cases that have the same serotype (variable=SeroSite) and PFGE pattern (variable=PfgePrimary) within a 45 day period (variable=DtSpec) and compare those to all other records in the dataset (excluding those that match by serotype). For those cases that do match by serotype and PFGE, we are assigning a value of 1 to the variable case. If a record matches by serotype but not pattern, we would like to assign the variable case to missing. If a record does not match by serotype or PFGE pattern, we would like to assign case a value of 0. Our problem is that the cluster will always be changing, so we can't code around specific values. We would like to automate it as much as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is what the data looks like so far...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;SeroSite&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;PfgePrimary&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;DtSpec&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Case&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Enteritidis&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;XBA.0004&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/01/2014&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enteritidis&lt;/TD&gt;&lt;TD&gt;XBA.0004&lt;/TD&gt;&lt;TD&gt;01/18/2014&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enteritidis&lt;/TD&gt;&lt;TD&gt;XBA.0004&lt;/TD&gt;&lt;TD&gt;02/28/2014&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Typhimurium&lt;/TD&gt;&lt;TD&gt;XBA.1314&lt;/TD&gt;&lt;TD&gt;02/04/2014&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enteritidis&lt;/TD&gt;&lt;TD&gt;XBA.0005&lt;/TD&gt;&lt;TD&gt;03/01/2014&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cerro&lt;/TD&gt;&lt;TD&gt;XBA.2327&lt;/TD&gt;&lt;TD&gt;02/15/2014&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Typhimurium&lt;/TD&gt;&lt;TD&gt;XBA.1212&lt;/TD&gt;&lt;TD&gt;02/01/2014&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what we need it to look like... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="width: 100%; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;SeroSite&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;PfgePrimary&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;DtSpec&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Case&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Enteritidis&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;XBA.0004&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/01/2014&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enteritidis&lt;/TD&gt;&lt;TD&gt;XBA.0004&lt;/TD&gt;&lt;TD&gt;01/18/2014&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enteritidis&lt;/TD&gt;&lt;TD&gt;XBA.0004&lt;/TD&gt;&lt;TD&gt;02/28/2014&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Typhimurium&lt;/TD&gt;&lt;TD&gt;XBA.1314&lt;/TD&gt;&lt;TD&gt;02/04/2014&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enteritidis&lt;/TD&gt;&lt;TD&gt;XBA.0005&lt;/TD&gt;&lt;TD&gt;03/01/2014&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cerro&lt;/TD&gt;&lt;TD&gt;XBA.2327&lt;/TD&gt;&lt;TD&gt;02/15/2014&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Typhimurium&lt;/TD&gt;&lt;TD&gt;XBA.1212&lt;/TD&gt;&lt;TD&gt;02/01/2014&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are unsure of how we can go about doing this...We could assign a value to case if we were able to somehow assign a dummy serotype variable (CaseSero) to all records in the dataset the value of the SeroSite variable where case=1. Any suggestions would be helpful. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 20:08:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184358#M46879</guid>
      <dc:creator>gdaymte</dc:creator>
      <dc:date>2014-04-17T20:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value to all records based upon some criteria</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184359#M46880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need to manually assign the range on the DTSpec to determine the 45 day period or do you look at the date range recorded for the PfgePrimary and then determine the 45 day period?&lt;/P&gt;&lt;P&gt;Do you do this for each Serotype/PfgePrimary pair or only select ones?&lt;BR /&gt;What do you do if the PfgePrimary has a range of dates greater than 45 days? And likely a few more questions about order of rules and desired output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think a more detailed step-by-step description of a manual process will help us answer your question for automation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 22:33:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184359#M46880</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-04-17T22:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value to all records based upon some criteria</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184360#M46881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Our problem is that the cluster will always be changing,&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;I don't understand.&amp;nbsp; if you already have 1 in CASE , you can fix these cluster&amp;nbsp; ? i.e. give it a initial value when case=1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 10:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184360#M46881</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-04-18T10:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value to all records based upon some criteria</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184361#M46882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We interview all Salmonella cases about their exposure history in the 7 day period before their illness. We have over 3 years worth of exposure data to look at. If a cluster of 2 or more cases is identified within&amp;nbsp; 45 day period, there is a greater chance that there is a common exposure of interest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 45-day period is based on "Today's Date"... whatever day you run the program. If within that 45-day range a cluster of 2 or more cases (serotype/PFGE match) are found, a new dataset is output with that cluster sorted at the top and assigned case=1. If a record has the same serotype/PFGE match, but falls outside of the 45 day window, they will not be considered a part of the cluster. This is a standard way of looking at things as we are trying to identify common exposures during outbreaks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A new dataset is generated for each and every cluster identified. So one week, there may be one cluster identified with one dataset output. In another week, there may be 10 clusters identified...so 10 datasets will be output with one cluster sorted at the top in each dataset. Whichever cluster is at the top will be assigned a value of 1 for the variable case. All other records in the dataset will need to be assigned a value of case=. or case=0. Missing will need to be those records that have the same serotype as the case but different PFGE. Zeros will be those with a different serotype than the case. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each cluster will be evaluated separately. We will compare exposures for those cases to all of the other records in the dataset (excluding those records that have the same serotype as the case but different PFGE). Everything else in the dataset, which is a moving target of records over the last 3 years, will be considered the "control" group. I hope this explains a bit better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The part we are need help with is the assignment of missing and zeros to the variable case. Everything else has been completed. We need to figure out a way to do this based upon what the serotype and PFGE is for the case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 14:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184361#M46882</guid>
      <dc:creator>gdaymte</dc:creator>
      <dc:date>2014-04-18T14:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value to all records based upon some criteria</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184362#M46883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still not get you, since I am not in pharmaceutical field. You said there is a 45 days window, but in your original data ,date is over that window for the category marked 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data have;
infile cards truncover expandtabs;
input serosite : $20. pfgeprimary : $20. dtspec : $20. case;
cards;
Enteritidis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XBA.0004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;01/01/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1
Enteritidis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XBA.0004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;01/18/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1
Enteritidis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XBA.0004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;02/28/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1
Typhimurium&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XBA.1314&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;02/04/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Enteritidis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XBA.0005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;03/01/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cerro&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XBA.2327&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;02/15/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Typhimurium&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XBA.1212&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;02/01/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
;
run;
proc sql;
create table want as
 select a.serosite,a.pfgeprimary,a.dtspec, case 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when a.serosite eq b.serosite and a.pfgeprimary eq b.pfgeprimary then 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when a.serosite ne b.serosite and a.pfgeprimary ne b.pfgeprimary then 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when a.serosite eq b.serosite and a.pfgeprimary ne b.pfgeprimary then .
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else 99999
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end as case
&amp;nbsp; from have as a,(select distinct serosite,pfgeprimary from have as h where h.case eq 1) as b ;
&amp;nbsp; quit;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 14:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184362#M46883</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-04-18T14:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value to all records based upon some criteria</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184363#M46884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I just made a typo...The 3rd Enteritidis should say 01/28/2014. The year on the 4th Enteritidis should be 2013.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 16:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assign-value-to-all-records-based-upon-some-criteria/m-p/184363#M46884</guid>
      <dc:creator>gdaymte</dc:creator>
      <dc:date>2014-04-18T16:37:24Z</dc:date>
    </item>
  </channel>
</rss>

