Thank you @SASKiwi and @Patrick for enlightening about this fact.
It would be good if SAS can do something about it
FYI You can set options (like validvarname) using the More Application Option button & selecting preferences & saving.
@tom_grant - Yes, I'd seen that thanks. My point being that you can't enforce it as a SAS installation or application default even though you can do it for programs not run in SAS Studio. It causes inconsistencies when running the same applications in say both SAS Studio and batch mode for example.
EDIT: I have a SAS application that sets VALIDVARNAME = V7 in a control or master program that sets up the application environment. It works as intended in Enterprise Guide or batch across all users regardless of how many program submits you do. It won't work in SAS Studio unless I get all users to individually configure their SAS Studio options. There should be a way to turn off compulsory submission options globally rather than just override them.
In the similar menu in EG, there you can choose to set validvarname to V7/Any/etc or you cat set it to "use setting from server". Is there a "use setting from server" choice for Studio?
The bigger annoyance for me as a developer (not an admin), as I understand in Studio if I submit an options statement to change the value of VALIDVARNAME, and then submit another block of code, the value of VALIDVARNAME will be reset for the second submission. That seems like it would be really annoying.
@Quentin - EG also sets VALIDVARNAME = EXTEND by default, but honours any previous setting of this option either in an AUTOEXEC or any other SAS program. This is also how the SAS Windowing System and SAS batch jobs work. This is how SAS Studio should behave, but it doesn't and going around configuring all SAS Studio user sessions individually doesn't sound like a good fix to me.
You are absolutely correct in your observations, but to me the biggest problem is SAS Studio doesn't behave the same as other types of SAS sessions. I build SAS applications so they run the same in any environment: SAS Studio, EG, batch mode. At the moment I can't guarantee that my SAS applications will run correctly in all SAS Studio sessions as they all set the VALIDVARNAME = V7 option at the start of each one.
I simply don't see the reason to reset SAS options for every program submission. There should be a installation default setting to turn this SAS Studio feature off.
Hi all,
I'm trying to learn SAS using books and online resources. I prefer to learn stuff doing something more than just reading or watching videos about them.
So I go on Stackoverflow and I try to see if I can answer any question about the thing I'm learning. Of course at the beginning often I'm not even able to understand the questions, but after a while I can see a light at the end of the tunnel. Anyway I try to do a lot of google-fu to figure out a solution and I feel it's good to learn even if I get no points on SO.
Reading books and watching the videos I saw a lot of SAS commands, but on internet a lot of problems are solved using PROC SQL.
Now my doubt is: I know SQL pretty well, how much effort should I put in learning SAS commands? Is it better to use PROC SQL and what I already know or using SAS language is better? and why?
Only using SQL in SAS would deprive you of the other 99+ percent of what the SAS system provides. And you would be stuck with something which is (by nature) much less performant than these other 99+ percent.
Please post your questions in a topic of your own. Old threads provide much less exposure to your questions, especially when the topic has nothing in common with your question.
You asked "how much effort should I put in learning SAS commands? Is it better to use PROC SQL and what I already know or using SAS language is better?"
SAS SQL is a little different then other systems' SQL. You can use SAS functions and some SAS file options within SAS SQL.
SAS Base, in some cases, is shorter in code and more efficient. Sas Base contains statements (commands), functions and many procedures.
Some of these code may differ depending on the SAS platform you use.
You should look for a learning program in order to progress efficiently to get a good experience.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.