A SAS programmer uses the following code to create a macro variable from a dataset count: PROC SQL; SELECT COUNT(*) INTO :nobs TRIMMED FROM mydata; QUIT; What does TRIMMED accomplish in this context?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — a is correct because TRIMMED in the INTO clause of PROC SQL removes leading and trailing blanks from the stored value, so the macro variable :nobs contains '1234' rather than ' 1234 '. This avoids macro resolution issues caused by embedded spaces.
Full explanation below image
Full Explanation
A is correct because TRIMMED in the INTO clause of PROC SQL removes leading and trailing blanks from the stored value, so the macro variable :nobs contains '1234' rather than ' 1234 '. This avoids macro resolution issues caused by embedded spaces. B is wrong because TRIMMED applies to the string representation of the number stored in the macro variable, not to the rows counted. C and D are fabricated interpretations with no basis in SAS SQL syntax.