on 发帖数: 199 | 1 setenv F /test/folder
So F is an environmental variable.
My question is:
libname f "$F"; * this works fine.
%let test = $F; * no resolution here.
data t; test = "$F"; run;
The first statement: $F resolves to the environmental variable; but the last
two statements don't resolve and just literally have $F. Why is that? |
a*****3 发帖数: 601 | 2 the first statement has nothing to do with 'resolution';
the second line creates a macro variable which has nothing to do with '
resolution'.
the third line assigns a string to test which has nothing to do with '
resolution'. |
s******y 发帖数: 352 | 3 it is Ok to reference an EV through pathname references. if the pathname
reference in a FILENAME or LIBNAME statement starts with !, SAS will attempt
to resolve it. like your fist case.
in last two case, you have to use sysget function to retrieve an EV,
%let %let test = %sysget(F);
run;
HTH
SG
last |