When setting a data set, the BY statement can be used to generate special variables known as the FIRST. and LAST. variables. These variables, which are only available in the program data vector, mark the beginning and end of the by groups by which the data set was set. These variables can be used for a variety of different programming tasks. Here we describe these variables and illustrate their use via an example.
This video covers essential content for the course.