Discussion:
Help needed with some SAS interview questions!
(too old to reply)
sa polo
2006-03-31 03:25:49 UTC
Permalink
=A0=0AHi All,=0A=0AI am preparing for a SAS interview and i have a few que=
stions to which i do not know the answers, would someone please help me out=
.=0A=0A1) Under what circumstances would you code a SELECT construct inste=
ad of IF statements?=0A=0A2) What is the one statement to set the criteria =
of data that can be coded in any step?=0A=0A3)What is the effect of the OPT=
IONS statement ERRORS=3D1?=0A=0A4)What's the difference between VAR A1 - A4=
and VAR A1 -- A4 ?=0A=0A5)Identify statements whose placement in the DATA =
step is critical.=0A=0A6)Name statements that function at both compile and =
execution time.=0A=0A7)Does SAS 'Translate' (compile) or does it 'Interpret=
'? Explain.=0A=0A8)Name statements that function at both compile and execut=
ion time.=0A=0A9)What does the RUN statement do?=0A=0A10)Why is SAS conside=
red self-documenting?=0A=0A11)What are some good SAS programming practices =
for processing very large data sets?=0A=0A12)What are some problems you mig=
ht encounter in processing missing values?=0A In Data steps? Arithmetic? Co=
mparisons? Functions? Classifying data?=0A=0A13)What is the different betwe=
en functions and PROCs that calculate the same simple descriptive statistic=
s?=0A=0A14)If you were told to create many records from one record, show ho=
w you would do this using arrays and with PROC=0ATRANSPOSE?=0A=0A15)What is=
a method for assigning first.VAR and last.VAR to the BY group variable on =
unsorted data?=0A=0A16)What is the order of application for output data set=
options, input data set options and SAS statements?=0A=0A17)What is the or=
der of evaluation of the comparison operators: + - * / ** ( ) ?=0A=0A18)How=
do you debug and test your SAS programs?=0A=0A19)How can you put a =93trac=
e=94 in your program?=0A=0A20)Have you ever used the SAS Debugger?=0A=0A21)=
What other SAS features do you use for error trapping and data validation?=
=0A=0A22)How would you combine 3 or more tables with different structures?=
=0A=0AAll help is much appreciated as usual.=0A=0AThanks,=0ASa Polo
Howard Schreier <hs AT dc-sug DOT org>
2006-03-31 04:37:59 UTC
Permalink
If you know nothing about any of these, then perhaps it would be a
disservice to the prospective employer to coach you.

More likely, you do know some things about some of these topics. Then you
should articulate what you do know and present fewer, narrower questions
here.

On Fri, 31 Mar 2006 03:25:49 -0000, sa polo <***@REDIFFMAIL.COM> wrote:
Hi All,

I am preparing for a SAS interview and i have a few questions to which i do
not know the answers, would someone please help me out .

1) Under what circumstances would you code a SELECT construct instead of IF
statements?

2) What is the one statement to set the criteria of data that can be coded
in any step?

3)What is the effect of the OPTIONS statement ERRORS=1?

4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?

5)Identify statements whose placement in the DATA step is critical.

6)Name statements that function at both compile and execution time.

7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.

8)Name statements that function at both compile and execution time.

9)What does the RUN statement do?

10)Why is SAS considered self-documenting?

11)What are some good SAS programming practices for processing very large
data sets?

12)What are some problems you might encounter in processing missing values?
In Data steps? Arithmetic? Comparisons? Functions? Classifying data?

13)What is the different between functions and PROCs that calculate the
same simple descriptive statistics?

14)If you were told to create many records from one record, show how you
would do this using arrays and with PROC
TRANSPOSE?

15)What is a method for assigning first.VAR and last.VAR to the BY group
variable on unsorted data?

16)What is the order of application for output data set options, input data
set options and SAS statements?

17)What is the order of evaluation of the comparison operators: + - * / **
( ) ?

18)How do you debug and test your SAS programs?

19)How can you put a “trace” in your program?

20)Have you ever used the SAS Debugger?

21)What other SAS features do you use for error trapping and data
validation?

22)How would you combine 3 or more tables with different structures?

All help is much appreciated as usual.

Thanks,
Sa Polo
Pardee, Roy
2006-03-31 20:21:37 UTC
Permalink
Number 10 made me laugh. Is the answer "so that I don't have to
document my sas programs"?

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
Howard Schreier <hs AT dc-sug DOT org>
Sent: Thursday, March 30, 2006 8:38 PM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: Help needed with some SAS interview questions!


If you know nothing about any of these, then perhaps it would be a
disservice to the prospective employer to coach you.

More likely, you do know some things about some of these topics. Then
you should articulate what you do know and present fewer, narrower
questions here.

On Fri, 31 Mar 2006 03:25:49 -0000, sa polo <***@REDIFFMAIL.COM>
wrote:
Hi All,

I am preparing for a SAS interview and i have a few questions to which i
do not know the answers, would someone please help me out .

1) Under what circumstances would you code a SELECT construct instead of
IF statements?

2) What is the one statement to set the criteria of data that can be
coded in any step?

3)What is the effect of the OPTIONS statement ERRORS=1?

4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?

5)Identify statements whose placement in the DATA step is critical.

6)Name statements that function at both compile and execution time.

7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.

8)Name statements that function at both compile and execution time.

9)What does the RUN statement do?

10)Why is SAS considered self-documenting?

11)What are some good SAS programming practices for processing very
large data sets?

12)What are some problems you might encounter in processing missing
values? In Data steps? Arithmetic? Comparisons? Functions? Classifying
data?

13)What is the different between functions and PROCs that calculate the
same simple descriptive statistics?

14)If you were told to create many records from one record, show how you
would do this using arrays and with PROC TRANSPOSE?

15)What is a method for assigning first.VAR and last.VAR to the BY group
variable on unsorted data?

16)What is the order of application for output data set options, input
data set options and SAS statements?

17)What is the order of evaluation of the comparison operators: + - * /
** ( ) ?

18)How do you debug and test your SAS programs?

19)How can you put a "trace" in your program?

20)Have you ever used the SAS Debugger?

21)What other SAS features do you use for error trapping and data
validation?

22)How would you combine 3 or more tables with different structures?

All help is much appreciated as usual.

