<?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: How to stop the RUN when ERROR happens in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795966#M255375</link>
    <description>&lt;P&gt;The SAS Windows Companion explains all this. Here is the link to &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostwin/p16esisc4nrd5sn1ps5l6u8f79k6.htm#p01fzykn6n0s73n164xasi1t3ii9" target="_blank" rel="noopener"&gt;batch processing&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Feb 2022 00:48:14 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-02-14T00:48:14Z</dc:date>
    <item>
      <title>How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795881#M255330</link>
      <description>&lt;P&gt;Running huge codes with macro, ERROR happens, and codes keep running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to stop the RUN if ERROR happens. And let it RUN over, if no ERROR happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 06:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795881#M255330</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-13T06:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795885#M255334</link>
      <description>&lt;P&gt;If you know where the error happens, you can add a %GOTO depending on the value of &amp;amp;SYSSC that jumps to the end of the macro.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 06:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795885#M255334</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-13T06:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795887#M255335</link>
      <description>&lt;P&gt;The issue is that I do not know where the ERROR is happening(I turned off LOG, a must otherwise prompt).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anything in SAS has breakpoint like C/C++?!&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 06:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795887#M255335</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-13T06:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795890#M255336</link>
      <description>&lt;P&gt;Rule #1 of macro coding: start with &lt;STRONG&gt;working&lt;/STRONG&gt; non-macro code.&lt;/P&gt;
&lt;P&gt;Get your code to run successfully without any macro language use before you start making it dynamic&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 06:55:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795890#M255336</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-13T06:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795895#M255337</link>
      <description>&lt;P&gt;Yes, it is the way to build up Macros. The thing is when you indeed do that, RUN and no ERROR surely.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT later change needed, and ERROR somewhere.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 07:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795895#M255337</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-13T07:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795896#M255338</link>
      <description>&lt;P&gt;Turn on the log.&lt;/P&gt;
&lt;P&gt;Run each step in the macro individually, and set the macro variables manually with %LET as the macro logic would set them.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 07:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795896#M255338</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-13T07:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795903#M255342</link>
      <description>&lt;P&gt;Are you using OPTIONS MPRINT to debug the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know where the error is? If not, then the above should show the first error(s) to address.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or modify your macro to test the result from every proc or data step to see if it completed without problems and put the suggested skip in MANY places if the code is actually that long.&lt;/P&gt;
&lt;P&gt;Or may possibly break up a large macro to smaller ones that can be run in pieces testing at those boundaries.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 08:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795903#M255342</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-02-13T08:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795908#M255346</link>
      <description>&lt;P&gt;I cannot turn on LOG since it quickly fills up and prompts. Try to turn on, and save LOG into file, not know how to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do that(it says error msg).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using sleep() to debug, but too painful&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 09:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795908#M255346</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-13T09:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795911#M255348</link>
      <description>Try these options:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;options errorabend nosyntaxcheck ;&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Feb 2022 09:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795911#M255348</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-02-13T09:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795914#M255349</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a %GOTO example (as said by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;), see :&lt;/P&gt;
&lt;P&gt;SAS® 9.4 and SAS® Viya® 3.5 Programming Documentation&lt;BR /&gt;Macro Language Reference&lt;BR /&gt;%GOTO Macro Statement&lt;BR /&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Example: Providing Exits in a Large Macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p0jfeh75p72icen1ddd9una5zbmm.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p0jfeh75p72icen1ddd9una5zbmm.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, this article might be useful :&lt;/P&gt;
&lt;P&gt;How to conditionally stop SAS code execution and gracefully terminate SAS session?&lt;BR /&gt;By Leonid Batkhan on SAS Users March 24, 2021&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sgf/2021/03/24/how-to-conditionally-stop-sas-code-execution-and-gracefully-terminate-sas-session/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2021/03/24/how-to-conditionally-stop-sas-code-execution-and-gracefully-terminate-sas-session/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 11:20:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795914#M255349</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-02-13T11:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795919#M255353</link>
      <description>this should be solution</description>
      <pubDate>Sun, 13 Feb 2022 12:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795919#M255353</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-13T12:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795920#M255354</link>
      <description>&lt;P&gt;Without the log, any attempt at debugging is futile,&amp;nbsp;&lt;STRONG&gt;PERIOD&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;MUST&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;have a log to see what's happening and when.&lt;/P&gt;
&lt;P&gt;A single step (as I proposed) cannot fill up the log quickly, and if, you can look at the log before clearing it.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 12:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795920#M255354</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-13T12:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795945#M255367</link>
      <description>&lt;P&gt;Run your job in batch mode. You will never be prompted regarding log size in batch. The SYNTAXCHECK option is also set on by default in batch and that should cause you program to run quickly to completion without processing any data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 19:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795945#M255367</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-13T19:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795965#M255374</link>
      <description>&lt;P&gt;How to RUN in SAS/PC Batch mode?! how to save the LOG into a file?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 00:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795965#M255374</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-14T00:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop the RUN when ERROR happens</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795966#M255375</link>
      <description>&lt;P&gt;The SAS Windows Companion explains all this. Here is the link to &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostwin/p16esisc4nrd5sn1ps5l6u8f79k6.htm#p01fzykn6n0s73n164xasi1t3ii9" target="_blank" rel="noopener"&gt;batch processing&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 00:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-the-RUN-when-ERROR-happens/m-p/795966#M255375</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-14T00:48:14Z</dc:date>
    </item>
  </channel>
</rss>

