User:LainieH/test page

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

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.

LIBREF (9.2) FILEREF (9.2)


Feel free to comment on this tip.




Check out the Tip of the Day page for details about this effort.



View the web-site usage statistics and the definition of terms used in that report.