<?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 ABORTAR PROJECT CLAUSULA FALSE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ABORTAR-PROJECT-CLAUSULA-FALSE/m-p/516682#M139583</link>
    <description>&lt;P&gt;Boa tarde amigos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Estou executando um programa proc sql no sas, e preciso fazer verificações em que caso encontre algum campo que se declare falso no case, ele aborte o processo e não crie a tabela e se possível não rode os demais programas.Tentei usar a função Abort mas não estou conseguindo acertar a sintaxe dela. Alguém consegue me ajudar com esse tema ?&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2018 14:31:00 GMT</pubDate>
    <dc:creator>Jose_Alberis</dc:creator>
    <dc:date>2018-11-28T14:31:00Z</dc:date>
    <item>
      <title>ABORTAR PROJECT CLAUSULA FALSE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ABORTAR-PROJECT-CLAUSULA-FALSE/m-p/516682#M139583</link>
      <description>&lt;P&gt;Boa tarde amigos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Estou executando um programa proc sql no sas, e preciso fazer verificações em que caso encontre algum campo que se declare falso no case, ele aborte o processo e não crie a tabela e se possível não rode os demais programas.Tentei usar a função Abort mas não estou conseguindo acertar a sintaxe dela. Alguém consegue me ajudar com esse tema ?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 14:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ABORTAR-PROJECT-CLAUSULA-FALSE/m-p/516682#M139583</guid>
      <dc:creator>Jose_Alberis</dc:creator>
      <dc:date>2018-11-28T14:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABORTAR PROJECT CLAUSULA FALSE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ABORTAR-PROJECT-CLAUSULA-FALSE/m-p/516989#M139678</link>
      <description>&lt;P&gt;You may want to post in English, not that many people on this forum&amp;nbsp;understand Portuguese. If I understand your question correctly, you are doing SQL processing and you want to stop program execution if something goes wrong, as determined by you verification process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ABORT statement is not SQL, but you can use it from a data step or as a macro (as %ABORT).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, depending on what you want to do, you could put something like this in your code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
/* first part of your SQL program here */
quit;

data _null_;
  if &amp;amp;sqlobs=0 then /*if no observations affected by last SQL statement */
    abort cancel;
run;

Proc sql;
  /* more SQL statements here */
quit;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I used "abort cancel" because that stops execution of the program without terminating your SAS session, if your are in a windowed environment. In a batch&amp;nbsp;environment it terminates the SAS session.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 10:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ABORTAR-PROJECT-CLAUSULA-FALSE/m-p/516989#M139678</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-11-29T10:49:22Z</dc:date>
    </item>
  </channel>
</rss>

