全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
5328 2
2011-07-09
看三段程序
1.%let repmonth=4;
%let repyear=2007;
%let repmword=%sysfunc(mdy(&repmonth,1,&repyear),monname9.);

2.
%let repmonth=4;
%let repyear=2007;
%let repmword=%sysfunc(%putn(mdy(&repmonth,1,&repyear)),monname9.));

3.
1.%let repmonth=4;
%let repyear=2007;
%let repmword=%sysfunc(%put(mdy(&repmonth,1,&repyear)),monname9.));


运行结果表明 1=2   3 error
请问各位好朋友,这是为什么?  两个层次:1  不用putn函数怎么也可以  2.putn可以 而 put却不可以呢?谢谢了
二维码

扫码加我 拉你入群

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

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

全部回复
2011-7-9 22:15:33
put,input不能和sysfunc一起用
二维码

扫码加我 拉你入群

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

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

2011-7-11 01:01:21
shenliang_111 发表于 2011-7-9 22:07
看三段程序
1.%let repmonth=4;
%let repyear=2007;
%let repmword=%sysfunc(mdy(&repmonth,1,&repyear),monname9.);

2.
%let repmonth=4;
%let repyear=2007;
%let repmword=%sysfunc(%putn(mdy(&repmonth,1,&repyear)),monname9.));

3.
1.%let repmonth=4;
%let repyear=2007;
%let repmword=%sysfunc(%put(mdy(&repmonth,1,&repyear)),monname9.));


运行结果表明 1=2   3 error
请问各位好朋友,这是为什么?  两个层次:1  不用putn函数怎么也可以  2.putn可以 而 put却不可以呢?谢谢了
Put and %put is different and some function,

SAS Functions Not Available with %SYSFUNC and %QSYSFUNCAll Variable Information FunctionsALLCOMBALLPERMDIFDIMHBOUNDIORCMSGINPUTLAGLBOUNDLEXCOMBLEXCOMBILEXPERKLEXPERMMISSINGPUTRESOLVESYMGET

Note:   Instead of INPUT and PUT, which are not available with %SYSFUNC and %QSYSFUNC, use INPUTN, INPUTC, PUTN, and PUTC.  
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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