I am a beginner. For some simple sas program, should I always count the number of semicolons?
Thanks!
Yes. I agree.
Counting the number of semicolons will get you close. However, one can put in a bare semicolon. It is effectively a "null" statement so I am not sure how useful that would be to your (unstated) need.
Also, when you have data inline with the program, there can be semicolons in the data that are not statements (that were you see the "card4" statement.)
Lastly, one can have semicolons in literals and they are not statements.
If we exclude the last two cases you mentioned, is a "null" statement also one type of statement?
Thank you!
One situation you need to consider is Annotation ( /* */ * ...; ) which can also contain many semicolon .
Let's muddy the waters a bit more then. What if the program calls a macro? Each macro call can generate thousands of SAS statements. The macro call itself may not contain a semicolon at all, but the generated statements certainly will. Should that add to your statement count?
And some more mud. What about semicolons in quoted strings?
And don't forget the contents of %INCLUDE files;
How will this information be used? That might helpfilter responses.
Thank you! I am a beginner and preparing for sas base exam. Therefore, the question I asked are based on some very simply sas programs. I didn't think that what I asked might not be correct in so many cases. But their anwsers are helpful for my future study.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.