First. and Last. are used to identify the first and last records in a group, where the grouping variables are defined in the BY statement and that's how SAS knows when to reset the count variables.
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!