Thanks,
Sa Polo
Jack Hamilton
2006-04-01 06:38:05 UTC
Permalink
Post by sa polo
Hi All,
I am preparing for a SAS interview and i have a few questions to which i do not know the answers, would someone please help me out .
1) Under what circumstances would you code a SELECT construct instead of IF statements?
2) What is the one statement to set the criteria of data that can be coded in any step?
There is no such statement, unless you want to count OPTIONS OBS=0;

They might be looking for the WHERE statement, but that would not be
correct.
Post by sa polo
3)What is the effect of the OPTIONS statement ERRORS=1?
4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?
5)Identify statements whose placement in the DATA step is critical.
Rather an open-ended question. I don't think I could name all the data
step statements without a reference manual. Even if I could, I wouldn't
be able to say, for example, that the placement of a SET statement or a
BY statement is always critical, even though sometimes it is.
Post by sa polo
6)Name statements that function at both compile and execution time.
7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
Didn't question 6 just say that it compiles?

In any case, it may be an interesting question, but it's not an
important one for working programmers.
Post by sa polo
8)Name statements that function at both compile and execution time.
Trying to check if I've changed my mind since question 6?
Post by sa polo
9)What does the RUN statement do?
10)Why is SAS considered self-documenting?
Who considers it self-documenting?
Post by sa polo
11)What are some good SAS programming practices for processing very large data sets?
And why would they not be good programming practices for small data sets?
Post by sa polo
12)What are some problems you might encounter in processing missing values?
In Data steps? Arithmetic? Comparisons? Functions? Classifying data?
13)What is the different between functions and PROCs that calculate the same simple descriptive statistics?
What could they be getting at with that question?
Post by sa polo
14)If you were told to create many records from one record, show how you would do this using arrays and with PROC
TRANSPOSE?
And while we're at it, in PROC SQL?
Post by sa polo
15)What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
Bad question.
Post by sa polo
16)What is the order of application for output data set options, input data set options and SAS statements?
What is that question supposed to mean?
Post by sa polo
17)What is the order of evaluation of the comparison operators: + - * / ** ( ) ?
And what should you do to avoid having to know such trivia?
Post by sa polo
18)How do you debug and test your SAS programs?
19)How can you put a “trace” in your program?
20)Have you ever used the SAS Debugger?
21)What other SAS features do you use for error trapping and data validation?
22)How would you combine 3 or more tables with different structures?
Most of the rest of the questions have been covered in SUGI papers.
sa polo
2006-04-03 02:17:13 UTC
Permalink
Hi,=0A=0AI would really like to know the answers to these questions....=0A1=
) Under what circumstances would you code a SELECT construct instead of IF =
statements?=0A=0A2) What is the one statement to set the criteria of data t=
hat can be=0Acoded in any step?=0A=0A3)Name statements that function at bot=
h compile and execution time.=0A=0A4)How would you combine 3 or more tables=
with different structures?=0A=0AThanks,=0ASa Polo=0AOn Sat, 01 Apr 2006 Pa=
rdee,Roy wrote :=0A>Number 10 made me laugh. Is the answer "so that I don'=
t have to=0A>document my sas programs"?=0A>=0A>-----Original Message-----=
=0A> From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of=
=0A>Howard Schreier <hs AT dc-sug DOT org>=0A>Sent: Thursday, March 30, 200=
6 8:38 PM=0A>To: SAS-***@LISTSERV.UGA.EDU=0A>Subject: Re: Help needed with so=
me SAS interview questions!=0A>=0A>=0A>If you know nothing about any of the=
se, then perhaps it would be a=0A>disservice to the prospective employer to=
coach you.=0A>=0A>More likely, you do know some things about some of these=
topics. Then=0A>you should articulate what you do know and present fewer, =
narrower=0A>questions here.=0A>=0A>On Fri, 31 Mar 2006 03:25:49 -0000, sa p=
olo <***@REDIFFMAIL.COM>=0A>wrote:=0A>=0A> >=0A>Hi All,=0A>=0A>I am pr=
eparing for a SAS interview and i have a few questions to which i=0A>do not=
know the answers, would someone please help me out .=0A>=0A>1) Under what =
circumstances would you code a SELECT construct instead of=0A>IF statements=
?=0A>=0A>2) What is the one statement to set the criteria of data that can =
be=0A>coded in any step?=0A>=0A>3)What is the effect of the OPTIONS stateme=
nt ERRORS=3D1?=0A>=0A>4)What's the difference between VAR A1 - A4 and VAR A=
1 -- A4 ?=0A>=0A>5)Identify statements whose placement in the DATA step is =
critical.=0A>=0A>6)Name statements that function at both compile and execut=
ion time.=0A>=0A>7)Does SAS 'Translate' (compile) or does it 'Interpret'? E=
xplain.=0A>=0A>8)Name statements that function at both compile and executio=
n time.=0A>=0A>9)What does the RUN statement do?=0A>=0A>10)Why is SAS consi=
dered self-documenting?=0A>=0A>11)What are some good SAS programming practi=
ces for processing very=0A>large data sets?=0A>=0A>12)What are some problem=
s you might encounter in processing missing=0A>values? In Data steps? Arit=
hmetic? Comparisons? Functions? Classifying=0A>data?=0A>=0A>13)What is the =
different between functions and PROCs that calculate the=0A>same simple des=
criptive statistics?=0A>=0A>14)If you were told to create many records from=
one record, show how you=0A>would do this using arrays and with PROC TRANS=
POSE?=0A>=0A>15)What is a method for assigning first.VAR and last.VAR to th=
e BY group=0A>variable on unsorted data?=0A>=0A>16)What is the order of app=
lication for output data set options, input=0A>data set options and SAS sta=
tements?=0A>=0A>17)What is the order of evaluation of the comparison operat=
ors: + - * /=0A>** ( ) ?=0A>=0A>18)How do you debug and test your SAS progr=
ams?=0A>=0A>19)How can you put a "trace" in your program?=0A>=0A>20)Have yo=
u ever used the SAS Debugger?=0A>=0A>21)What other SAS features do you use =
for error trapping and data=0A>validation?=0A>=0A>22)How would you combine =
3 or more tables with different structures?=0A>=0A>All help is much appreci=
ated as usual.=0A>=0A>Thanks,=0A>Sa Polo=0A
David L Cassell
2006-04-03 06:18:18 UTC
Permalink
Post by sa polo
I would really like to know the answers to these questions...
1) Under what circumstances would you code a SELECT construct instead of IF
statements?
If you have a long sequence of If-THEN-ELSE statements which cannot be
conveniently recoded as a mathematical formula, or as a straightforward
macro function, or as a nice clean format, or . . . .
Post by sa polo
2) What is the one statement to set the criteria of data that can be
coded in any step?
'the criteria of data' ??? That doesn't mean anything. Maybe they meant
the WHERE statement, but I would have called them on that one. And
been promptly ejected by security.
Post by sa polo
4)How would you combine 3 or more tables with different structures?
It might not be POSSIBLE to combine such tables. Didn't they give you
any hints at all on this one? Matching keys? Satellite data? Size of data
sets? Type of database structure? Merge vs. append vs. set vs. interleave?
Howard and Paul and Sig could write a small novel on this one and perhaps
*still* not hit the one whacko concept the writer had in mind.

