Published on :
Macro CREATION_INTERNE

Macro eanend - Enhanced Analysis Shutdown

This code is also available in: Deutsch Español Français
The macro checks the existence and status of the global macro variable '_eandebug'. If debugging is active, it iterates through the options specified in this variable. If the 'SCAPROC' option is present, it triggers the writing of information collected by the SAS© Code Analyzer procedure (PROC SCAPROC). If the 'VERBOSE' option is active, it writes the list of all macro variables to the log via '%PUT _ALL_'.
Data Analysis

Type : CREATION_INTERNE


The code does not read data. It manages the execution flow and log writing based on macro variables.

1 Code Block
MACRO
Explanation :
Macro definition. It parses the '_eandebug' variable to determine the closing actions to perform (SCAPROC writing or verbose display of variables).
Copied!
1%macro eanend ;
2 %* IF _eandebug macro exists and is not SET to 0 or off, THEN continue ;
3 %IF %symexist(_eandebug)=0 %THEN %return ;
4 %IF &_eandebug=0 or %upcase(&_eandebug)=OFF %THEN %return ;
5
6 %* process parameters ;
7 %let n_parms=%eval(%sysfunc(count(%superq(_eandebug),%str(,)))+1) ;
8 %DO i=1 %to &n_parms ;
9 %let parm=%upcase(%scan(%superq(_eandebug),&i,%str(,))) ;
10 %put INFO: EANBEGIN macro invoked: &parm ;
11 %IF &parm=SCAPROC or &parm=ON or &parm=1 %THEN %DO ;
12 * write out the recorded info ;
13 PROC SCAPROC ;
14 write ;
15 RUN ;
16 %END ; /* scaproc */
17 %ELSE %IF &parm=VERBOSE or &parm=ON or &parm=1 %THEN %DO ;
18 %* look at macro variables after process ;
19 %put _all_ ;
20 %END ; /* verbose */
21 %END ; /* do */
22 %mend eanend ;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.