Matrix IsExistingServerDataSet( Matrix mLibref, Matrix mDataSetName )
The return value is nonzero if the data set exists in the specified library. Otherwise, the return value is zero.
Matrix mLibref
A character matrix containing the libref of the library that might contain the data set.
Matrix mDataSetName
A character matrix containing the name of the data set.
This module determines whether a SAS data set exists in a given library. This module is useful for checking that a data set exists before it is accessed or deleted.
submit;
data A; x=1; run;
endsubmit;
AExists = IsExistingServerDataSet( "work", "A" );
if AExists then
print "WORK.A exists";