06-21-2017 03:27 AM - edited 06-21-2017 03:28 AM
06-21-2017 03:29 AM
PS and use a more descriptive subject line in the future. "Base SAS" in an exclusively SAS-oriented forum is, ahem, not very bright.
06-21-2017 03:59 AM
What is the question here? What you have posted appears to be a demand for examples of some SAS syntax. If you require examples of something specific the manual is fully encompassing, or there are several books out there. If you have a specific question, please formulate a full explanation, provide example test data in the form of a datastep, what you want out etc.
06-21-2017 10:42 AM
Differences between DO WHILE and DO UNTIL statements with examples ?
Not a SAS specific question even. These are generic programming concepts.Wikipedia https://en.wikipedia.org/wiki/Do_while_loop has examples in something like 19 different programming languages.
06-21-2017 11:46 AM - edited 06-21-2017 12:43 PM
Two main differences.
You use the DO UNTIL () form if you want to insure that the loop always runs at least once.
Not sure if these are good examples for you, but they are things that I use frequently.
Process a dataset by groups of records needs to use DO UNTIL() so that the SET statement always runs at least once.
do until (last.id); set mydata ; by id ; .... end;
Read all records from a text file needs to test if the file has anymore records to prevent SAS from stopping the data step when the INPUT statement reads past the end of the file.
infile 'myfile.csv' dsd firstobs=2 truncover end=eof ; do while (not eof); input a b c ; ... end;