In reply to Peter Lancashire.

Thanks for writing. Yes, I didn't want the example to look too complicated, but you can automate this process by using PROC SQL to read the tick marks into a macro variable. See the section "Read values into a SAS macro variable" in the article "Create a SAS macro variable that contains a list of values."