<?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: programming logic in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893738#M353071</link>
    <description>&lt;P&gt;When posting data make sure that&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;you post the data as working data step code&lt;/LI&gt;
&lt;LI&gt;and that all cases that exist in your real data are present at least once.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Idea to solve the problem:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;create a dataset containing all obs with "Adverse event"&lt;/LI&gt;
&lt;LI&gt;use that dataset to create another one having only those obs with aedis = "Yes"&lt;/LI&gt;
&lt;LI&gt;finally something like this:&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
  create table work.want as
    select * from work.adverse_events
     where subject not in (select subject from work.aedis)
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Code is, of course, untested. Using a single step with two dow-loops seems to be the better approach, as less iteration are required.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2023 10:48:54 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2023-09-12T10:48:54Z</dc:date>
    <item>
      <title>programming logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893555#M353022</link>
      <description>&lt;P&gt;There is no Adverse Event reported on Adverse Event Form where&lt;BR /&gt;AE.AEDIS = YES&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If atleast in any of the logline aedis=yes then it should not fetch in the output. Can anyone suggest a solution?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 13:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893555#M353022</guid>
      <dc:creator>Chandanat17</dc:creator>
      <dc:date>2023-09-11T13:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: programming logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893556#M353023</link>
      <description>&lt;P&gt;Please post data in usable form so that we have something to work with. Also show what you expect as output.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 14:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893556#M353023</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-09-11T14:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: programming logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893557#M353024</link>
      <description>&lt;P&gt;logic:&amp;nbsp;DS.DSDECOD = Adverse Event&lt;BR /&gt;AND&lt;BR /&gt;There is no Adverse Event reported on Adverse Event Form where&lt;BR /&gt;AE.AEDIS = YES&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;subject&amp;nbsp; &amp;nbsp; aedis&amp;nbsp; &amp;nbsp;dsdecod&lt;BR /&gt;1001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Yes&amp;nbsp; &amp;nbsp; &amp;nbsp; Adverse event&lt;BR /&gt;1001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blank&amp;nbsp; &amp;nbsp; Adverse event&lt;/P&gt;&lt;P&gt;1001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Adverse event&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Like above example, a subject has 3 loglines and in one of the logline it is present as aedis=yes , so this subject should not come in output.&lt;BR /&gt;code for this ??&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 14:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893557#M353024</guid>
      <dc:creator>Chandanat17</dc:creator>
      <dc:date>2023-09-11T14:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: programming logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893558#M353025</link>
      <description>&lt;P&gt;In the absence of sample data in the form of a working data step, the code below is untested.&lt;/P&gt;
&lt;P&gt;Assuming your data is in a dataset named HAVE and the data is sorted by subject, then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  merge have (where=(dsdecod='Adverse event') in=unwanted)
        have ;
  by subject;
  if unwanted=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 14:40:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893558#M353025</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2023-09-11T14:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: programming logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893583#M353027</link>
      <description>&lt;P&gt;Is this one of those questions where ALL of the values for single person has to be considered?&lt;/P&gt;
&lt;P&gt;If so you need to state such before getting into any coding. SAS data steps where any such code is likely to be used processes data sets one observation at a time. If something has to consider more than one observation for a 'correct' answer than that criteria has to be explicitly stated and described properly to implement.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 15:35:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893583#M353027</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-09-11T15:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: programming logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893738#M353071</link>
      <description>&lt;P&gt;When posting data make sure that&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;you post the data as working data step code&lt;/LI&gt;
&lt;LI&gt;and that all cases that exist in your real data are present at least once.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Idea to solve the problem:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;create a dataset containing all obs with "Adverse event"&lt;/LI&gt;
&lt;LI&gt;use that dataset to create another one having only those obs with aedis = "Yes"&lt;/LI&gt;
&lt;LI&gt;finally something like this:&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
  create table work.want as
    select * from work.adverse_events
     where subject not in (select subject from work.aedis)
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Code is, of course, untested. Using a single step with two dow-loops seems to be the better approach, as less iteration are required.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 10:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/programming-logic/m-p/893738#M353071</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-09-12T10:48:54Z</dc:date>
    </item>
  </channel>
</rss>

