That DLG prefix was previously a hint that the function operated to open a dialog box in interactive SAS - hence the lack of returned value. Sometimes I assume too much Does the dlgcdir() function work within %SYSFUNC()?