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.
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.