As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Tip of the Day:April 25

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.


Feel free to comment on this tip.

Prior tip - Next tip - Random Tip

Submit a Tip