07-07-2014 04:58 AM
Could somebody help me with passing numeric value to the Macro variable...
%PUT "This is the value of &TPM";
However as i understand Macro take only Text how do i make sure it has numeric value inside of the macro while execution.?
07-07-2014 05:07 AM
How are you using the macro variable? It depends on the situation, but you could do a check in your macro per:
%if %sysfunc(anyalpha("&TPM."))>0 %then %put "Non numeric found";
%else %PUT "This is the value of &TPM";
07-07-2014 08:29 AM
Just use the macro variable reference at any place that you would normally type the number into your code. Remember that macro is mainly just to generate code that will then be compiled and run the same as if it had been typed into the original program.
DO i=&start TO &stop ;
It is only of concern if you are trying to pass a floating point number and compare its value to the value of a dataset variable. Then you might need to adjust for rounding.