[…] and the DATA step: You can sort the data by the group variable and by the target variable. Then use BY-group processing and the FIRST.variable indicator variable in a DATA step to extract the relevant …