These are some of the worst SAS interview questions I have ever seen.
Thanks for sharing them.

David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
Peter Flom
2006-04-03 12:25:03 UTC
Permalink
wrote

<<<
I would really like to know the answers to these questions....
1) Under what circumstances would you code a SELECT construct instead
of IF statements?
I wouldn't. I find SELECT hard to read, and IF easy to read, so I use
IF.

<<<
2) What is the one statement to set the criteria of data that can be
coded in any step?
Criteria of data is a silly phrase. Were the questions written by
someone who speaks English? Or perhaps these are a translation? I
notice that the name of the poster 'Sa Polo' is not a common one in
English.....

They might mean WHERE, I guess. But it's a silly question

<<<
4)How would you combine 3 or more tables with different structures?
Answer 1) I would not do this.
Answer 2) If my pointy haired boss insisted, I would do it VERY
CAREFULLY and with a LOT OF WARNINGS. And then I might start looking
for a new job.

OK, those are probably not the answers you wanted, but what can one do?
My real answer is to remember that an interview goes both ways: You are
interviewing them at the same time as they are interviewing you. To me,
the questions you posed indicate that it's not a job I want

Peter




Peter L. Flom, PhD
Assistant Director, Statistics and Data Analysis Core
Center for Drug Use and HIV Research
National Development and Research Institutes
71 W. 23rd St
http://cduhr.ndri.org
www.peterflom.com
New York, NY 10010
(212) 845-4485 (voice)
(917) 438-0894 (fax)
t***@GMAIL.COM
2006-04-03 14:22:56 UTC
Permalink
Next time you are looking for the answers Please do not paste the questions
from another web site even if you do try them first and let us know what is
Ur answer and we can say yes or no any way here are the answers I think

1) Under what circumstances would you code a SELECT construct instead of IF
statements?
A: I think Select statement are used when you are using one condtion to
compare with several condtions like

select pass
when Physics >60
when math > 100
when English = 50;
otherwise fail;
( something like this may be with little bit sintax error )

2) What is the one statement to set the criteria of data that can be coded
in any step?

Well looking at your questions I am confused what do U mean by any step do
U mean datastep or procedure , so I am not sure but my guess is you can use
options firstobs = 1 obs = 500 to restrict the data or it might be where
statement inside data or procedure statement. ( Are there any more gurus
out there to correct me )

3)What is the effect of the OPTIONS statement ERRORS=1?
A) I am not sure what exactly it Does so on editor I used proc options ;
run; to see in the log all the options of the sas system it came up with
this
"ERRORS=1.Maximum number of observations for which complete error messages
are printed"

4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?
A: Refer to the Little SAS book I read in that book but I forgot right now
I think it how you select list of character var and other one I am not
sure .
5)Identify statements whose placement in the DATA step is critical.
A:
6)Name statements that function at both compile and execution time.
A) I do not know
7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
A) I do not know
8)Name statements that function at both compile and execution time.
A)Answer for this is the repeat of 6
9)What does the RUN statement do?
a)When SAS editor looks at Run it starts compilling the data or proc step,
if you have more than one data step or proc step or if you have a proc step
following the data step then you can avoid the usage of the run statement.

10)Why is SAS considered self-documenting?
A) SAS is considered self documenting because during the compilation time
it creates and stores all the information about the data set like the time
and date of the data set creation later No. of the variables later labels
all that kind of info inside the dataset and you can look at that info
using proc contents procedure

11)What are some good SAS programming practices for processing very large
data sets?
A) Sort them once, can use firstobs = and obs = , I do not more may be
somebody else can answer that

12)What are some problems you might encounter in processing missing values?
In Data steps? Arithmetic? Comparisons? Functions? Classifying data?
A) You can do any kind of arithmetic operations without using the SAS
funtions when dealing the with the missing numeric data ? regarding
character data I DO NOT KNOW , Classifying then both the types (asce)
missing values always have lowest order so come in at the top so that might
cause the problem................

13)What is the different between functions and PROCs that calculate the
same simple descriptive statistics?

A) Functions can used inside the data step and on the same data set but
with proc's you can create a new data sets to output the results. May be
more ...........

14)If you were told to create many records from one record, show how you
would do this using arrays and with PROC
TRANSPOSE?

A) I would use TRANSPOSE if the varibles are less use arrays if the var are
more ................. depends

15)What is a method for assigning first.VAR and last.VAR to the BY group
variable on unsorted data?

A) In Unsorted data you can't use First. or Last.

16)What is the order of application for output data set options, input data
set options and SAS statements?
A) I do not know How to explain that

17)What is the order of evaluation of the comparison operators: + - * / **
( ) ?
A) read the little SAS book

18)How do you debug and test your SAS programs?
A) First thing is look into Log for errors or warning or uninint or NOTE in
soem cases or use the debugger in sas data step.

19)How can you put a “trace” in your program?
A ) I do not know
20)Have you ever used the SAS Debugger?
A) Yes when I feeling sleepy .

21)What other SAS features do you use for error trapping and data
validation?
A) Check the Log and for data validation things like Proc Freq, Proc means
or some times proc print to look how the data looks like ........

