Very useful. It would be even more useful if your first example:

data _null_;
rc=dlgcdir();
put rc=;
run;

stored the value into a data step variable rather than writing it to the log as a NOTE:. I could see using some logic to make decision based on the working directory folder. Still, quite useful.