簡體   English   中英

SAS 在標題中使用宏

[英]SAS using macro in a title

標題標題“&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;

有兩個區別。 一個是宏變量存在並且可以根據需要用於其他用途。 第二個是如何生成 TITLE 語句。 使用 TITLEX 宏變量的版本使用引號,而另一個則沒有,但這實際上與宏變量沒有任何關系。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM