Monday, April 2, 2018

My Top 21 SAS Interview Questions

SAS Programming Professionals,

With over 32 years of SAS programming experience, I have certainly faced a lot of SAS interview questions; as both interviewee and interviewer.  Perhaps that is why I love the spate of occasional postings purporting to show the Top X SAS Interview Questions.  I can never figure out just how the authors decided upon the exact number (X) of top interview questions.  Nor, can I determine whether most of those authors have any substantial grasp of SAS programming knowledge or whether they are simply creating click-bait for some product or service.  But, the Top X SAS Interview Questions posts are so funny that I never fail to read them.

Here is my own list of the Top 21 SAS Interview Questions:


1.      What does SAS stand for?

In the United States, SAS stands for the national anthem.

2.      What is more powerful, the DROP statement or the KEEP statement?

The DROP statement is more powerful because it has gravity on its side.

3.      How do you run a RUN statement?

In SAS Display Manager, you run the RUN statement by clicking on the RUN icon.

4.      Which do economists use more, the IMPORT or the EXPORT procedure?

In the United States, there are far more IMPORTs than EXPORTs.

5.      What is PROC THIRTEEN and how do you use it?

This is a trick question.  PROC THIRTEEN, the bad luck proc, sometimes known as “the black cat proc” or “the cracked mirror proc” is a mythical procedure that has never really been offered to SAS users.  It is purportedly designed to generate random inauspicious numbers for its users.  Though there are many rumors about the existence of PROC THIRTEEN, it cannot be found in SAS documentation, nor does it appear to be an undocumented feature of Base SAS.

6.      What is the advantage of sorted SAS data sets?

Sorted SAS data sets are already sorted so you do not have to sort them.

7.      Why is PROC CONTENTS sometimes referred to as the “411 procedure?”

PROC CONTENTS is sometimes called the “411 procedure” because it gives you all of the information you need about the files in a SAS directory.

8.      What is the result of running the following program:

data _null_;
input x $;
x=reverse(x);
put x;
datalines;
SAS
;;;;
run;

The result is: “SAS”.

9.      What SAS procedure rhymes with doormat?

FORMAT.

10.   Name the two geological DO statements and explain the reason for their nicknames.

The “DO WHILE” statement is known as the “Stalactite DO” since it is evaluated at the top.  The “DO UNTIL” statement is known as the “Stalagmite DO” since it is evaluated at the bottom.

11.   True or false:  You need apply for a Federal Explosive License (FEL) from the US Bureau of Alcohol, Tobacco, Firearms and Explosives, and receive special training to use PROC EXPLODE in your SAS programs?

False.

12.   Is it better to have one big SAS data set or many smaller SAS data sets?

It is much better to have many smaller SAS data sets because that makes it look like you have done more programming work.

13.   Which of the following is not a regular expression:
a.      I’ll be right back.
b.      Hold my beer and watch this.
c.       re = prxparse('/[bc]d(ef*g)+h[ij]k$/');x
d.      A day late and a dollar short.
e.      Fname = substr(fullname, 1,15);

The answer is E.

14.   Which SAS procedure best completes the following sentence:  The tugboat helped the container ship navigate its way into the _______.

CPORT.

15.   What is the most common use for the SUBSTR function?

The overwhelming majority of SAS programmers that use the SUBSTR function use it to extract a substring from an argument.

16.   Under what circumstances can you code a RUN statement before a DATA statement?

A RUN statement can be coded before a DATA statement when the RUN statement belongs to a previous DATA step or PROC step.

17.   Which of the following is a valid type of SAS merge:
a.      Heaps to tons
b.      Countless to oodles
c.       Several to some
d.      One to many
e.      Numerous to a handful

The answer is D.

18.   Who is the Co-Founder and Chief Executive Officer of the SAS Institute?
a.      Jonny Goodtimes
b.      Jakob Gutenacht
c.       Dr. James Goodnight
d.      Benito Androssi
e.      Jamie Goldenboy

The answer is C.

19.   Which of the following prepositions occurs as a valid statement in the most SAS procedures:
a.      UNDERNEATH
b.      THROUGH
c.       BEYOND
d.      BETWEEN
e.      BY

The answer is E.

20.   Is the following statement true or false:  If you code five or more of the same variables on both a DROP and a KEEP statement in a DATA step, your program will catch on fire upon execution.

The statement is:  False

21.   Is the following statement true or false:  You should be very wary of lists posted on social media that purport to show the top SAS interview questions.

The statement is: True


Best of luck in all your SAS endeavors!


---MMMMIIIIKKKKEEEE
(aka Michael A. Raithel)
Author of the new cult classic for computer programmers:  It Only Hurts When I Hit <ENTER>
Print edition:  http://tinyurl.com/z8bzx2e 
Kindle edition: http://tinyurl.com/zypgqa7 

1 comment:

  1. but don't forget sall barr and helwig....
    bob mcconn.....

    ReplyDelete