Functions and CALL Routines |
Verifies that a libref has been assigned.
Category: |
SAS File I/O
|
See: |
LIBREF Function
under OpenVMS
|
-
libref
-
specifies the libref to be verified. In
a DATA step, libref can be a character expression,
a string enclosed in quotation marks, or a DATA step variable whose value
contains the libref. In a macro, libref can be
any expression.
The LIBREF function returns 0 if the libref
has been assigned, or returns a nonzero value if the libref has not been assigned.
This example verifies a libref. If an error or warning
occurs, the message is written to the log. Under some operating environments,
the user can assign librefs by using system commands outside the SAS session.
%if (%sysfunc(libref(sashelp))) %then
%put %sysfunc(sysmsg());
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.