SAS Component Language Dictionary |
Verifies the physical existence of a SAS catalog or SAS catalog
entry
-
rc
-
contains the return code for the operation:
1 |
The SAS catalog or catalog entry
exists. |
0 |
The SAS catalog or catalog entry
does not exist. |
Type: Numeric
-
entry
-
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. ![[cautionend]](../../../../common/64368/HTML/default/images/cautend.gif)
Type:
Character
-
'U'
-
tests whether the catalog specified in entry can be opened for updating.
Type:
Character
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();
EXIST
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.