{"id":3501,"date":"2021-09-28T22:16:53","date_gmt":"2021-09-28T20:16:53","guid":{"rendered":"http:\/\/van-maanen.com\/?p=3501"},"modified":"2021-09-28T22:16:53","modified_gmt":"2021-09-28T20:16:53","slug":"a-graceful-way-to-end-a-sas-job","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=3501","title":{"rendered":"A graceful way to end a SAS job"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I found one possibility to gracefully end a SAS job. The code is rather straight forward. One opens a macro with a condition statement %if %then etc. If the condition is fulfilled, the code may run as previously anticipated. If not, a return statement ends processing the procedure.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">%let dsn=work.a;\n\n%macro abortIfRemaining;\n  %if (%sysfunc(exist(&amp;dsn))) %then %do;\n    --insert data step statements\n  %end;\n  %else %do;\n    %put &amp;dsn not found;\n    %return;\n  %end;\n%mend abortIfRemaining;\n\n%abortIfRemaining;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I found one possibility to gracefully end a SAS job. The code is rather straight forward. One opens a macro with a condition statement %if %then etc. If the condition is fulfilled, the code may run as previously anticipated. If not, a return statement ends processing the procedure. %let dsn=work.a; %macro abortIfRemaining; %if (%sysfunc(exist(&amp;dsn))) %then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3501","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3501"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3501\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3501"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}