I'm trying to check to see if a library has been assisgned and have copied this verbatim out of the documentation. I'm using the SASHELP library for testing. It doesn't seem to work. I know I've done this before and can't see what exactly I'm doing wrong. Does it not work in enterprise guide?
%macro test (lib=SASHELP);
%if (%sysfunc(LIBREF(&lib))) %then
As a check(of my sanity), I check the libname definitions with the following SQL and it shows up. Any thoughts?
create table one as select distinct libname
Here's the log
19 %macro test (lib=SASHELP);
20 %if (%sysfunc(LIBREF(&lib))) %then
21 %put %sysfunc(sysmsg());
MLOGIC(TEST): Beginning execution.
MLOGIC(TEST): Parameter LIB has value SASHELP
SYMBOLGEN: Macro variable LIB resolves to SASHELP
MLOGIC(TEST): %IF condition (%sysfunc(LIBREF(&lib))) is FALSE
MLOGIC(TEST): Ending execution.
24 *%LET RC = %sysfunc(libref(INTGRP)) ; %put &RC;
SYMBOLGEN: Macro variable RC resolves to 0
and the sql output.......