末尾の空白を除去します。
種類: | 自動呼び出しマクロ |
要件 | MAUTOSOURCEシステムオプション |
& % ' " ( ) + − * / < > = ¬ ∘ ~ ; , # blank AND OR NOT EQ NE LE LT GE GT IN
%macro numobs(dsn); %local num; data _null_; set &dsn nobs=count; call symput('num', left(put(count,8.))); stop; run; %if &num eq 0 %then %put There were NO observations in %upcase(&dsn).; %else %put There were %trim(&num) observations in %upcase(&dsn).; %mend numobs; %numobs(sample)
DATA _NULL_; SET SAMPLE NOBS=COUNT; CALL SYMPUT('num', LEFT(PUT(COUNT,8.))); STOP; RUN;
There were 6 observations in SAMPLE.
%let date=%nrstr( &sysdate ); %put *&date* *%qtrim(&date)* *%trim(&date)*;
* &sysdate * * &sysdate* * 28JAN99*