Do you periodically delete unneeded global macro variables? You should! Deleting macro variables releases memory and keeps your symbol table clean. Learn how the macro language statement that deletes global macro variables and about the %DELETEALL statement that can be a life saver for macro programmers.
Tag: macro variables
Deleting global macro variables
How to format a macro variable
Would you like to format your macro variables? Easy! Just use the %FORMAT function, like this: What?! You never heard of the %FORMAT function? Of course not, cuz it doesn't exist! No problem. Just create it, like this: %macro format(value,format); %if %datatyp(&value)=CHAR %then %sysfunc(putc(&value,&format)); %else %left(%qsysfunc(putn(&value,&format))); %mend format; The %FORMAT
How to use the SAS pi constant
With Pi Day coming up on 3/14, I wanted to make sure all you SAS programmers know how to use the pi constant in your SAS code... All you have to do is use constant("pi") in a data step, and you've got the value of pi out to a good many decimal places