Thus, a %DO %UNTIL loop always iterates at least once. Caution: This syntax can easily result in an infinite loop if you are not careful. The expression N>=5 is evaluated at the bottom of the loop. The %DO %UNTIL statement checks the value of the condition at the bottom of each iteration.