SAS 10 study notes macro variables

  1. A macro variable to store the value remains unchanged until modified ( 全局变量)
  2. When a reference, the variable name with "&"
  3. When referring to macro variables 放在双引号之间会被解读(single quotes will not be read)

User-defined macro variables, two formats:

  • %let 变量名=变量值;
  • call symput(变量名,变量值);

Macro variable references

 Displays the macro variables and their values

Separated and macro variables progeny

 When used in conjunction with macro variables closely follow the text, it is necessary to define the end position of macro variables

An indirect reference to macro variables

"& Macro variable name" is a direct reference to

If the macro variable name referenced is generated by the macro, you need an indirect reference, this time need to use: &&

Guess you like

Origin www.cnblogs.com/abble/p/10972966.html
Recommended