Search notes:

SAS: Using macros

Keyword parameters

%macro m_tq84(
     param_1,
     param_2,
     param_3 = ParamThree,
     param_4 = param four: params are allowed
  );
  %put &=param_1;
  %put &=param_2;
  %put &=param_3;
  %put &=param_4;
%mend;

/* Using the macro without parantheses: */
%m_tq84;
/*
   PARAM_1=
   PARAM_2=
   PARAM_3=ParamThree
   PARAM_4=param four: params are allowed

   -------------------------------------- 

   Using the macro without any parameters */
%m_tq84();
/*
   PARAM_1=
   PARAM_2=
   PARAM_3=ParamThree
   PARAM_4=param four: params are allowed

   -------------------------------------- 

   Using the named parameter:              */
%m_tq84(three, param_4 = def);
/*
   PARAM_1=three
   PARAM_2=
   PARAM_3=ParamThree
   PARAM_4=def
*/
Github repository about-SAS, path: /macro-processor/using/keyword-parameters.sas

See also

macros

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