Statistical programming, matrix languages, and more

Prom IML - DO UNTIL exit the loop

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

Prom IML - DO UNTIL exit the loop

Hi There,

 

Anybody can help to, how can I LEAVE the DO UNTIL loop?

 

While running the DO UNTIL loop, its an open statement, I want to stop/leave the loop after, say suppose iteration happen 10k times.

 

Thanks,

KP


Accepted Solutions
Solution
‎06-06-2016 05:57 AM
Super User
Posts: 9,867

Re: Prom IML - DO UNTIL exit the loop


proc iml;
do i=1 to 10 by 1 until(x=1);
 print i[l=''] 'XX' ;
 x=0;
end;
quit;

View solution in original post


All Replies
Solution
‎06-06-2016 05:57 AM
Super User
Posts: 9,867

Re: Prom IML - DO UNTIL exit the loop


proc iml;
do i=1 to 10 by 1 until(x=1);
 print i[l=''] 'XX' ;
 x=0;
end;
quit;

Contributor
Posts: 21

Re: Prom IML - DO UNTIL exit the loop

Thanks Ksharp

SAS Super FREQ
Posts: 3,626

Re: Prom IML - DO UNTIL exit the loop

For more information and examples about loops in SAS/IML, see the article "Loops in SAS".

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 299 views
  • 0 likes
  • 3 in conversation