|Date: ||Wed, 21 Feb 1996 16:44:25 GMT|
|Reply-To: ||Paul Wehr <wehrp@AA.WL.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>|
|From: ||Paul Wehr <wehrp@AA.WL.COM>|
|Organization: ||Parke-Davis Research|
|Subject: ||Re: dataset and catalog existence|
email@example.com (Michael DeMilia) wrote:
>I know how to check to see if a dataset exists using the following:
> DATA _NULL_;
> IF 0 THEN SET &L_DSN;
>A error will be generated if &L_DSN (the dataset) doesn't exist. But is there
> a way to determine if a data set exists but is empty (a single observation is
> generated by the set statement with 0 variables). Also, is there a similar
>way to check for catalog existence and whether it contains any items?
PROC CONTENTS will provide this information, use the OUT= option, then compare
the resulting dataset with the data or catalogs you are looking for.