条件がtrueになるまでマクロのセクションを繰り返し実行します。
| 種類: | マクロステートメント |
| 制限事項: | マクロ定義でのみ使用可能 |
| 参照項目: | %ENDステートメント |
%macro grph(type);
%let type=%upcase(&type);
%let options=BLOCK HBAR VBAR;
%let i=0;
%do %until (&type=%scan(&options,&i) or (&i>3)) ;
%let i = %eval(&i+1);
%end;
%if &i>3 %then %do;
%put ERROR: &type type not supported;
%end;
%else %do;
proc chart;&type sex / group=dept;
run;
%end;
%mend grph;PROC CHART; HBAR SEX / GROUP=DEPT; RUN;
Error:PIE type not supported