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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.