22)How would you combine 3 or more tables with different structures?
A) I think sort them with a common variables and use merge statement. I am
not sure what you mean different structures.
Sigurd Hermansen
2006-04-03 14:41:20 UTC
Permalink
Sa Polo:
You'll find the answers to these questions in SAS manuals:
3)What is the effect of the OPTIONS statement ERRORS=1?

4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?

9)What does the RUN statement do?

15)What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

17)What is the order of evaluation of the comparison operators: + - * / ** ( ) ?
Post by sa polo
1) Under what circumstances would you code a SELECT construct instead of IF statements?
One circumstance would be when you are writing a SAS SQL query.
Post by sa polo
2) What is the one statement to set the criteria of data that can be coded in any step?
How about DATA _NULL_; ?
Post by sa polo
5)Identify statements whose placement in the DATA step is critical.
DATA and RUN. Did I leave out the semicolon?
Post by sa polo
6)Name statements that function at both compile and execution time.
I'll go with the semicolon here as well.
Post by sa polo
7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
SAS compiles interpreted program vectors, and it interprets compiled program vectors, and, until a few weeks from now when SAS Macro becomes obsolete, resolves Macro statements to construct interpreted program vector compilations. To bind values to labels as late as possible, SAS doesn't compile anything until it has to do so. I could go on ...
Post by sa polo
8)Name statements that function at both compile and execution time.
I still like the semicolon for questions like this. (Watch out for the old trick of asking the same question twice.)
Post by sa polo
9)What does the RUN statement do?
The same thing it did under 5).
Post by sa polo
10)Why is SAS considered self-documenting?
Because it does what it does, and there's no explaining that. It's the Popeye Principle in action (I yam what I yam).
Post by sa polo
11)What are some good SAS programming practices for processing very large data sets?
- Minimize disk space and memory usage;
- Don't use too much CPU time either;
- Work late at night. When you bring down the operating system and the network, you have time to get away.
Post by sa polo
12)What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data?
You tend to get missing values in results. Don't you hate that!
Post by sa polo
13)What is the different between functions and PROCs that calculate the same simple descriptive statistics?
Functions have arguments and PROCs aren't that simple.
Post by sa polo
14)If you were told to create many records from one record, show how you would do this using arrays and with PROC TRANSPOSE?
What's wrong with the DoW loop? With it I don't even need one record to make many records!
Post by sa polo
16)What is the order of application for output data set options, input data set options and SAS statements?
In SAS SQL, 3,2,1.
Post by sa polo
17)What is the order of evaluation of the comparison operators: + - * / ** ( ) ?
4,4,3,3,2,1,1,5
Post by sa polo
18)How do you debug and test your SAS programs?
Oh? You have to debug and test self-documenting SAS programs? I never have found it necessary to do that since I began programming in SAS SQL.
Post by sa polo
19)How can you put a "trace" in your program?
In SAS/IML or SAS Data step?
20)Have you ever used the SAS Debugger?
See 18).
21)What other SAS features do you use for error trapping and data validation?
SAS SQL. That's my story and I'm sticking to it.
22)How would you combine 3 or more tables with different structures?
I'd send simplified tables with input statements, a concise problem description, and an example of the desired result to SAS-L.

Hope that helps, but I must warn you that I don't do particularly well on SAS interviews or certification exams. Perhaps it's nerves ...
Sig
-----Original Message-----
From: owner-sas-***@listserv.uga.edu [mailto:owner-sas-***@listserv.uga.edu] On Behalf Of sa polo
Sent: Thursday, March 30, 2006 10:26 PM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Help needed with some SAS interview questions!



Hi All,

I am preparing for a SAS interview and i have a few questions to which i do not know the answers, would someone please help me out .

1) Under what circumstances would you code a SELECT construct instead of IF statements?

2) What is the one statement to set the criteria of data that can be coded in any step?

3)What is the effect of the OPTIONS statement ERRORS=1?

4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?

5)Identify statements whose placement in the DATA step is critical.

6)Name statements that function at both compile and execution time.

7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.

8)Name statements that function at both compile and execution time.

9)What does the RUN statement do?

10)Why is SAS considered self-documenting?


12)What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data?

13)What is the different between functions and PROCs that calculate the same simple descriptive statistics?

14)If you were told to create many records from one record, show how you would do this using arrays and with PROC TRANSPOSE?

15)What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

16)What is the order of application for output data set options, input data set options and SAS statements?

17)What is the order of evaluation of the comparison operators: + - * / ** ( ) ?

18)How do you debug and test your SAS programs?

19)How can you put a "trace" in your program?

20)Have you ever used the SAS Debugger?

21)What other SAS features do you use for error trapping and data validation?

22)How would you combine 3 or more tables with different structures?

All help is much appreciated as usual.

Thanks,
Sa Polo
David L Cassell
2006-04-04 00:10:51 UTC
Permalink
***@WESTAT.COM amusingly replied (in small part):
[a number of very funny answers elided]
Post by sa polo
Post by Howard Schreier <hs AT dc-sug DOT org>
11)What are some good SAS programming practices for processing very large
data sets?
- Minimize disk space and memory usage;
- Don't use too much CPU time either;
- Work late at night. When you bring down the operating system and the
network, you have time to get away.
That's why - whenever I might crash a system - I always log in using the
alias 'Toby Dunn'.

:-)
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
David L Cassell
2006-04-04 00:07:55 UTC
Permalink
Post by t***@GMAIL.COM
Next time you are looking for the answers Please do not paste the questions
from another web site even if you do try them first and let us know what is
Ur answer and we can say yes or no any way here are the answers I think
Good point.

Also a good point would be not answering questions with poor answers.

I hate to chew people out in public, but most of your answers are wrong.
This is unfortunate, but since you put them out on SAS-L, I guess someone
is going to have to say something publicly.
Post by t***@GMAIL.COM
1) Under what circumstances would you code a SELECT construct instead of IF
statements?
A: I think Select statement are used when you are using one condtion to
compare with several condtions like
select pass
when Physics >60
when math > 100
when English = 50;
otherwise fail;
( something like this may be with little bit sintax error )
Are you thinking of CASE statements in SQL or something? Not that this is
acceptable syntax for the SQL case statement either.

