Previous Page | Next Page

Functions and CALL Routines

LIBREF Function



Verifies that a libref has been assigned.
Category: SAS File I/O
See: LIBREF Function under OpenVMS

Syntax
Arguments
Details
Examples
See Also

Syntax

LIBREF(libref)


Arguments

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.

Range: 1 to 8 characters

Details

The LIBREF function returns 0 if the libref has been assigned, or returns a nonzero value if the libref has not been assigned.


Examples

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());


See Also

Function:

LIBNAME Function

Previous Page | Next Page | Top of Page