<?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: Need help with coding the following in a precise manner in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790648#M40168</link>
    <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&lt;BR /&gt;I guess i got my solution. Want to still thank you to take out time and looking into my problem.&lt;BR /&gt;Regards&lt;BR /&gt;Bhawna</description>
    <pubDate>Tue, 18 Jan 2022 09:16:27 GMT</pubDate>
    <dc:creator>ratnaparakhee</dc:creator>
    <dc:date>2022-01-18T09:16:27Z</dc:date>
    <item>
      <title>Need help with coding the following in a precise manner</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790622#M40164</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have a list of values that i am checking in multiple fields. I have a hit if these values are present in any of the fields. Initially i coded it as below-&lt;/P&gt;&lt;P&gt;and ( a.dx1 in &amp;amp;dx.&lt;/P&gt;&lt;P&gt;or a.dx2 in &amp;amp;dx.&lt;BR /&gt;or a.dx3 in &amp;amp;dx.&lt;BR /&gt;or a.dx4 in &amp;amp;dx.&lt;BR /&gt;or a.dx5 in &amp;amp;dx.)&lt;/P&gt;&lt;P&gt;The issue was that i got result in which there were values other than my list in the fields DX2 to DX5 as they are separated by 'OR'&lt;/P&gt;&lt;P&gt;To fix this issue is re programmed as below-&lt;/P&gt;&lt;P&gt;and a.dx1 in &amp;amp;dx.&lt;BR /&gt;and (a.dx2 = ' ' or a.dx2 in &amp;amp;dx.)&lt;BR /&gt;and (a.dx3 = ' ' or a.dx3 in &amp;amp;dx.)&lt;BR /&gt;and (a.dx4 = ' ' or a.dx4 in &amp;amp;dx.)&lt;BR /&gt;and (a.dx5 = ' ' or a.dx5 in &amp;amp;dx.)&lt;/P&gt;&lt;P&gt;Now my issue is solved but i do not like the way it is programmed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way to write this? I mean a function or something that will ensure that either dx2-dx5 is a blank/missing value and if its not missing then its a value that i have listed in the macro variable &amp;amp;dx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: As per business logic DX1 is always populated but dx2-dx5 can be blank also and its acceptable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bhawna R.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 06:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790622#M40164</guid>
      <dc:creator>ratnaparakhee</dc:creator>
      <dc:date>2022-01-18T06:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with coding the following in a precise manner</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790634#M40165</link>
      <description>&lt;P&gt;If you could share some input data, and exemplify the different scenarios it would be easier to see possible solutions.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 07:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790634#M40165</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-01-18T07:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with coding the following in a precise manner</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790644#M40166</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409870"&gt;@ratnaparakhee&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could add the missing value to the list &lt;FONT face="courier new,courier"&gt;&amp;amp;dx&lt;/FONT&gt; (if that is acceptable wherever &lt;FONT face="courier new,courier"&gt;&amp;amp;dx&lt;/FONT&gt; is used) and then write&lt;/P&gt;
&lt;PRE&gt;and a.dx1 in &amp;amp;dx &amp;amp; a.dx1 ne ' '
and a.dx2 in &amp;amp;dx
and a.dx3 in &amp;amp;dx
and a.dx4 in &amp;amp;dx
and a.dx5 in &amp;amp;dx&lt;/PRE&gt;
&lt;P&gt;Other than that I don't see much potential for simplification.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 09:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790644#M40166</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-01-18T09:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with coding the following in a precise manner</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790647#M40167</link>
      <description>Hi @FreelanceReinhard&lt;BR /&gt;&lt;BR /&gt;That thought did cross my mind but wasn't sure if adding a missing value to the list was a good idea or not.&lt;BR /&gt;Now that you mentioned it, I will give it a try and compare if the output differs from my original one.&lt;BR /&gt;Thanks for your help.</description>
      <pubDate>Tue, 18 Jan 2022 09:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790647#M40167</guid>
      <dc:creator>ratnaparakhee</dc:creator>
      <dc:date>2022-01-18T09:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with coding the following in a precise manner</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790648#M40168</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&lt;BR /&gt;I guess i got my solution. Want to still thank you to take out time and looking into my problem.&lt;BR /&gt;Regards&lt;BR /&gt;Bhawna</description>
      <pubDate>Tue, 18 Jan 2022 09:16:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-coding-the-following-in-a-precise-manner/m-p/790648#M40168</guid>
      <dc:creator>ratnaparakhee</dc:creator>
      <dc:date>2022-01-18T09:16:27Z</dc:date>
    </item>
  </channel>
</rss>

