Mike,
Try to use a pipe filename statement with the dos 'SET' command. You will return info about system variables to a data step and then can parse out the ones you want :
filename env pipe 'set';
data _null_;
infile env;
length vars $ 500;
infile env lrecl=2000;
input vars &;
varname = scan(vars,1,'=');
value = scan(vars,2,'=');
put vars varname value;
run;
Fred