<?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: do statement or transpose? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102893#M28797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Besides Hash() approach, Proc SQL is also handy for your problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct a.* from have a ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; (select MBR_SYS_ID, FST_SRVC_DT from have where Prov_tin_maj_restudy=1) b&lt;/P&gt;&lt;P&gt;&amp;nbsp; where a.MBR_SYS_ID=b.MBR_SYS_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp; and b.FST_SRVC_DT &amp;lt; a.FST_SRVC_DT &amp;lt; b.FST_SRVC_DT+90&lt;/P&gt;&lt;P&gt;and sum( nat_perf, nat_cath, nat_pet, nat_ct) &amp;gt;=1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update: Sub-query is not needed since the condition is straightforward.&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct a.* from have a , &lt;/P&gt;&lt;P&gt;&amp;nbsp; have(where= (Prov_tin_maj_restudy=1))b&lt;/P&gt;&lt;P&gt;&amp;nbsp; where a.MBR_SYS_ID=b.MBR_SYS_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp; and b.FST_SRVC_DT &amp;lt; a.FST_SRVC_DT &amp;lt; b.FST_SRVC_DT+90&lt;/P&gt;&lt;P&gt;and sum( a.nat_perf, a.nat_cath, a.nat_pet, a.nat_ct) &amp;gt;=1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Aug 2013 18:57:25 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2013-08-06T18:57:25Z</dc:date>
    <item>
      <title>do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102886#M28790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am racking my brain trying to figure out how to get this right. I have tried proc transpose to put the various fst srvc dts in one row thinking that would help. But it did not. Then tried do statements but that has not worked. Any suggestions? I need to look at whenever there is a maj restudy, look at the date of the restudy and then look for a proc done after that restudy but it has to be between fst_srvc_dt+1 and fst_srvc_dt+90. Anotherwords, taking the first example, the restudy was done 4/30/2012. So I begin counting on 5/1/2012 and go no more than 90days out. That means the procedure on 6/4/2012 qualifies and it was a perf. I know how to so a statement to say if all these conditions are met, create a column called sub_table and if the condition is the perf I will call it MAJPERF. If the condition is a cath it will be MAJCATH, pet is MAJPET and ct is MAJCT. I hope I am making sense. I put the do code I tried but that did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Have:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="598"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="90"&gt;MBR_SYS_ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="99"&gt;FST_SRVC_DT&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="130"&gt;Prov_tin_maj_restudy&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="72"&gt;PROV_TIN&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="55"&gt;nat_perf&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="58"&gt;nat_cath&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="51"&gt;nat_pet&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="43"&gt;nat_ct&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: medium none;"&gt;1111&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;4/22/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: medium none;"&gt;1111&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;4/30/2012&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: medium none;"&gt;1111&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;6/4/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;593733939&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: medium none;"&gt;1111&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;6/25/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;593733939&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: medium none;"&gt;2222&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;6/22/2012&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: medium none;"&gt;2222&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;7/26/2012&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: medium none;"&gt;2222&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;8/28/2012&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;591726273&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: medium none;"&gt;2222&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;8/28/2012&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: medium none;"&gt;2222&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;9/4/2012&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: medium none;"&gt;2222&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;10/8/2012&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl70" height="17" style="border-top: medium none;"&gt;3333&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;7/30/2012&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl70" height="17" style="border-top: medium none;"&gt;3333&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;10/10/2012&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl72" height="17" style="border-top: medium none;"&gt;4444&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-left: medium none; border-top: medium none;"&gt;2/26/2012&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt;262157500&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl72" height="17" style="border-top: medium none;"&gt;4444&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-left: medium none; border-top: medium none;"&gt;2/27/2012&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl72" height="17" style="border-top: medium none;"&gt;4444&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-left: medium none; border-top: medium none;"&gt;2/28/2012&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl72" height="17" style="border-top: medium none;"&gt;4444&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-left: medium none; border-top: medium none;"&gt;5/18/2012&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt;590724459&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl72" height="17" style="border-top: medium none;"&gt;4444&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-left: medium none; border-top: medium none;"&gt;5/18/2012&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Need:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="660"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="90"&gt;MBR_SYS_ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="99"&gt;FST_SRVC_DT&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="130"&gt;Prov_tin_maj_restudy&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="70"&gt;PROV_TIN&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="55"&gt;nat_perf&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="58"&gt;nat_cath&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="51"&gt;nat_pet&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="43"&gt;nat_ct&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="64"&gt;sub_table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: medium none;"&gt;1111&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;6/4/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;593733939&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD&gt;MAJPERF&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: medium none;"&gt;2222&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;10/8/2012&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD&gt;MAJCATH&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl70" height="17" style="border-top: medium none;"&gt;3333&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;10/10/2012&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt;593415206&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD&gt;MAJPERF&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl72" height="17" style="border-top: medium none;"&gt;4444&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-left: medium none; border-top: medium none;"&gt;5/18/2012&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt;590724459&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl72" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD&gt;MAJCATH&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; maj_restudyA;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; maj_restudy nobs=last_obs;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; mbr_sys_id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; prov_tin_pci=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp; and prov_tin_maj_restudy = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; and fst_srvc_dt&amp;lt;=&amp;amp;enddt3-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;90&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp; wb = fst_srvc_dt + &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp; we = fst_srvc_dt + &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;90&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; pt = _N_ + &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; last_obs;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; cardiac.maj_restudy(keep= mbr_sys_id fst_srvc_dt nat_cath nat_ct nat_perf nat_pet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rename=(mbr_sys_id=mem fst_srvc_dt=dt))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point=pt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; dt &amp;gt;= wb and dt&amp;lt;=we and nat_cath = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; end as &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'MAJCATH'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;else&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; dt&amp;gt;=wb and dt&amp;lt;=we and nat_ct = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; end as &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'MAJCT'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;else&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; dt&amp;gt;=wb and dt&amp;lt;=we and nat_perf = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; end as &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'MAJPERF'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;else&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; dt&amp;gt;=wb and dt&amp;lt;=we and nat_pet = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; end as &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'MAJPET'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; we =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; we=fst_srvc_dt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; wb=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; wb=fst_srvc_dt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; we=wb&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; wb we mem dt pt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 14:07:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102886#M28790</guid>
      <dc:creator>tmcrouse</dc:creator>
      <dc:date>2013-08-06T14:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102887#M28791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _N_=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare hash h(dataset: "maj_restudy(where=(prov_tin_maj_restudy=1) rename=(fst_srvc_dt=major_study_start_date))");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineKey('mbr_sys_id');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineData(major_study_start_date);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineDone();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set maj_restudy;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc=h.find();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if rc=0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (1 LE fst_srvc_dt - major_study_start_date LE 90) and (nat_perf=1 or nat_cath=1 or nat_pet=1 or nat_ct=1) then do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if nat_perf=1 then sub_table="MAJPERF";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if nat_cath=1&amp;nbsp;&amp;nbsp;&amp;nbsp; then subtable="MAJCATH";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if nat_pet=1 then subtable="MAJPET";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if nat_pet=1 then subtable="MAJCT";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop rc major_study_start_date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an alternative based on your data example. However, if there are multiple Major Studies in any given MBR_SYS_ID, it won't work as is since the hash table defined this way only supports 1 occurence of the key. You may need to play with formats a little, I assumed your dates were naturally numeric values with a date format and not strings as well as I assumed that your indicator columns were numeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, it uses the lookup power of hash tables to obtain the start date of the unique major study for each MBR_SYS_ID (if there is one) and puts it in the data vector to allow computation. This would give you multiple rows for a given MBR_SYS_ID if there had been more than one of the 4 columns with 1 for the same MBR_SYS_ID within the following 90 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vince&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. When you say "but it did not work". It is best to either give an example of the bad output or a copy of your error log for us to help. For instance, I can't tell from your post if it was a logic or syntax error and reading through someone elses' thoughts/code looking for both is harder. Especially when I don't know your data structure variable types and formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A quick glance tells me that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; we =&lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; we=fst_srvc_dt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; wb=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;' '&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; wb=fst_srvc_dt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; we=wb&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;is basically outputing every single row that didn't have a major study in addition to what should've achieved your desired result in the big outer do;end; block&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 14:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102887#M28791</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-08-06T14:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102888#M28792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe there is more than 1 occurence per member for the restudies. I tried this but it gave me this error:&lt;/P&gt;&lt;P&gt;It looks like it does not understand the h.definedone:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;455&amp;nbsp; data maj_restudy2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;456&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _N_=1 then do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;457&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare hash h(datasets: "maj_restudy(where=(prov_tin_maj_restudy=1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;457! rename=(fst_srvc_dt=major_study_start_date))");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR: Unknown argument tag datasets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;458&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineKey('mbr_sys_id');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;459&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineData(major_study_start_date);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;460&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineDone;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 559&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&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; 76&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR 559-185: Invalid object attribute reference h.defineDone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR 22-322: Syntax error, expecting one of the following: (, +, =.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;461&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;462&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set maj_restudy;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;463&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc=h.find();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR: DATA STEP Component Object failure.&amp;nbsp; Aborted during the COMPILATION phase.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;NOTE: DATA statement used (Total process time):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;464&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if rc=0 then do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;465&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (1 LE fst_srvc_dt - major_study_start_date LE 90) and (nat_perf=1 or nat_cath=1 or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;465! nat_pet=1 or nat_ct=1) then do&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;466&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if nat_perf=1 then sub_table="MAJPERF";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;467&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if nat_cath=1&amp;nbsp;&amp;nbsp;&amp;nbsp; then sub_table="MAJCATH";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;468&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if nat_pet=1 then sub_table="MAJPET";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;469&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if nat_ct=1 then sub_table="MAJCT";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;470&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;471&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;472&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;473&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop rc major_study_start_date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;474&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 15:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102888#M28792</guid>
      <dc:creator>tmcrouse</dc:creator>
      <dc:date>2013-08-06T15:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102889#M28793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my bad, it's &amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(datasets:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;updating original post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 16:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102889#M28793</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-08-06T16:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102890#M28794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It still does not like that h.definedone; statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 16:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102890#M28794</guid>
      <dc:creator>tmcrouse</dc:creator>
      <dc:date>2013-08-06T16:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102891#M28795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sigh, sorry, updated my reply again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;defineDone is a method of the hash table and SAS requires () syntax at the end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;h.defineDone();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always omit it by mistake when I don't have data to test my syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this can be of any additionnal diagnosis of your original post code. Since you are not keeping a new variable&amp;nbsp; for your MBR_SYS_ID each time you find a major study case, your do pt=_N_+1 ... end; statement loops on all studies content that is sorted below your current mbr_sys_id so if some studies overlap, each major study will also cause other studies' procedures that occured within the appropriate timeframe to be output including even the record for a new study if it has an associated procedure applied that day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 16:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102891#M28795</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-08-06T16:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102892#M28796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Awesome. That worked like a charm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 17:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102892#M28796</guid>
      <dc:creator>tmcrouse</dc:creator>
      <dc:date>2013-08-06T17:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: do statement or transpose?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102893#M28797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Besides Hash() approach, Proc SQL is also handy for your problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct a.* from have a ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; (select MBR_SYS_ID, FST_SRVC_DT from have where Prov_tin_maj_restudy=1) b&lt;/P&gt;&lt;P&gt;&amp;nbsp; where a.MBR_SYS_ID=b.MBR_SYS_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp; and b.FST_SRVC_DT &amp;lt; a.FST_SRVC_DT &amp;lt; b.FST_SRVC_DT+90&lt;/P&gt;&lt;P&gt;and sum( nat_perf, nat_cath, nat_pet, nat_ct) &amp;gt;=1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update: Sub-query is not needed since the condition is straightforward.&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct a.* from have a , &lt;/P&gt;&lt;P&gt;&amp;nbsp; have(where= (Prov_tin_maj_restudy=1))b&lt;/P&gt;&lt;P&gt;&amp;nbsp; where a.MBR_SYS_ID=b.MBR_SYS_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp; and b.FST_SRVC_DT &amp;lt; a.FST_SRVC_DT &amp;lt; b.FST_SRVC_DT+90&lt;/P&gt;&lt;P&gt;and sum( a.nat_perf, a.nat_cath, a.nat_pet, a.nat_ct) &amp;gt;=1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 18:57:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/do-statement-or-transpose/m-p/102893#M28797</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-08-06T18:57:25Z</dc:date>
    </item>
  </channel>
</rss>

