IsExistingServerDataSet

Prototype

Matrix IsExistingServerDataSet( Matrix mLibref, Matrix mDataSetName )

Return Value

The return value is nonzero if the data set exists in the specified library. Otherwise, the return value is zero.

Parameters

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.

Remarks

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.

Example
submit;
    data A; x=1; run;
endsubmit;
AExists = IsExistingServerDataSet( "work", "A" );
if AExists then
   print "WORK.A exists";