|
楼主

楼主 |
发表于 2006-4-27 15:36:19
|
只看该作者
TWO QUESTIONS ABOUT DO UNTIL STATEMENT
PROGRAM1:
data work.test;
x=10;
do until(x>12);
a+1;output;
end;
run;
proc print;run;
Why SAS system always displays 'data step running' after submited the program1?
PROGRAM2:
data work.test;
x=11.5;
do until(x>12);
x+1;output;
end;
run;
proc print;run;
OUTPUT2:
Obs x
1 12.5
Suppose the DO UNTIL steps below:
step1:x=11.5,x>12 is false, then x+1=12.5;
step2:x=12.5,x>12 is ture, then end DO UNTIL statement,executes next statement.
PROGRAM3:
data work.test;
x=12.5;
do until(x>12);
x+1;output;
end;
run;
proc print;run;
OUTPUT3:
Obs x
1 13.5
What is the DO UNTIL steps of program2? |
|