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?
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.