<?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 creating a 4-Way Venn Diagram in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91392#M19311</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The simplified version of the answer is that you have to define a macro and then call it.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro mymacro;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; *** put all of your code here;&lt;/P&gt;&lt;P&gt;%mend mymacro;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mymacro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error you are getting is saying that %IF / %THEN statements must be enclosed within a macro definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck ... can't really tell how close or far you are from your goal at this point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Dec 2012 18:45:56 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-12-05T18:45:56Z</dc:date>
    <item>
      <title>Need help creating a 4-Way Venn Diagram</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91391#M19310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched the internet and found this paper on creating a 4-way Venn in sas: &lt;A href="http://www2.sas.com/proceedings/forum2008/073-2008.pdf" title="http://www2.sas.com/proceedings/forum2008/073-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/073-2008.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is that I get stuck trying to get this to work.&amp;nbsp; Specifically, there are errors in the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************************** 4 Way Venn Diagram *********************************/&lt;/P&gt;&lt;P&gt;%IF &amp;amp;venn_diagram = 4 %THEN&lt;/P&gt;&lt;P&gt;%DO;&lt;/P&gt;&lt;P&gt;/* Counting the overlap */&lt;/P&gt;&lt;P&gt;data data_reformatted2;&lt;/P&gt;&lt;P&gt;set data_reformatted;&lt;/P&gt;&lt;P&gt;if A ne . and B ne . and C ne . and D ne . then do;&lt;/P&gt;&lt;P&gt;if A &amp;amp;cutoff and B &amp;amp;cutoff and C &amp;amp;cutoff and D &amp;amp;cutoff then ABCD = 1;&lt;/P&gt;&lt;P&gt;else ABCD = 0;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if A ne . and B ne . and C ne . then do;&lt;/P&gt;&lt;P&gt;if A &amp;amp;cutoff and B &amp;amp;cutoff and C &amp;amp;cutoff and ABCD ne 1 then ABC = 1;&lt;/P&gt;&lt;P&gt;else ABC = 0;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;section where it says that the %IF is in open code and won't work.&amp;nbsp; There are other problems later on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to all this and am not sure if the code in this paper can be cut-and-pasted to have it work and then work in reverse to change it for my own needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone assist me with some working code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It could even be simple were I have the numbers for each group already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There has got to be a simple way to do this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish Google Charts supported 4-way Venns...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GST&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 18:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91391#M19310</guid>
      <dc:creator>gstullo</dc:creator>
      <dc:date>2012-12-05T18:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help creating a 4-Way Venn Diagram</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91392#M19311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The simplified version of the answer is that you have to define a macro and then call it.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro mymacro;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; *** put all of your code here;&lt;/P&gt;&lt;P&gt;%mend mymacro;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mymacro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error you are getting is saying that %IF / %THEN statements must be enclosed within a macro definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck ... can't really tell how close or far you are from your goal at this point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 18:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91392#M19311</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-12-05T18:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help creating a 4-Way Venn Diagram</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91393#M19312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you might need to wrap this code in a macro, but I haven't looked at it thoroughly.&lt;/P&gt;&lt;P&gt;You could always contact the author of the paper for the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also need to have the same variable names a Kriss does&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro venn_four();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...all the code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 18:46:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91393#M19312</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-05T18:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help creating a 4-Way Venn Diagram</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91394#M19313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello GST,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly, thank you to Astounding and Reeza for trying to help out. GST have you got this working now? Also the full source code is located here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.krissharris.co.uk//Venn%20Diagrams.sas" title="http://www.krissharris.co.uk//Venn%20Diagrams.sas"&gt;http://www.krissharris.co.uk//Venn%20Diagrams.sas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have got SAS 9.3, I have updated the Venn Diagram Macro, and the plots look much better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kriss&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 16:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-creating-a-4-Way-Venn-Diagram/m-p/91394#M19313</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2013-03-13T16:10:56Z</dc:date>
    </item>
  </channel>
</rss>

