Search notes:

SAS programming - macro statement: %let

%let creates a macro variable. The value of the macro variable is stored in the macro table.
Before the value of the macro variable goes into the symbol table, macro triggers (& and % are resolved or executed). That is macro functions (like %upcase or %substr) are evaluated first.
/* 
    %let creates a macro variable and assigns a
    value to it.
    
    The macro variable is then resolved by putting an
    ampersand in its front.
*/

%let   answer=forty-two;
%put  &answer;
%put '&answer'   /* Within '...', the macro variable is not expanded */;
%put "&answer"   /* Within "...", the macro variable is expanded     */;

/* Note that the "&variable" construct turns the datatyp into CHAR: */
%let tq84_num=42;
%put %datatyp( &tq84_num ); /* NUMERIC */
%put %datatyp("&tq84_num"); /* CHAR    */
Github repository about-SAS, path: /macro-processor/statements/let.sas

See also

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