As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
Tips:LIBREF function return value
It may be somewhat surprising that the LIBREF function returns 0 when the libref is indeed assigned. The return value of 0, however, is to be understood as "OK", "verified", or "successful", not as "false."
FILEREF also returns 0 when the fileref is verified as being assigned, while both FEXIST and FILEEXIST return 1 if the file exists.
libname mylib "~/temp"; %put %sysfunc(libref(mylib)) -- 0 means assignment verified; libname mylib; %put %sysfunc(libref(mylib)) -- ^0 means not verified; /* on log 0 -- 0 means assignment verified 70006 -- ^0 means not verified */
Submitted by Chang Y. Chung. Contact me at my Discussion Page.