If I had to compare against three conditions in order to decide a yes/no,
then I would NOT do it using SELECT statements.
Post by t***@GMAIL.COM
2) What is the one statement to set the criteria of data that can be coded
in any step?
Well looking at your questions I am confused what do U mean by any step do
U mean datastep or procedure , so I am not sure but my guess is you can use
options firstobs = 1 obs = 500 to restrict the data or it might be where
statement inside data or procedure statement. ( Are there any more gurus
out there to correct me )
I'm confused too, since the question was worded *spectacularly* poorly.
I tend to use the OPTIONS statement outside of steps, since it is not really
a step-level statement. So I would disagree with your answer. But who
knows
what the original author really wanted? Maybe WHERE.
Post by t***@GMAIL.COM
3)What is the effect of the OPTIONS statement ERRORS=1?
A) I am not sure what exactly it Does so on editor I used proc options ;
run; to see in the log all the options of the sas system it came up with
this
"ERRORS=1.Maximum number of observations for which complete error messages
are printed"
Good. Take a look in the SAS OnlineDoc under global options, and see
a more complete answer.
Post by t***@GMAIL.COM
4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?
A: Refer to the Little SAS book I read in that book but I forgot right now
I think it how you select list of character var and other one I am not
sure .
No. This is one which is *really* hard to look up in the docs. You have to
know what it is, and what it is called, in order to find it!

A1 -- A4 is a list which pulls in all variables starting with A1 and going
through the order the variables have in the PDV until you get to A4.
Post by t***@GMAIL.COM
5)Identify statements whose placement in the DATA step is critical.
Most of them can be in this category.
Post by t***@GMAIL.COM
6)Name statements that function at both compile and execution time.
A) I do not know
7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
A) I do not know
8)Name statements that function at both compile and execution time.
A)Answer for this is the repeat of 6
9)What does the RUN statement do?
a)When SAS editor looks at Run it starts compilling the data or proc step,
if you have more than one data step or proc step or if you have a proc step
following the data step then you can avoid the usage of the run statement.
Okay, I'm going to disagree again. Always put a RUN statement at the end
of a proc or data step, unless the step in 'interactive' and requires a QUIT
instead. The RUN statement - if it is without arguments - executes a block
of previously entered SAS statements. It may cause the program to resume
work, depending on the proc (like in the SAS/OR procs).
Post by t***@GMAIL.COM
10)Why is SAS considered self-documenting?
A) SAS is considered self documenting because during the compilation time
it creates and stores all the information about the data set like the time
and date of the data set creation later No. of the variables later labels
all that kind of info inside the dataset and you can look at that info
using proc contents procedure
That is probably the answer the writer had in mind.

I don't agree, but I think that is the target answer. Just having metadata
does not make a system self-documenting.
Post by t***@GMAIL.COM
11)What are some good SAS programming practices for processing very large
data sets?
A) Sort them once, can use firstobs = and obs = , I do not more may be
somebody else can answer that
I oppose the use of FIRSTOBS= and OBS= just because you have big data
sets. If all you're doing is testing your code, build a sample data set
which
is representative of the data problems. If you are not doing code testing,
then FIRSTOBS= and OBS= may cause you to lose out on data as you do
the processing. FIRSTOBS= and OBS= can be valuable tools, but not just
because the data are large.

And rather than sorting once, I would try not to sort at all, if it was not
needed. Depending on the problem and the data uses, I might recommend
indices instead, or hashing, or ...
Post by t***@GMAIL.COM
12)What are some problems you might encounter in processing missing values?
In Data steps? Arithmetic? Comparisons? Functions? Classifying data?
A) You can do any kind of arithmetic operations without using the SAS
funtions when dealing the with the missing numeric data ? regarding
character data I DO NOT KNOW , Classifying then both the types (asce)
missing values always have lowest order so come in at the top so that might
cause the problem................
I find that having the missing values sort out first is a big help, myself.
Post by t***@GMAIL.COM
13)What is the different between functions and PROCs that calculate the
same simple descriptive statistics?
A) Functions can used inside the data step and on the same data set but
with proc's you can create a new data sets to output the results. May be
more ...........
I'll disagree again. You can certainly create new data set as result output
in a data step too.

My guess is that the writer wanted something dopey like "functions in
data steps work on rows, while procs compute across columns." But
that's a guess.
Post by t***@GMAIL.COM
14)If you were told to create many records from one record, show how you
would do this using arrays and with PROC
TRANSPOSE?
A) I would use TRANSPOSE if the varibles are less use arrays if the var are
more ................. depends
I would say "This is stupid, the data are more usable if we don't do this"
and I would promptly be fired.
Post by t***@GMAIL.COM
15)What is a method for assigning first.VAR and last.VAR to the BY group
variable on unsorted data?
A) In Unsorted data you can't use First. or Last.
No, you can. Try it. Check out the NOTSORTED keyword.

But the FIRST. and LAST. variables will change each time the variable
value changes, so you have to be careful when using it. I believe that
Howard Schreier had a really clever use of this in SAS-L just a month or
two ago.
Post by t***@GMAIL.COM
16)What is the order of application for output data set options, input data
set options and SAS statements?
A) I do not know How to explain that
17)What is the order of evaluation of the comparison operators: + - * / **
( ) ?
A) read the little SAS book
18)How do you debug and test your SAS programs?
A) First thing is look into Log for errors or warning or uninint or NOTE in
soem cases or use the debugger in sas data step.
19)How can you put a “trace” in your program?
A ) I do not know
20)Have you ever used the SAS Debugger?
A) Yes when I feeling sleepy .
21)What other SAS features do you use for error trapping and data
validation?
A) Check the Log and for data validation things like Proc Freq, Proc means
or some times proc print to look how the data looks like ........
For data validation? How open-ended can you get? I've probably used
over 50 different procs for data validation at one time or another,
including
heavy stats and SAS/GRAPH. But I assume the original writer didn't want
a 200-page thesis on the subject.
Post by t***@GMAIL.COM
22)How would you combine 3 or more tables with different structures?
A) I think sort them with a common variables and use merge statement. I am
not sure what you mean different structures.
I'm not sure either, so I'd resist merging them until I got more information
from the end-users and database admins.

I understand that you wanted to help, but it really worries me that other
people would see your post and think your answers were fine, since no
one said anything about them.

