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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.