![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUnYDKrVSs7HMx7HS-xo-oybYjZ99Yv4NrltdeUHkOB4xBnUw_xQMJV2v0WZfjuNv-13-J78h_Cbc_rxLjlIKM4VUcS5eFz2B63sc4m2Zo9r6v8sL3Nk_qfxehUkHV-a-qN4aiZqwd-XA/s200/how+to+train+your+drgon.jpg)
Just to summarize, we are covering useful options %EVAL, %SYSFUNC, Concatenation of macro variables, Call Execute and %Include and much more.
So are you ready for savoring this platter ?
SAS Macros - Part 1 - Global Macro Variables
SAS Macros - Part 2 - Macro and Local Macro Variables
Let's delve on the topics one by one.
1. %Eval
While we assign any macro, the value are stored as character, even the numeric values are stored as character. So when we do an arithmetic operations while assigning a macro variable, calculations don't take place, unless you force SAS to do so. %EVAL is that force.
2. %SYSFUNC
There are several useful Base SAS function that are not directly applicable in Macro, %Sysfunc helps enable those function to make our life easy.
Example 1:
%Let a= 400;
%Let b= 500 ;
What do you expect below line would resolve into :
%let c = max(&a, &b);
%put &c ;
Answer : max(400, 500)
What about this :
%let c = %sysfunc(max(&a, &b));
%put &c ;
Answer : 500
List of functions available with the usage of %Sysfunc :
Next ... Concatenation of Macro Variables >>>
Enjoy reading our other articles and stay tuned with ...
Kindly do provide your feedback in the 'Comments' Section and share as much as possible.
No comments:
Post a Comment
Do provide us your feedback, it would help us serve your better.