Sorry to be such a curmudgeon,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
Alan Churchill
2006-04-04 00:32:35 UTC
Permalink
Ok, I have to dive in on a few but...I won't forward the whole article so my
average lines of response are lower ;-]

">>9)What does the RUN statement do?
Post by David L Cassell
Post by t***@GMAIL.COM
a)When SAS editor looks at Run it starts compilling the data or proc step,
if you have more than one data step or proc step or if you have a proc
step
Post by David L Cassell
Post by t***@GMAIL.COM
following the data step then you can avoid the usage of the run statement.
Okay, I'm going to disagree again. Always put a RUN statement at the end
of a proc or data step, unless the step in 'interactive' and requires a
QUIT
instead. The RUN statement - if it is without arguments - executes a block
of previously entered SAS statements. It may cause the program to resume
work, depending on the proc (like in the SAS/OR procs)."
I agree David. This is a HUGE pet peeve for me and makes it a bear to
decrypt SAS code. I have it figured out now but why SAS even allows people
to leave out the run or quit statement is beyond me.
Post by David L Cassell
Post by t***@GMAIL.COM
10)Why is SAS considered self-documenting?
A) SAS is considered self documenting because during the compilation time
it creates and stores all the information about the data set like the time
and date of the data set creation later No. of the variables later labels
all that kind of info inside the dataset and you can look at that info
using proc contents procedure
That is probably the answer the writer had in mind.
I don't agree, but I think that is the target answer. Just having metadata
does not make a system self-documenting.
Again David, I concur. SAS is NOT a self-documenting language. A
self-documenting language is typically object-oriented because they have an
understanding of themselves. For example, in .NET, the code comes with
reflection which enables the program to examine itself to determine its
makeup. Java is similar from my understanding. After trying to turn SAS
procs into objects, I don't know of any mechanism similar in SAS. It has
some metadata aspects around the data but nothing in the way of the
language.

Alan

Alan Churchill

Savian
"Bridging SAS and Microsoft Technologies"
http://www.savian.net


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of David L
Cassell
Nordlund, Dan (DSHS)
2006-04-04 02:18:58 UTC
Permalink
Post by Pardee, Roy
-----Original Message-----
L Cassell
Sent: Monday, April 03, 2006 5:11 PM
Subject: Re: Help needed with some SAS interview questions!
[a number of very funny answers elided]
Post by sa polo
Post by Howard Schreier <hs AT dc-sug DOT org>
11)What are some good SAS programming practices for processing very
large
Post by sa polo
data sets?
- Minimize disk space and memory usage;
- Don't use too much CPU time either;
- Work late at night. When you bring down the operating system and the
network, you have time to get away.
That's why - whenever I might crash a system - I always log in using the
alias 'Toby Dunn'.
:-)
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
David,

Is this part of your new evil master plan to move Toby's name to the top of
the list in next year's SAS-L stats? :-)

Dan

Daniel J. Nordlund
Research and Data Analysis
Washington State Department of Social and Health Services
Olympia, WA 98504-5204
toby dunn
2006-04-04 02:31:05 UTC
Permalink
Geez guys thanks alot. Well all I can say is I havent crashed a system in
while. On the other hand you would suprised how many ways there are.....



Toby Dunn





From: "Nordlund, Dan (DSHS)" <***@DSHS.WA.GOV>
Reply-To: "Nordlund, Dan (DSHS)" <***@DSHS.WA.GOV>
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: Help needed with some SAS interview questions!
Date: Mon, 3 Apr 2006 19:18:58 -0700
Post by Pardee, Roy
-----Original Message-----
David
Post by Pardee, Roy
L Cassell
Sent: Monday, April 03, 2006 5:11 PM
Subject: Re: Help needed with some SAS interview questions!
[a number of very funny answers elided]
Post by sa polo
Post by Howard Schreier <hs AT dc-sug DOT org>
11)What are some good SAS programming practices for processing very
large
Post by sa polo
data sets?
- Minimize disk space and memory usage;
- Don't use too much CPU time either;
- Work late at night. When you bring down the operating system and the
network, you have time to get away.
That's why - whenever I might crash a system - I always log in using the
alias 'Toby Dunn'.
:-)
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
David,

Is this part of your new evil master plan to move Toby's name to the top of
the list in next year's SAS-L stats? :-)

Dan

Daniel J. Nordlund
Research and Data Analysis
Washington State Department of Social and Health Services
Olympia, WA 98504-5204
David L Cassell
2006-04-04 05:53:46 UTC
Permalink
Post by Nordlund, Dan (DSHS)
Post by David L Cassell
That's why - whenever I might crash a system - I always log in using the
alias 'Toby Dunn'.
Is this part of your new evil master plan to move Toby's name to the top of
the list in next year's SAS-L stats? :-)
No, the evil plans are all over in the Evil Petting Zoo with Scott Evil and
his dad.

This is merely a quasi-evil plan.

I also plan to write Toby's name a lot, so it appears in Art's stats next
year.

I may also write other keywords in the same messages, so they'll show up
linked together when Larry Hoyle runs Text Miner on the archives again next
year. If Toby's really nice to me, they'll be words like 'macro' and 'good
answer'. If not. . .

:-)
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
Nat Wooding
2006-04-04 12:28:46 UTC
Permalink
Alan

I suspect that the run statement was added when SAS became available in
foreground mode in TSO. I don't recall seeing it before then. It probably
showed up, say, in the SAS '76 manual.

Nat



Alan Churchill
<***@SAVIAN.N
ET> To
Sent by: "SAS(r) SAS-***@LISTSERV.UGA.EDU
Discussion" cc
<SAS-***@LISTSERV.U
GA.EDU> Subject
Re: Help needed with some SAS
interview questions!
04/03/2006 08:32
PM


Please respond to
Alan Churchill
<***@SAVIAN.N
ET>






Ok, I have to dive in on a few but...I won't forward the whole article so
my
average lines of response are lower ;-]

