![The difference between CLASS statements and BY statements in SAS](https://blogs.sas.com/content/iml/files/2018/02/ClassVsBy2-640x336.png)
When I first learned to program in SAS, I remember being confused about the difference between CLASS statements and BY statements. A novice SAS programmer recently asked when to use one instead of the other, so this article explains the difference between the CLASS statement and BY variables in SAS