Search notes:

SAS statements: do

if … then do … end

do … end; blocks are often used in if statements because the else can only take one statement.
data _null_;

  if 4 > 2 then do; /* start do group */
  
       put "-----------";
       put "-- 4 > 2 --";
       put "-----------";
     
     end;  /* end belongs to do, not to if */
  else do; /* start another do group for else */
  
       put "--------------";
       put "never reached!";
       put "--------------";
  
     end;

run;
Github repository about-SAS, path: /programming/statements/do-block/if-then-do.sas

See also

SAS statements

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