我想將代碼設定為每月運行:5、11、16、22、28 天,但它不起作用。
%if %sysfunc(day(%sysfunc(today()))) in (5,11,16,22,28) %then %do
我該如何解決?非常感謝。
uj5u.com熱心網友回復:
運算子在 SAS 9.2 宏中IN作業,但您需要定義系統選項。( MINOPERATORMacro-In-Operator) 必須打開,在您的情況下,MINDELILITER也必須指定,因為您使用的是逗號分隔值。
有關更多資訊,請參閱讓 IN 運算子在 SAS? 宏中使用 FUNCTION
options minoperator mindelimiter=',';
%if %sysfunc(day(%sysfunc(today())-1)) in (5,11,16,22,28) %then %do;
%put do smth...;
%end;
do smth...
請注意-1上述示例中的復制 3 月 22 日。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/451462.html
