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!
%macro eanend ;
%* if _eandebug macro exists and is not set to 0 or off, then continue ;
%if %symexist(_eandebug)=0 %then %return ;
%if &_eandebug=0 or %upcase(&_eandebug)=OFF %then %return ;
%* process parameters ;
%let n_parms=%eval(%sysfunc(count(%superq(_eandebug),%str(,)))+1) ;
%do i=1 %to &n_parms ;
%let parm=%upcase(%scan(%superq(_eandebug),&i,%str(,))) ;
%put INFO: EANBEGIN macro invoked: &parm ;
%if &parm=SCAPROC or &parm=ON or &parm=1 %then %do ;
* write out the recorded info ;
proc scaproc ;
write ;
run ;
%end ; /* scaproc */
%else %if &parm=VERBOSE or &parm=ON or &parm=1 %then %do ;
%* look at macro variables after process ;
%put _all_ ;
%end ; /* verbose */
%end ; /* do */
%mend eanend ;
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 ;
%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.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.