I have a large PROC SQL step. It has a SELECT statement that includes several CASE expressions, each of which obviously ends with END AS <variable name>. When I use the Format Code command (from the Edit menu), the AS gets pushed to the following line, and the indentation gets all messed up with all of the following column names. Is there any way to use the Format Code command without this undesired behavior?
Thank you.
@Paul_de_Barros wrote:
I have a large PROC SQL step. It has a SELECT statement that includes several CASE expressions, each of which obviously ends with END AS <variable name>. When I use the Format Code command (from the Edit menu), the AS gets pushed to the following line, and the indentation gets all messed up with all of the following column names. Is there any way to use the Format Code command without this undesired behavior?
Thank you.
Likely not without using another tool to format a code text file.
I've never run into any automatic code formatting program that did exactly what I wanted and I'm not about to try to write one.
What version of EG is causing this? If it is not the latest version (8.3 Update 1) you could try upgrading to see if there is any improvement. Alternatively, raise a Tech Support track and ask them if there have been any improvements.
I'm using version 7.15. I'll look into upgrading. Thanks for the suggestion.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.