Search notes:

SAS programming, function cexist

Check if a catalog or a catalog entry exists.
data _null_;

   if cexist('sashelp.sasmacr')
   then put  'sashelp.sasmacr exists';
   else put  'sashelp.sasmacr does not exist';
/* sashelp.sasmacr exists                        */

   if cexist('sashelp.sasmacr.ts_create_dsn')
   then put  'sashelp.sasmacr.ts_create_dsn exists';
   else put  'sashelp.sasmacr.ts_create_dsn does not exist';
/* sashelp.sasmacr.ts_create_dsn does not exist  */

   if cexist('sashelp.sasmacr.ts_create_dsn.macro')
   then put  'sashelp.sasmacr.ts_create_dsn.macro exists';
   else put  'sashelp.sasmacr.ts_create_dsn.macro does not exist';
/* sashelp.sasmacr.ts_create_dsn.macro exists    */
 
   if cexist('foo.bar')
   then put  'foo.bar exists';
   else put  'foo.bar does not exist';
/* foo.bar does not exist                        */

run;
Github repository about-SAS, path: /programming/functions/cexist.sas

See also

functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Companie...', 1759408911, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/functions/cexist(63): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78