Haigang Zhou wrote:
> Is it possible to include a macro variable as part of a file name to
> be imported or exported? For example, can I replace the file name
> "199301.txt" using a name that includes the macro variable, tstm?
%let ZhouVar = 199301.txt;
The macro resolution (&) must be inside double quotes. When inside single
quotes, the & is treated as the ampersand character and not as the start of
macro variable resolution token.
> Also, when I define another macro variable, nsks, is it possible to
> define it to be a result of a function? In the program, nsks = 33 =
If in DATA Step, use call symput.
call symput ('ZhouVar', log10(100));
In in macro environment you can use
%sysfunc() to execute a function -or-
%sysevalf() to perform math
Richard A. DeVenezia
Done being productive? Try SAS Tetris.