A SAS programmer needs to pass a dynamic list of variables to a macro that builds a model. Which SAS macro technique allows iterating over a space-delimited list of variable names?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — a is correct because %DO %WHILE combined with %SCAN(&list, &i, ' ') iterates through each token in a space-delimited macro variable list, which is the idiomatic SAS approach. B retrieves metadata but does not provide iteration logic.
Full explanation below image
Full Explanation
A is correct because %DO %WHILE combined with %SCAN(&list, &i, ' ') iterates through each token in a space-delimited macro variable list, which is the idiomatic SAS approach. B retrieves metadata but does not provide iteration logic. C stores a value in one macro variable but does not handle iteration over a list. D is wrong because PROC HPLOGISTIC does not natively parse comma-delimited macro variable lists for variable names.