From the SAS documentation:
%if %sysfunc(fileexist(&myfilerf)) %then
%if %sysfunc(fileexist(&libref)) %then
libname &libnm &libref;
%put Library reference &libref. does not exist.
should work, or something along those lines.
On Fri, Apr 17, 2009 at 11:49 AM, Rose Grandy <email@example.com>wrote:
> I am trying to find a really simple way to check to see if a directory
> exists before I use it in a libname statement. I'd like to avoid using an x
> comand to get a directory or using a filename/pipe. I am running in PC-
> SAS. I am sure there is one but I haven't found it. Could someone offer a