Search notes:

SAS programming - macro statement: %abort

Assert

The macro tq84_assertHost asserts we're running on a specific (expected) server.
If not, the macro aborts.
%macro tq84_assertHost(host);

  %if &syshostname ne &host %then %do;
    %put ERROR: Assertion failed, not running on &host but on &syshostname;
    %abort;
  %end;

  %put INFO: OK: Running on &syshostname;

%mend tq84_assertHost;

/* Assert we're running on host with name tq84 */
%tq84_assertHost(tq84);
Github repository about-SAS, path: /macro-processor/statements/abort/assertHost.sas

See also

macro statements, abort
error handling

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...', 1759408324, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/macros/statements/abort/index(62): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78