Search notes:

SAS programming, function exist

The exist function can be used to check wheter a data set exists:
%macro doesTableExist(tab);

  %if %sysfunc(exist(&tab))
      %then %put Table &tab does indeed exist;
      %else %put Table &tab does not exist;

%mend;

%doesTableExist(tq84_tab);

data tq84_tab;
  x = 'foo';
  y = 'bar';
  z = 'baz';
run;

%doesTableExist(tq84_tab);

proc delete
     data = tq84_tab;
run;

%doesTableExist(tq84_tab);
Github repository about-SAS, path: /programming/functions/exist/check-existence-dataset.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...', 1745558422, '18.191.74.140', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/functions/exist/index(60): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78