This is a solution!! Probably a bit too much for the knowledge the candidate is expected to have, even the functions used are part of the exam, so it might be correct.
The way to highlight that part of the code and then execute it only, can't work in the exam @PaigeMiller .
That's because in the advanced programming exam, you save a sas program for each answer, and a macro program provided before evaluates your sas program returning a 3-digits code, which has to be insert as answer into a cell. So the whole program is compiled, leaving no possibility to highlight it.