Macros for SAS Application Developers
https://github.com/sasjs/core
mf_abort.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief Abort, ungracefully
4  @details Will abort with a straightforward %abort if the condition is true.
5 
6  @param [in] mac= (mf_abort.sas) Name of calling macro (is printed to the log)
7  @param [in] msg= ( ) Additional string to print to the log
8  @param [in] iftrue= (%str(1=1)) Conditional logic under which to perform the
9  abort
10 
11  <h4> Related Macros </h4>
12  @li mp_abort.sas
13 
14  @version 9.2
15  @author Allan Bowe
16  @cond
17 **/
18 
19 %macro mf_abort(mac=mf_abort.sas, msg=, iftrue=%str(1=1)
20 )/des='ungraceful abort' /*STORE SOURCE*/;
21 
22  %if not(%eval(%unquote(&iftrue))) %then %return;
23 
24  %put NOTE: /// mf_abort macro executing //;
25  %if %length(&mac)>0 %then %put NOTE- called by &mac;
26  %put NOTE - &msg;
27 
28  %abort;
29 
30 %mend mf_abort;
31 
32 /** @endcond */