【问题标题】:SAS using macro in a titleSAS 在标题中使用宏
【发布时间】:2020-04-15 23:33:32
【问题描述】:

这里的标题“&TitleX”的目的是什么?

第一种方式和第二种方式有区别吗?


%let TitleX=PROC PRINT Of Only &Cyl_Count Cylinder Vehicles; %let Cyl_Count=5;
Title "&TitleX";
proc print data=sashelp.cars;
where Cylinders=&Cyl_Count;
var Type Make Model Cylinders MSRP; run;


title PROC PRINT Of Only &Cyl_Count Cylinder Vehicles; %let Cyl_Count=5;
proc print data=sashelp.cars;
where Cylinders=&Cyl_Count;
var Type Make Model Cylinders MSRP; run;

【问题讨论】:

    标签: sas sas-macro


    【解决方案1】:

    有两个不同之处。一个是宏变量存在并且可以根据需要用于其他用途。第二个是如何生成 TITLE 语句。使用 TITLEX 宏变量的版本使用引号,另一个没有,但这与宏变量没有任何关系。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多