SAS Component Language Dictionary |
Category: | Catalog |
Syntax | |
Examples | |
Example 1: Testing Whether a Catalog Can Be Updated | |
Example 2: Verifying the Existence of a Catalog | |
See Also |
Syntax |
rc=CEXIST(entry< ,'U'>); |
contains the return code for the operation:
1 | |
0 |
is SAS catalog, or the name of an entry in a catalog. A one- or two-level name is assumed to be the name of a catalog. To test for the existence of an entry within a catalog, use a three- or four-level name.
Note: The CEXIST function verifies whether the entry physically exists. Concatenated names are a logical concatenation, not a physical entity. If you specify a concatenated name for entry, CEXIST will return a 0.
tests whether the catalog specified in entry can be opened for updating.
Examples |
Test whether the catalog LIB.CAT1 exists and can be opened for update. If the catalog does not exist, a message is displayed on the message line.
if (cexist('lib.cat1','u')) then _msg_='The catalog LIB.CAT1 exists and can be opened for update.'; else _msg_=sysmsg();
Verify the existence of the entry X.PROGRAM in LIB.CAT1:
if (cexist('lib.cat1.x.program')) then _msg_='Entry X.PROGRAM exists'; else _msg_=sysmsg();
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.