149 data work.loopdemo;
151 do until(var GE 5);
NOTE: The data set WORK.LOOPDEMO has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
In a DO UNTIL loop, the condition is checked at the bottom or end of the looping structure. In this example, the variable var is assigned a value of 5 using the statement, var=5;, then it is augmented with the statement, var+1; and then the loop condition is checked. So, the value that gets output for the variable var after the program stops is 6. This is visible in the output dataset:
The one and only FREE resource for general SAS online training as well as study guides for the SAS Base Certification. My goal is to create the SAS Certification prep guide that I never found but always wanted. This should also be a place to come if you are new to the language but are simply looking for online SAS training.