全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3548 3
2012-10-24
各位大虾好!小妹初学SAS MACRO不久,有一些关于SASLAST的问题有一些疑惑,希望各位大虾可以帮助我,小妹不胜感激!

问题:
如果有一段code如下:

%macro houses(dsn = houses,sub = RANCH);
data &dsn;
set sasuser.houses;
if style = "&sub";
run;
%mend;
%houses(sub = SPLIT);
%houses(dsn = ranch);
%houses(sub = TWOSTORY);


那SYSLAST的值应该是多少呢?多谢各位赐教!!!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-10-25 07:18:35
The SYSLAST macro variable stores name of the last successfully created data set. So it depends on the situation of three  macro calls.
Assume that all calls are successfully executed. The return values will be WORK.HOUSES, WORK.RANCH, WORK.HOUSES after each call.

Here is an example.








1    data t1;
2      x=1;
3    run;

NOTE: The data set WORK.T1 has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.27 seconds
      cpu time            0.03 seconds


4
5    %put >>>&syslast<<<;
>>>WORK.T1                              <<<
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-10-26 16:39:46
bobguy 发表于 2012-10-25 07:18
The SYSLAST macro variable stores name of the last successfully created data set. So it depends on t ...
OK, I've got the meaning and usage of SYSLAST. Thanks for your explicit explanation!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-10-26 20:23:51
学习了,谢谢。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群