<?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: SAS Code - conditional execution of code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/605136#M175547</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240933"&gt;@jaiganesh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've below set of code to be execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Test;&lt;/P&gt;
&lt;P&gt;set mock;&lt;/P&gt;
&lt;P&gt;if count eq 0 then ---&amp;gt; it should go the list line of the program i,e line no 45. All middle line of codes should not be read neither execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to jump directly from one line of Code to other line of Code (irrespective of any data steps) ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe , SAS may not allow this , Any suggestion would be appreciated on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Maybe show an entire data step with the conditions needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS data step has several ways to execute (or not) code: do/ end, If/then/else, Select,&amp;nbsp;GO TO (or GOTO ) Label; Link,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Nov 2019 18:12:48 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-11-18T18:12:48Z</dc:date>
    <item>
      <title>SAS Code - conditional execution of code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/604819#M175391</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've below set of code to be execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Test;&lt;/P&gt;
&lt;P&gt;set mock;&lt;/P&gt;
&lt;P&gt;if count eq 0 then ---&amp;gt; it should go the list line of the program i,e line no 45. All middle line of codes should not be read neither execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to jump directly from one line of Code to other line of Code (irrespective of any data steps) ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe , SAS may not allow this , Any suggestion would be appreciated on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2019 19:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/604819#M175391</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-11-17T19:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/604829#M175395</link>
      <description>&lt;P&gt;You cannot do this with line numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you define a macro, and if you add labels at various points, you can use %GOTO to move to the position where that label occurs.&amp;nbsp; See:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000206879.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000206879.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2019 18:31:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/604829#M175395</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-11-17T18:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/604833#M175399</link>
      <description>Depending on the code needed to run you could choose to use either macros or CALL EXECUTE or %INCLUDE to execute select statements. There's also the DO/END option within a data step.</description>
      <pubDate>Sun, 17 Nov 2019 19:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/604833#M175399</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-11-17T19:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code - conditional execution of code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/605136#M175547</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240933"&gt;@jaiganesh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've below set of code to be execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Test;&lt;/P&gt;
&lt;P&gt;set mock;&lt;/P&gt;
&lt;P&gt;if count eq 0 then ---&amp;gt; it should go the list line of the program i,e line no 45. All middle line of codes should not be read neither execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to jump directly from one line of Code to other line of Code (irrespective of any data steps) ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe , SAS may not allow this , Any suggestion would be appreciated on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Maybe show an entire data step with the conditions needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS data step has several ways to execute (or not) code: do/ end, If/then/else, Select,&amp;nbsp;GO TO (or GOTO ) Label; Link,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 18:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-conditional-execution-of-code/m-p/605136#M175547</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-18T18:12:48Z</dc:date>
    </item>
  </channel>
</rss>

