Finally, the query ends with a QUIT statement. You do not need a
RUN statement because PROC SQL executes as soon as a complete query has been
specified. If you don’t include a QUIT statement, PROC SQL remains in memory for
another query.
Above is from my textbook, I cannot understand.
PROC SQL is "interactive". Each statement is executed immediately when completed, so no RUN; is needed. To end the procedure, a QUIT; is the correct way. But the SAS interpreter will also terminate the SQL procedure if a DATA or PROC statement is encountered.
Other procedures that are not ended by a RUN are those that support run-group processing, like PROC DATASETS; these also need a QUIT.
PROC SQL should always end with QUIT;
It should never end with RUN;
PROC SQL is "interactive". Each statement is executed immediately when completed, so no RUN; is needed. To end the procedure, a QUIT; is the correct way. But the SAS interpreter will also terminate the SQL procedure if a DATA or PROC statement is encountered.
Other procedures that are not ended by a RUN are those that support run-group processing, like PROC DATASETS; these also need a QUIT.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.