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.
