<?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: Create mutually exclusive categories in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-mutually-exclusive-categories/m-p/933987#M367319</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you list REGIMEN_1 all categories in your want example?&amp;nbsp; If, yes, use IF and ELSE IF statements instead of just 'IF' in your code. This should resolve the given example.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2024 21:21:30 GMT</pubDate>
    <dc:creator>A_Kh</dc:creator>
    <dc:date>2024-06-27T21:21:30Z</dc:date>
    <item>
      <title>Create mutually exclusive categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-mutually-exclusive-categories/m-p/933984#M367316</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have identified regimens and want to categorize into different categories:&lt;/P&gt;&lt;P&gt;1) Chemo with cisplatin&lt;/P&gt;&lt;P&gt;2)Chemo without Cisplatin&lt;/P&gt;&lt;P&gt;3)Immunotherapy&amp;nbsp;&lt;/P&gt;&lt;P&gt;4)Targeted therapy&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data want;&lt;/P&gt;&lt;P&gt;infile ID$ REGIMEN$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;Cisplatin+Gemcitabine&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp;Carboplatin+Cisplatin+Gemcitabine+Pembrolizumab&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp;Pembrolizumab&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;Fluorouracil+Mitomycin&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;Enfortumab&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID 1 and ID 2 have cisplatin in them and should be categorized under "chemo with cisplain". ID 3 - immunotherapy; ID-4:chemo without cisplatin; ID 5 -targeted therapy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using if..then statement for example&amp;nbsp; -&amp;nbsp;&lt;/P&gt;&lt;P&gt;if find(regimen_1,'cisplatin' ,'i') then cisplatin= "yes";&lt;/P&gt;&lt;P&gt;if find(regimen_1,'pembrolizumab' ,'i') then immuno = "yes"&lt;/P&gt;&lt;P&gt;In this case ID 2 is categorized as "Chemo with cisplatin" as well as "Immuno". I just want it under "Chemo with cisplatin"&lt;/P&gt;&lt;P&gt;OUTPUT DESIRED&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SSK_011523_0-1719522216849.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97947iD2E8C5F960773633/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SSK_011523_0-1719522216849.png" alt="SSK_011523_0-1719522216849.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 21:05:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-mutually-exclusive-categories/m-p/933984#M367316</guid>
      <dc:creator>SSK_011523</dc:creator>
      <dc:date>2024-06-27T21:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create mutually exclusive categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-mutually-exclusive-categories/m-p/933986#M367318</link>
      <description>&lt;P&gt;Instead of just IFs, use ELSE IFs:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if find(regimen_1,'cisplatin' ,'i') then cisplatin= "yes";
else if find(regimen_1,'pembrolizumab' ,'i') then immuno = "yes"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The order of statements in the ELSE IF chain will define precedence.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 21:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-mutually-exclusive-categories/m-p/933986#M367318</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-06-27T21:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create mutually exclusive categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-mutually-exclusive-categories/m-p/933987#M367319</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you list REGIMEN_1 all categories in your want example?&amp;nbsp; If, yes, use IF and ELSE IF statements instead of just 'IF' in your code. This should resolve the given example.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 21:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-mutually-exclusive-categories/m-p/933987#M367319</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2024-06-27T21:21:30Z</dc:date>
    </item>
  </channel>
</rss>

