How many statements does the following SAS program contain?
proc print data=cert.admit label double;
var ID Name Sex Age; where Sex=F;
label Sex='Gender'; run;
The solution says "the PROC PRINT statement (two lines long);" but it looks like one line for the proc print. What am i missing?
You keep jumping between "lines" and "statements". Which is it? These are not the same, and I doubt "lines" is meaningful in any event.
This is pasted verbatim from the certification book. So, apparently I am not the only one confused by their material.
@jaliu wrote:
This is pasted verbatim from the certification book. So, apparently I am not the only one confused by their material.
What "certification book"? If you got it from SAS check if there is a feedback link where you can tell them about mistakes in their document. If you got it from someone else then perhaps you should switch sources for your preparation materials.
The way you have presented that code there are three LINES, but in general LINES have no meaning in SAS code.
There are 5 statements.
Two of the five statements are unique to PROC PRINT. The PROC PRINT statement itself and the VAR statement. (Although there are a lot of other PROC's that also use a VAR statement each one will have their own variations on the syntax and options.)
The other three statements ( WHERE LABEL RUN) are generally supported by every procedure and so are not unique to PROC PRINT.
Your subject is "Number of lines in a statement".
None of those statements use more than one line. And some of them are only using part of a line as there is another statement on the same line.
What page number in the certification book is this 'lines' on?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.
Find more tutorials on the SAS Users YouTube channel.