Fundamental SAS Concepts
What this topic covers
Understand how DATA and PROC steps and SAS statements work, then read the SAS log to distinguish syntax errors from logic errors. Recognize when valid code can still produce no observations.
How does a syntax error differ from a logic error in SAS code?
A syntax error breaks SAS language rules, so the log shows an ERROR and the step does not run. A logic error runs without complaint but gives wrong results. For example, two sequential subsetting IF statements that both must pass can write zero observations.