Macros for SAS Application Developers
https://github.com/sasjs/core
mf_existds.sas File Reference

Checks whether a dataset OR a view exists. More...

Go to the source code of this file.

Detailed Description

Can be used in open code, eg as follows:

%if %mf_existds(libds=work.someview) %then %put  yes it does!;

NOTE - some databases have case sensitive tables, for instance POSTGRES with the preserve_tab_names=yes libname setting. This may impact expected results (depending on whether you 'expect' the result to be case insensitive in this context!)

Parameters
[in]libdslibrary.dataset
Returns
output returns 1 or 0

Related Macros

Warning
Untested on tables registered in metadata but not physically present
Version
9.2
Author
Allan Bowe

Definition in file mf_existds.sas.