">>9)What does the RUN statement do?
Post by David L Cassell
Post by t***@GMAIL.COM
a)When SAS editor looks at Run it starts compilling the data or proc
step,
Post by David L Cassell
Post by t***@GMAIL.COM
if you have more than one data step or proc step or if you have a proc
step
Post by David L Cassell
Post by t***@GMAIL.COM
following the data step then you can avoid the usage of the run
statement.
Post by David L Cassell
Okay, I'm going to disagree again. Always put a RUN statement at the end
of a proc or data step, unless the step in 'interactive' and requires a
QUIT
instead. The RUN statement - if it is without arguments - executes a
block
Post by David L Cassell
of previously entered SAS statements. It may cause the program to resume
work, depending on the proc (like in the SAS/OR procs)."
I agree David. This is a HUGE pet peeve for me and makes it a bear to
decrypt SAS code. I have it figured out now but why SAS even allows people
to leave out the run or quit statement is beyond me.
Post by David L Cassell
Post by t***@GMAIL.COM
10)Why is SAS considered self-documenting?
A) SAS is considered self documenting because during the compilation time
it creates and stores all the information about the data set like the
time
Post by David L Cassell
Post by t***@GMAIL.COM
and date of the data set creation later No. of the variables later labels
all that kind of info inside the dataset and you can look at that info
using proc contents procedure
That is probably the answer the writer had in mind.
I don't agree, but I think that is the target answer. Just having
metadata
Post by David L Cassell
does not make a system self-documenting.
Again David, I concur. SAS is NOT a self-documenting language. A
self-documenting language is typically object-oriented because they have an
understanding of themselves. For example, in .NET, the code comes with
reflection which enables the program to examine itself to determine its
makeup. Java is similar from my understanding. After trying to turn SAS
procs into objects, I don't know of any mechanism similar in SAS. It has
some metadata aspects around the data but nothing in the way of the
language.

Alan

Alan Churchill

Savian
"Bridging SAS and Microsoft Technologies"
http://www.savian.net


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of David
L
Cassell



-----------------------------------------
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.
Peter Flom
2006-04-04 13:04:02 UTC
Permalink
<<<
Post by Howard Schreier <hs AT dc-sug DOT org>
4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?
A: Refer to the Little SAS book I read in that book but I forgot right
now
Post by Howard Schreier <hs AT dc-sug DOT org>
I think it how you select list of character var and other one I am
not
Post by Howard Schreier <hs AT dc-sug DOT org>
sure .
No. This is one which is *really* hard to look up in the docs. You
have to know what it is, and what it is called, in order to find it!

A1 -- A4 is a list which pulls in all variables starting with A1 and
going
through the order the variables have in the PDV until you get to A4.
And of course, A1-A4 is A1, A2, A3 and A4

Leading to an error that I STILL make sometimes, forgetting an OF
when using some function (e.g
mean(A1-A4) is NOT NOT NOT = mean(of A1-A4)

and wouldn't it be nice to be able to do this with letter suffixes?
e.g if you had something like vara varb varc etc. but with variables
in between on the pdv, and wanted those 4? T here's the : operator, but
that also gets varq and so on)


<<<<
Post by Howard Schreier <hs AT dc-sug DOT org>
a)When SAS editor looks at Run it starts compilling the data or proc
step, if you have more than one data step or proc step or if you
have a proc step following the data step then you can avoid the usage
of the run statement.
Okay, I'm going to disagree again. Always put a RUN statement at the
end of a proc or data step, unless the step in 'interactive' and
requires a QUIT instead. The RUN statement - if it is without arguments
- executes a block of previously entered SAS statements. It may cause
the program to resume work, depending on the proc (like in the SAS/OR
procs).

Peter L. Flom, PhD
Assistant Director, Statistics and Data Analysis Core
Center for Drug Use and HIV Research
National Development and Research Institutes
71 W. 23rd St
http://cduhr.ndri.org
www.peterflom.com
New York, NY 10010
(212) 845-4485 (voice)
(917) 438-0894 (fax)
I didn't know the RUN statement took arguments! The things Il learn
here!

But I agree with David for a reason he didn't mention. Readability.



Peter
Ian Whitlock
2006-04-04 21:01:16 UTC
Permalink
In part, sa polo <***@rediffmail.com> wrote
I would really like to know the answers to these questions....
1) Under what circumstances would you code a SELECT construct
instead of IF statements?
2) What is the one statement to set the criteria of data that can
be coded in any step?
3)Name statements that function at both compile and execution
time.
4)How would you combine 3 or more tables with different
structures?
<<<<<<<<<<<<<<

1) Sig hit this one out of the park.

2) If I knew what "the criteria of data" are, I might be able to
help. Has anyone seen some data with criteria?

3) All SAS DATA step statements function at compile time,
although the only function of comments is to be eliminated from
the compile. Most statements usually cause something to happen
at execution time, even those that are considered to be non-
executable.

Now consider

if 0 then do ;
....
....
end ;

Do any of the statements inside the DO-block have a function at
execution time? In this sense almost all statements are capable
of having no function at execution time in some DATA step.
Perhaps a better way to ask the intent of 3) would be - What
statements can ***always*** be moved from an IF/THEN block to
before the block without causing any change in the result except
for possibly the order, size or type of some variables?

4) My answer would depend on the number of tables, since I would
probably handle 10,000 of them differently for 4 of them. There
are also problems with what it means to combine tables, and any
proper answer would surely depend on how the data sets are
structured. Perhaps:

data <one> ; set <one> ; run ;
data <two> ; set <two> ; run ;
data <three> ; set <three> ; run ;
...

safely combines three or more tables of any structure in one SAS
program. Anything else depends.

Ian Whitlock
David L Cassell
2006-04-04 21:32:41 UTC
Permalink
Post by Peter Flom
I didn't know the RUN statement took arguments! The things Il learn
here!
But I agree with David for a reason he didn't mention. Readability.
There are more reasons than that.

People who leave off RUN statements will find that their errors will
sometimes
show up in the 'wrong' place in the log, misleading them miserably, simply
because that lack of a RUN statement may defer the execution of a block
of code.

People who leave off RUN statements can also find themselves agonizing
over issues like when then can access macro variables created by CALL
SYMPUT().

David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Pardee, Roy
2006-04-05 17:20:20 UTC
Permalink
Actually, 'self-documenting' isn't a feature of the language, or
programming environment--it's a feature of the programmer.

Everything *I* write is self-documenting. It's breathtaking,
mind-blowing beautiful stuff. It's the code written by *other people*
that needs documentation. Honestly, I don't see how other people manage
to stay employed...

