SAS Interview Questions and Answers -4
Foreword: What a nickname for people using SAS: "semicolon" professoinals!
Informats vs. formats
If you appreciate the distinction between informats and formats, it shows
You can focus on details
It doesn't confuse you that two routines have the same name
You have some idea of what is going on when a SAS program runs TRANSPOSE procedure
The TRANSPOSE procedure has a few important uses, but questions about it
usually don't have that much to do with the procedure itself. The intriguing
characteristic of the TRANSPOSE procedure is that input data values
determine the names of output variables.
The implication of this is that if
the data values are incorrect, the program could end up with the wrong
output variables. In what other ways does a program depend on having valid
or correct data values as a starting point? What does it take to write a
program that will run no matter what input data values are supplied?
A question about the PUT function might seem to be a trick question, but it
is not meant to be. Beyond showing that you aren't confused by two things as
different as a statement and a function having the same name, your
discussion of the PUT function can show:
An understanding of what formats are
Your experience in creating variables in data step statements
Important SAS trivia
Some SAS trivia may be important to know in a technical interview, even
though it may never come up in your actual SAS programming work.
MERGE is a data step statement only. There is no MERGE procedure.
“PROC MERGE” is a mythical construction created years ago by Rhena
Seidman, and if you are asked about it in a job interview, it is meant as a
It is possible to use the MERGE statement without a BY statement,
but this usually occurs by mistake.
SAS does not provide an easy way to create a procedure in a SAS
program. However, it is easy to define informats and formats and use them in
the same program. Beginning with SAS 9.2, the same is true of functions.
The MEANS and SUMMARY procedures are identical except for the
defaults for the PRINT option and VAR statement.
Much of the syntax of the TABULATE procedure is essentially the
same of that of the SUMMARY procedure.
CARDS is another name for DATALINES (or vice versa).
“DATA _NULL_” is commonly used as a code word to refer to data
step programming that creates print output or text data files.
The program data vector (PDV) is a logical block of data that
contains the variables used in a data step or proc step. Variables are added
to the program data vector in order of appearance, and this is what
determines their position (or variable number) attribute.
SAS Interview QA: Data Step to Join Datasets
SAS Interview Questions -3: Procedure vs. macro