BookmarkSubscribeRSS Feed
jaliu
Quartz | Level 8

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?

8 REPLIES 8
PaigeMiller
Diamond | Level 26

You keep jumping between "lines" and "statements". Which is it? These are not the same, and I doubt "lines" is meaningful in any event.

--
Paige Miller
jaliu
Quartz | Level 8

This is pasted verbatim from the certification book. So, apparently I am not the only one confused by their material.

Tom
Super User Tom
Super User

@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.

Tom
Super User Tom
Super User

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.

jaliu
Quartz | Level 8
I agree, for them to add that doesn't make any sense, is wrong, and only confuses students.
Tom
Super User Tom
Super User

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.

Tom
Super User Tom
Super User

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.

Panagiotis
SAS Employee

What page number in the certification book is this 'lines' on?

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

LIBNAME 101

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.

Discussion stats
  • 8 replies
  • 1784 views
  • 0 likes
  • 4 in conversation