<g,d &r>

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
Alan Churchill
Sent: Monday, April 03, 2006 5:33 PM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: Help needed with some SAS interview questions!
Post by David L Cassell
Post by Howard Schreier <hs AT dc-sug DOT org>
10)Why is SAS considered self-documenting?
A) SAS is considered self documenting because during the compilation
time it creates and stores all the information about the data set like
the time and date of the data set creation later No. of the variables
later labels all that kind of info inside the dataset and you can look
at that info using proc contents procedure
That is probably the answer the writer had in mind.
I don't agree, but I think that is the target answer. Just having
metadata does not make a system self-documenting.
Again David, I concur. SAS is NOT a self-documenting language. A
self-documenting language is typically object-oriented because they have
an understanding of themselves. For example, in .NET, the code comes
with reflection which enables the program to examine itself to determine
its makeup. Java is similar from my understanding. After trying to turn
SAS procs into objects, I don't know of any mechanism similar in SAS. It
has some metadata aspects around the data but nothing in the way of the
language.

Alan

Alan Churchill

Savian
"Bridging SAS and Microsoft Technologies"
http://www.savian.net


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
David L Cassell
Sigurd Hermansen
2006-04-05 19:16:05 UTC
Permalink
Sa Polo:
OK. I'll try to help you with these four. While you have good answers
from some on SAS-L, I must admit that I have added to your confusion.

1). The SELECT statement in SAS Data step programming (and the CASE
clause in SQL) list conditions to check in a specific order. The first
true condition ends checking of conditions. It makes sense to use the
SELECT statement when checking mutually-exclusive and independent
conditions. IF statements may be clearer and allow more flexibility in
other situations. I find IF ... THEN ... ELSE ... blocks of logical
conditions better for nested conditions. Because all procedural programs
reduce to sequences of assignments, alternations (IF conditions), and
iterations (loops), one can write equivalent logical conditions several
different ways. Nothing different here in SAS as compared to other
programming environments, so IF you are struggling with these concepts,
THEN you may need a stronger background in programming methodology to
appreciate the question (or, in this specific case, to see that it comes
down largely to a matter of personal preferences);
2). I'll confirm that this question has lost a lot in translation or did
not make sense originally. Why try to give a meaningful answer to a
nonsensical question?
3). Read some of the posts on the 'compile vs. interpret' thread on
SAS-L. Thanks in part to Ian Whitlock's classic 'SAS Supervisor' paper,
accomplished SAS programmers understand that SAS Macro statements act on
the SAS program vector before it executes, that some DATA step
statements execute prior to others, no matter how ordered in a program,
and some execute at step boundaries. If you are looking for a quick and
simple answer, forget it. There ain't one;
4). Go ahead and choose three tables with different structures. Then
suggest a method that you would use to combine them. One might dream up
an infinite number of table structures and an infinite number of ways of
combining them. I don't see anything magic in SAS or otherwise in 3
tables or more.

Proving that a problem does not have a solution is much more difficult
than finding a contradiction in a proposed solution. Perhaps try a
response to 4). along the lines of "The answer would depend on specific
table structures, how table structures differ, and how one wants to
combine them. For example, joins of tables on common key values produce
different result than joins of tables on row order."

If you have a basic understanding of programming and some experience in
SAS, you should be able to work around gaps in your understanding of the
SAS System and the area of application. If you are trying to bluff your
way into a programming job, you'll have a better chance impersonating an
acrobat in the circus. Any experienced programmer can spot a beginner
right away.
Sig

-----Original Message-----
From: owner-sas-***@listserv.uga.edu [mailto:owner-sas-***@listserv.uga.edu]
On Behalf Of sa polo
Sent: Sunday, April 02, 2006 10:17 PM
To: Pardee,Roy
Cc: SAS-***@LISTSERV.UGA.EDU
Subject: Re: Re: Help needed with some SAS interview questions!


Hi,

I would really like to know the answers to these questions....
1) Under what circumstances would you code a SELECT construct instead of
IF statements?

2) What is the one statement to set the criteria of data that can be
coded in any step?

3)Name statements that function at both compile and execution time.

4)How would you combine 3 or more tables with different structures?

Thanks,
Sa Polo
Post by Pardee, Roy
Number 10 made me laugh. Is the answer "so that I don't have to
document my sas programs"?
-----Original Message-----
Howard Schreier <hs AT dc-sug DOT org>
Sent: Thursday, March 30, 2006 8:38 PM
Subject: Re: Help needed with some SAS interview questions!
If you know nothing about any of these, then perhaps it would be a
disservice to the prospective employer to coach you.
More likely, you do know some things about some of these topics. Then
you should articulate what you do know and present fewer, narrower
questions here.
Hi All,
I am preparing for a SAS interview and i have a few questions to which
i do not know the answers, would someone please help me out .
1) Under what circumstances would you code a SELECT construct instead
of IF statements?
2) What is the one statement to set the criteria of data that can be
coded in any step?
3)What is the effect of the OPTIONS statement ERRORS=1?
4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?
5)Identify statements whose placement in the DATA step is critical.
6)Name statements that function at both compile and execution time.
7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
8)Name statements that function at both compile and execution time.
9)What does the RUN statement do?
10)Why is SAS considered self-documenting?
11)What are some good SAS programming practices for processing very
large data sets?
12)What are some problems you might encounter in processing missing
values? In Data steps? Arithmetic? Comparisons? Functions? Classifying
data?
13)What is the different between functions and PROCs that calculate the
same simple descriptive statistics?
14)If you were told to create many records from one record, show how
you would do this using arrays and with PROC TRANSPOSE?
15)What is a method for assigning first.VAR and last.VAR to the BY
group variable on unsorted data?
16)What is the order of application for output data set options, input
data set options and SAS statements?
17)What is the order of evaluation of the comparison operators: + - * /
** ( ) ?
18)How do you debug and test your SAS programs?
19)How can you put a "trace" in your program?
20)Have you ever used the SAS Debugger?
21)What other SAS features do you use for error trapping and data
validation?
22)How would you combine 3 or more tables with different structures?
All help is much appreciated as usual.
Thanks,
Sa Polo
Loading...