<?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: When did it become valid to use %IF in open code? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/475822#M122377</link>
    <description>&lt;P&gt;Good find!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Blog post here:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2018/07/05/if-then-else-sas-programs/" target="_self"&gt;Using %IF/%THEN%ELSE in SAS programs&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;for the nudge.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jul 2018 20:48:12 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2018-07-05T20:48:12Z</dc:date>
    <item>
      <title>When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474869#M122079</link>
      <description>&lt;P&gt;With SAS 9.4M5 I can now submit %IF statement in open code.&lt;/P&gt;
&lt;P&gt;When did this become valid?&amp;nbsp; I cannot find a reference any where.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that it requires that you use a %DO/%END block as the statement to run in the %THEN or %ELSE clause.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 74         * test macro if in open code;
 75         %if (1=1) %then %do;
 76         proc print data=sashelp.class; run;
 
 NOTE: There were 19 observations read from the data set SASHELP.CLASS.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.05 seconds
       cpu time            0.05 seconds
       
 
 77         %end;
 78         %else %do; %put False; %end;
 79         
 80         * test macro do in open code ;
 81         %do i=1 %to 3 ;
 ERROR: The %DO statement is not valid in open code.
 82           %put &amp;amp;=i ;
 WARNING: Apparent symbolic reference I not resolved.
 i
 83         %end;
 ERROR: The %END statement is not valid in open code.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 12:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474869#M122079</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-02T12:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474878#M122081</link>
      <description>&lt;P&gt;Not working in SAS 9.4 TS1M2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But an exciting find nonetheless.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:04:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474878#M122081</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-02T13:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474883#M122084</link>
      <description>&lt;P&gt;Not working in SAS 9.4 TS1M4&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474883#M122084</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-02T13:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474885#M122086</link>
      <description>&lt;P&gt;not working for SAS9.4M4 &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is working in SAS9.4M5 (y)&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474885#M122086</guid>
      <dc:creator>utrocketeng</dc:creator>
      <dc:date>2018-07-02T13:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474887#M122088</link>
      <description>&lt;P&gt;Quite obviously something new with 9.4M5. Checked it here on AIX.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:17:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474887#M122088</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-02T13:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474892#M122091</link>
      <description>&lt;P&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21527iEF851A3A2764DE6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474892#M122091</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-02T13:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474895#M122092</link>
      <description>&lt;P&gt;I would have expected to see such an important change in the "What's new in SAS 9.4" guide. As of now, I couldn't find it there.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474895#M122092</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-02T13:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474899#M122093</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I would have expected to see such an important change in the "What's new in SAS 9.4" guide. As of now, I couldn't find it there.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I agree. The fact that many experts in this thread were not aware of this change is surprising, in the sense that SAS did not publicize this as much as I think they should have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's next? IML language allowed in a data step? SQL language allowed in PROC GLM? Lights at Wrigley Field?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/474899#M122093</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-02T13:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/475208#M122179</link>
      <description>&lt;P&gt;I would expect iterative %DO in open code.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 15:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/475208#M122179</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2018-07-03T15:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/475822#M122377</link>
      <description>&lt;P&gt;Good find!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Blog post here:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2018/07/05/if-then-else-sas-programs/" target="_self"&gt;Using %IF/%THEN%ELSE in SAS programs&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;for the nudge.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 20:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/475822#M122377</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-07-05T20:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476207#M122513</link>
      <description>&lt;P&gt;Does the same work in SAS Enterprise Guide version 7.1?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 15:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476207#M122513</guid>
      <dc:creator>Monk</dc:creator>
      <dc:date>2018-07-07T15:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476211#M122516</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219225"&gt;@Monk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Does the same work in SAS Enterprise Guide version 7.1?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It depends on what version of SAS your session is using.&amp;nbsp; I am not sure if there is menu item in EG to find out, but you could just ask SAS to tell you by checking the SYSVLONG automatic macro variable.&lt;/P&gt;
&lt;PRE&gt;744  %put &amp;amp;sysvlong;
9.04.01M5P091317&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Jul 2018 16:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476211#M122516</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-07T16:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476212#M122517</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219225"&gt;@Monk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Does the same work in SAS Enterprise Guide version 7.1?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The EG version does not matter. You need SAS 9.4M5 in the backend.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 16:06:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476212#M122517</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-07T16:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: When did it become valid to use %IF in open code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476213#M122518</link>
      <description>&lt;P&gt;In EG, right-click on the opened server in the server list, select Properties, then Software.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 16:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/When-did-it-become-valid-to-use-IF-in-open-code/m-p/476213#M122518</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-07T16:08:57Z</dc:date>
    </item>
  </channel>
</rss>

