Anda di halaman 1dari 23

1.

What SAS statements would you code to read an Accenture 0 14


external raw data file to a DATA step? 2. How do
you read in the variables that you need? 3. Are you
familiar with special input delimiters? How are
they used? 4. If reading a variable length file with
fixed input, how would you prevent SAS from
reading the next record if the last variable didn’t
have a value? 5. What is the difference between an
informat and a format? Name three informats or
formats. 6. Name and describe three SAS functions
that you have used, if any? 7. How would you code
the criteria to restrict the output to be produced? 8.
What is the purpose of the trailing @? The @@?
How would you use them? 9. Under what
circumstances would you code a SELECT
construct instead of IF statements? 10. What
statement do you code to tell SAS that it is to write
to an external file? What statement do you code to
write the record to the file? 11. If reading an
external file to produce an external file, what is the
shortcut to write that record without coding every
single variable on the record? 12. If you’re not
wanting any SAS output from a data step, how
would you code the data statement to prevent SAS
from producing a set? 13. What is the one
statement to set the criteria of data that can be
coded in any step? 14. Have you ever linked SAS
code? If so, describe the link and any required
statements used to either process the code or the
step itself. 15. How would you include common or
reuse code to be processed along with your
statements? 16. When looking for data contained
in a character string of 150 bytes, which function is
the best to locate that data: scan, index, or indexc?
17. If you have a data set that contains 100
variables, but you need only five of those, what is
the code to force SAS to use only those variable?
18. Code a PROC SORT on a data set containing
State, District and County as the primary variables,
along with several numeric variables. 19. How
would you delete duplicate observations? 20. How
would you delete observations with duplicate
keys? 21. How would you code a merge that will
keep only the observations that have matches from
both sets. 22. How would you code a merge that
will write the matches of both to one data set, the
non-matches from the left-most data set to a
second data set, and the non-matches of the right-
most data set to a third data set. 23. What is the
Program Data Vector (PDV)? What are its
functions? 24. Does SAS ‘Translate’ (compile) or
does it ‘Interpret’? Explain. 25. At compile time
when a SAS data set is read, what items are
created? 26. Name statements that are recognized
at compile time only? 27. Identify statements
whose placement in the DATA step is critical. 28.
Name statements that function at both compile and
execution time. 29. Name statements that are
execution only. 30. In the flow of DATA step
processing, what is the first action in a typical
DATA Step? 31. What is _n_?
1. What SAS statements would you code to read an Accenture 0 8
external raw data file to a DATA step? 2. How do
you read in the variables that you need? 3. Are you
familiar with special input delimiters? How are
they used? 4. If reading a variable length file with
fixed input, how would you prevent SAS from
reading the next record if the last variable didn’t
have a value? 5. What is the difference between an
informat and a format? Name three informats or
formats. 6. Name and describe three SAS functions
that you have used, if any? 7. How would you code
the criteria to restrict the output to be produced? 8.
What is the purpose of the trailing @? The @@?
How would you use them? 9. Under what
circumstances would you code a SELECT
construct instead of IF statements? 10. What
statement do you code to tell SAS that it is to write
to an external file? What statement do you code to
write the record to the file? 11. If reading an
external file to produce an external file, what is the
shortcut to write that record without coding every
single variable on the record? 12. If you’re not
wanting any SAS output from a data step, how
would you code the data statement to prevent SAS
from producing a set? 13. What is the one
statement to set the criteria of data that can be
coded in any step? 14. Have you ever linked SAS
code? If so, describe the link and any required
statements used to either process the code or the
step itself. 15. How would you include common or
reuse code to be processed along with your
statements? 16. When looking for data contained
in a character string of 150 bytes, which function is
the best to locate that data: scan, index, or indexc?
17. If you have a data set that contains 100
variables, but you need only five of those, what is
the code to force SAS to use only those variable?
18. Code a PROC SORT on a data set containing
State, District and County as the primary variables,
along with several numeric variables. 19. How
would you delete duplicate observations? 20. How
would you delete observations with duplicate
keys? 21. How would you code a merge that will
keep only the observations that have matches from
both sets. 22. How would you code a merge that
will write the matches of both to one data set, the
non-matches from the left-most data set to a
second data set, and the non-matches of the right-
most data set to a third data set. 23. What is the
Program Data Vector (PDV)? What are its
functions? 24. Does SAS ‘Translate’ (compile) or
does it ‘Interpret’? Explain. 25. At compile time
when a SAS data set is read, what items are
created? 26. Name statements that are recognized
at compile time only? 27. Identify statements
whose placement in the DATA step is critical. 28.
Name statements that function at both compile and
execution time. 29. Name statements that are
execution only. 30. In the flow of DATA step
processing, what is the first action in a typical
DATA Step? 31. What is _n_?
how we can call macros with in data step? Allianz 3 217
Hello, I have PROC SQLs results group by 3 fields 0 5
and I use SUM and COUNT functions in SQL.
The problem is when I try to display my result
with PROC TABULATE. I am getting very big
numbers. I believe I make a mistake some where in
Tabulate. Here is my Proc Tabulate. PROC
TABULATE DATA=OUT04_05 FORMAT=12.;
CLASS YR CENTRE VISA / PRELOADFMT
EXCLUSIVE; VAR NEWUSER FRAUD
TRANSFER AUTUSER REISSUE; TABLE
CENTRE ALL, (YR ALL)*VISA,
(NEWUSER*F=COMMA12.
AUTUSER*F=COMMA12.
FRAUD*F=COMMA12.
TRANSFER*F=COMMA12.
REISSUE*F=COMMA12.) /
MISSTEXT={LABEL='0'} PRINTMISS RTS=20;
FORMAT VISA VISAFMT.; KEYLABEL SUM
= ' ' ALL = 'TOTAL'; LABEL YR = 'DATE
YEAR' NEWUSER = 'TOTAL NEW ACCT'
TRANSFER = 'TOTAL TRANSFER' FRAUD =
'TOTAL FRAUD TRANSFER' AUTUSER =
'TOTAL AUTH USERS' REISSUE = 'TOTAL
REISSUE'; When I code it like :
NEWUSER*N*F=COMMA12.
AUTUSER*N*F=COMMA12. I get same amount
numbers but to find a NEWUSER I use
COUNT(*) and to find AUTUSER I use
SUM(xxxx) function so both result shouldn’t be
the same my problem is in this point. Could you
tell me where the problem in code is. How can I
display my result? TX.
WHAT DIFFERRENCE DID YOU FIND
Genzyme 0 6
AMONG VERSION 6 8 AND 9 OF SAS.
How do you debug and test your SAS programs?
What can you learn from the SAS log when
debugging? How do you test for missing values?
How would you create multiple observations from
a single observation? What are some good SAS
programming practices for processing very large
data sets? Briefly describe 5 ways to do a "table
0 3
lookup" in SAS. Why is SAS considered self-
documenting? Are you sensitive to code walk-
throughs, peer review, or QC review? What other
SAS features do you use for error trapping and
data validation? How does SAS handle missing
values in: assignment statements, functions, a
merge, an update, sort order, formats, PROCs?
How could you generate test data with no input
5 734
data?
What is _n_? 9 724
In the flow of DATA step processing, what is the
2 347
first action in a typical DATA Step?
Name statements that are execution only. 5 496
Name statements that function at both compile and
2 265
execution time.
Identify statements whose placement in the DATA
Infosys 0 2
step is critical.
Name statements that are recognized at compile
0 8
time only?
At compile time when a SAS data set is read, what
2 200
items are created?
Does SAS ‘Translate’ (compile) or does it
‘Interpret’? Explain

• Does SAS have a function for calculating factorials ?


My Ans: Do not know.
Sugg Ans: No, but the Gamma Function does (x-1)!
• What is the smallest length for a numeric and character
variable respectively ?
Ans: 2 bytes and 1 byte.
Addendum by John Wildenthal - the smallest legal length for a
numeric is OS dependent. Windows and Unix have a minimum length
of 3, not 2.
• What is the largest possible length of a macro variable ?
Ans: Do not know
Addendum by John Wildenthal - IIRC, the maxmium length is
approximately the value of MSYMTABMAX less the length of the
name.
• List differences between SAS PROCs and the SAS DATA
STEP.
Ans: Procs are sub-routines with a specific purpose in mind and the
data step is designed to read in and manipulate data.
• Does SAS do power calculations via a PROC?
Ans: No, but there are macros out there written by other users.
• How can you write a SAS data set to a comma delimited file ?
Ans: PUT (formatted) statement in data step.

Submitted by Jack N Shoemaker


Email: JShoemaker@Accordant.net

1. Have you ever been to any user conferences? If so, which ones?
Do you remember any paper/presentation which stood out? If so,
why?

Answers: I use this to gauge experience and level of expertise. 12+


years of SAS experience on the resume, but no user activity raises red
flags. I can understand no SUGI or RSUG for financial reasons, but
it's hard to justify no local meetings.

2. What editor do you use?

Answers: Emacs - hired on the spot. Kedit, UltarEdit, Xedit, vi, ISPF
are also acceptable answers. What I'm looking for is a sense that the
candidate can interact with the OS beyond SAS. Of course, Roger
DeAngelis (xlr82sas@aol.com) is a DM bigot, but he has good reasons
for doing so. With that exception, I feel just using DM displays a lack
of intellectual curiosity about the rest of the OS which, to me, results
in low scores.

3. What was your favorite course in high school?

Good Answers: Music, geometry, algebra - in particular word


problems, calculus.

Questions submitted by Janet Stuelpner

• What is the difference between a FUNCTION and a PROC?

Example: MEAN function and PROC MEANS


Answer: One will give an average across an observation (a row) and
the other will give an average across many observations (a column)

• What are some of the differences between a WHERE and an IF statement?

Answer: Major differences include:

o IF can only be used in a DATA step


o Many IF statements can be used in one DATA
step
o Must read the record into the program data
vector to perform selection with IF
o WHERE can be used in a DATA step as well as a
PROC.
o A second WHERE will replace the first unless
the option ALSO is used
o Data subset prior to reading record into PDV
with WHERE
• Name some of the ways to create a macro variable

Answer:

o %let
o CALL SYMPUT(....)
o when creating a macro example:
o %macro mymacro(a=,b=);
o in SQL using INTO

</DIR<>
Questions submitted by Charles Patridge

1. Question: Describe 1 way to avoid using a series of "IF"


statements such as
if branch = 1 then premium = amount; else
if branch = 2 then premium = amount; else
if..... ; else
if branch = 20 then premium = amount;

Answer: Use a Format and the PUT function.


Or, use an SQL JOIN with a table of Branch codes.
Or, use a Merge statement with a table of Branch codes.

2. Question: When reading a NON SAS external file what is the


best way of reading the file?
Answer: Use the INPUT statement with pointer control - ex: INPUT
@1 dateextr mmddyy8. etc.
3. Question: How can you avoid using a series of "%INCLUDE"
statements?
Answer: Use the Macro Autocall Library.
4. Question: If you have 2 sets of Format Libraries, can a SAS
program have access to both during 1 session?
Answer: Yes. Use the FMTSEARCH option.
5. Question: Name some of the SAS Functions you have used.
Answer: Looking to see which ones and how many a potential
candidate has used in the past.
6. Question: Name some of the SAS PROCs you have used.
Answer: Looking to see which ones and how many a potential
candidate has used in the past, as well as what SAS products he/she
has been exposed to.
7. Question: Have you ever presented a paper to a SAS user
group (Local, Regional or National)?
Answer: Checking to see if candidate is willing to share ideas, proud
of his/her work, not afraid to stand up in front of an audience, can
write/speak in a reasonable clear and understandable manner, and
finally, has mentoring abilities.

Interview questions for a SAS data support manager by Ron Fehd of CDC Atlanta
GA USA RJF2@cdc.gov

• Question: How would you check the uniqueness of a data set?


i.e. that the data set was unique on its primary key (ID). suppose there
were two Identifier variables: ID1, ID2

answer:
1. proc FREQ order = FREQ;
tables ID;
shows multiples at top of listing
2. Or, compare number of obs of original data set
and data after
proc SORT nodups
or is that
proc SORT nodupkey
3. use first.ID in data step to write non-unique to
separate data set if first.ID and last.ID then output
UNIQUE; else output DUPS;

Author: Roland Rashleigh-Berry


Email: rrb63388@GlaxoWellcome.co.uk

The following code illustrates the scope of macro variables. If you


apply
for a job writing SAS macros you may be quizzed on this so it is
useful to
know it.

1 /* RECOMMENDATION: Have global macro variables start


and end with an
2 underscore exclusively and then no confusion will
ever arise. Declare
3 all other macro variables as local at the start of
the macro before
4 using them and then they will never overwrite those
of the same name
5 outside the macro. */
6
7
8
9 options nodate nonotes;
10
11
12
13 %*- scope of macro variables examples;
14
15
16 %*- using the same macro variable inside another
macro overwrites it;
17
18 %let a=5;
19
20 %macro testa;
21 %let a=99;
22 %mend testa;
23 %testa;
24
25 %put >> a was 5 and now a=&a;
>> a was 5 and now a=99
26
27
28
29
30 %*- declaring the same named macro variable local
preserves its contents;
31
32 %let b=4;
33
34 %macro testb;
35 %local b;
36 %do b=1 %to 10;
37 %end;
38 %mend testb;
39 %testb;
40
41 %put >> b was 4 and now it is still the same b=&b;
>> b was 4 and now it is still the same b=4
42
43
44
45
46 %*- "call symputing" creates a global macro variable
if not declared local;
47
48 %macro testc;
49 data _null_;
50 call symput('c',put(9,1.));
51 run;
52 %mend testc;
53 %testc;
54
55 %put >> c was created by a "symput" and it is still
defined outside c=&c;
>> c was created by a "symput" and it is still defined outside
c=9
56
57
58
59
60 %*- but "call symput" will write to a local macro
variable if it is declared;
61
62 %let d=2;
63
64 %macro testd;
65 %local d;
66 data _null_;
67 call symput('d',put(7,1.));
68 run;
69 %mend testd;
70 %testd;
71
72 %put >> d was 2 and it is still the same d=&d;
>> d was 2 and it is still the same d=2
73
74
75
76
77 %*- declaring a macro variable as global will not
change its contents;
78
79 %let e=5;
80
81 %global e;
82
83 %put >> e was 5 and it is still the same e=&e;
>> e was 5 and it is still the same e=5
84
85
86
87
88 %*- macro variables created in a macro are local to
it only;
89 %*- unless you a) "symput" it in the example
previously....;
90
91 %macro testf;
92 %let f=5;
93 %mend testf;
94 %testf;
95
96 %put >> f=&f does not exist;
WARNING: Apparent symbolic reference F not resolved.
>> f=&f does not exist
97
98
99
100
101 %*- .... or b) declare it as global before you use it;
102
103 %macro testg;
104 %global g;
105 %let g=5;
106 %mend testg;
107 %testg;
108
109 %put >> g=&g exists;
>> g=5 exists
110
111
112
113 %*- but you are not allowed to declare it as global
if you have;
114 %*- already used it as local. The following will
cause an ERROR;
115
116 %macro testh;
117 %let h=8;
118 %global h;
119 %mend testh;
120 %testh;
ERROR: Attempt to %GLOBAL a name (H) which exists in a local
environment.
Author: Girish Patel
Email: gspatel@PEPCO.COM

Frequently Asked Interview Questions

Several of the frequently asked job interview questions may sound familiar.
Although these questions are not technical, they are used to size up the
candidate and reveal his priorities and values.You will find a couple of
questions designed for either employees or contractors at the end of the list.
Carefully considering your answers to these questions will provide practice
and insure that your responses are well thought out.

1. Why are you leaving your current job?


2. What do you know about our company?
3. In your current job, what do you like most and least?
4. What are your strengths or strong points?
5. What are your weaknesses?
6. Tell me about yourself
7. Why do you want to work for us?
8. What about this job do you find most and least
attractive?
9. Why should we hire you? What do you have to offer?
10. What's your greatest accomplishment in your career?
11. What's the most difficult decision you ever had to make
in your career?
12. If I talked to your manager, what 3 adjectives would
he/she use to describe you?
13. How do you keep abreast of new developments in
Information Technology?
14. What new skills or capabilities have you developed over
the past year?
15. How would you describe your work style?
16. Why do you think you would like this position?
Company?
17. When can you start work?
18. Do you work best independently or with a team?
19. Why have you changed jobs so often?
20. What is the longest length of time you have worked on
one job or project?
21. How do you feel about working overtime?
22. How do you feel about providing on-call support?
23. How long will it take you to learn our environment and
start producing?
24. Can you pick up a new skill without formal training?
25. What hours do you prefer to work?
26. What did you do on your current job yesterday?

For Interviewers to ask Potential Employees

1. What are your short and long-term goals?


2. How long do you plan to work here if you are hired?
3. What new skills or capabilities do you want to develop
over the next year?
4. How will employment with us contribute to your career
plans?
5. Where do you see yourself in 5 years?

For Interviewers to ask Potential Contractors

1. Have you ever been let go before your contract ended,


why?
2. Would you consider a permanent position with us in the
future?
3. Why do you want a employee position?
4. Why did you leave a salaried position and start
consulting?

Ask the Interviewer questions

It is common for a interviewer to ask do you have any questions? Questions


will probably arise during the course of the interview, nevertheless, it's
beneficial to have a couple of pertinent questions already prepared. At the
end of this list, you will find questions appropriate for employees and for
contractors.

1. What are the responsibilities of the job?


2. What qualifications are you looking for to fill this job?
3. Is this position best performed independently or closely
with a team?
4. What are the skills and qualities of your best
programmer/analyst?
5. Ask about the system/project described to you:
What phase of the system development life cycle are they in?
Are they on schedule?
Are the deadlines tight, aggressive or relaxed?
6. What qualities and/or skills of your worst
programmer/analyst or contractor would you like to see
changed?
7. What would you like to see your newly hired achieve in
3 months? 6 months?
8. How would describe the tasks I would be performing on
a average day?
9. How are program specifications delivered; written or
verbal? Do I create my own after analysis and design?
10. How do I compare to the other candidates you've
interviewed?
11. How would you describe your ideal candidate?
12. When will you make a hiring decision?
13. When would you like for me to start?
14. When may I expect to hear from you?
15. What is the next step in the interviewing process?
16. Why are you looking to fill this position? Did the
previous employee leave or is this a new position?
17. What are the key challenges or problems I will face in
this position?
18. What extent of end-user interface will the position
entail?

For Employees to Interviewers

1. What are the chances for advancement or increase in


responsibilities?
2. What is your philosophy on training?
3. What training program does the company have in place
to keep up to date with future technology?
4. Where will this position lead in terms of career paths
and future projects?

For Contractors to Interviewers

1. What is the length of this contract?


2. What length of time will this position progress from
temp to perm?
3. Is the length of this contract fixed or will it be
extended?
4. What is the ratio of contractors to employees working
on the system/project?

More SAS Interview Questions submitted by Sumit


Very Basic
 What SAS statements would you code to read an external raw data file to
a DATA step?
 How do you read in the variables that you need?
 Are you familiar with special input delimiters? How are they used?
 If reading a variable length file with fixed input, how would you prevent
SAS from reading the next record if the last variable didn't have a value?
 What is the difference between an informat and a format? Name three
informats or formats.
 Name and describe three SAS functions that you have used, if any?
 How would you code the criteria to restrict the output to be produced?
 What is the purpose of the trailing @? The @@? How would you use
them?
 Under what circumstances would you code a SELECT construct instead
of IF statements?
 What statement do you code to tell SAS that it is to write to an external
file? What statement do you code to write the record to the file?
 If reading an external file to produce an external file, what is the shortcut
to write that record without coding every single variable on the record?
 If you're not wanting any SAS output from a data step, how would you
code the data statement to prevent SAS from producing a set?
 What is the one statement to set the criteria of data that can be coded in
any step?
 Have you ever linked SAS code? If so, describe the link and any required
statements used to either process the code or the step itself.
 How would you include common or reuse code to be processed along with
your statements?
 When looking for data contained in a character string of 150 bytes, which
function is the best to locate that data: scan, index, or indexc?
 If you have a data set that contains 100 variables, but you need only five
of those, what is the code to force SAS to use only those variable?
 Code a PROC SORT on a data set containing State, District and County
as the primary variables, along with several numeric variables.
 How would you delete duplicate observations?
 How would you delete observations with duplicate keys?
 How would you code a merge that will keep only the observations that
have matches from both sets.
 How would you code a merge that will write the matches of both to one
data set, the non-matches from the left-most data set to a second data set,
and the non-matches of the right-most data set to a third data set.

Internals
 What is the Program Data Vector (PDV)? What are its functions?
 Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
 At compile time when a SAS data set is read, what items are created?
 Name statements that are recognized at compile time only?
 Identify statements whose placement in the DATA step is critical.
 Name statements that function at both compile and execution time.
 Name statements that are execution only.
 In the flow of DATA step processing, what is the first action in a typical
DATA Step?
 What is _n_?

Base SAS
 What is the effect of the OPTIONS statement ERRORS=1?
 What's the difference between VAR A1 - A4 and VAR A1 -- A4?
 What do the SAS log messages "numeric values have been converted to
character" mean? What are the implications?
 Why is a STOP statement needed for the POINT= option on a SET
statement?
 How do you control the number of observations and/or variables read or
written?
 Approximately what date is represented by the SAS date value of 730?
 How would you remove a format that has been permanently associated
with a variable??
 What does the RUN statement do?
 Why is SAS considered self-documenting?
 What areas of SAS are you most interested in?
 Briefly describe 5 ways to do a "table lookup" in SAS.
 What versions of SAS have you used (on which platforms)?
 What are some good SAS programming practices for processing very
large data sets?
 What are some problems you might encounter in processing missing
values? *In Data steps? Arithmetic? Comparisons? Functions? Classifying
data?
 How would you create a data set with 1 observation and 30 variables
from a data set with 30 observations and 1 variable?
 What is the different between functions and PROCs that calculate the
same simple descriptive statistics?
 If you were told to create many records from one record, show how you
would do this using arrays and with PROC TRANSPOSE?
 What are _numeric_ and _character_ and what do they do?
 How would you create multiple observations from a single observation?
 For what purpose would you use the RETAIN statement?
 What is a method for assigning first.VAR and last.VAR to the BY group
variable on unsorted data?
 What is the order of application for output data set options, input data
set options and SAS statements?
 What is the order of evaluation of the comparison operators: + - * / **
()?

Testing, debugging
 How could you generate test data with no input data?
 How do you debug and test your SAS programs?
 What can you learn from the SAS log when debugging?
 What is the purpose of _error_?
 How can you put a "trace" in your program?
 Are you sensitive to code walk-throughs, peer review, or QC review?
 Have you ever used the SAS Debugger?
 What other SAS features do you use for error trapping and data
validation?

Missing values
 How does SAS handle missing values in: assignment statements,
functions, a merge, an update, sort order, formats, PROCs?
 How many missing values are available? When might you use them?
 How do you test for missing values?
 How are numeric and character missing values represented internally?

General
 What has been your most common programming mistake?
 What is your favorite programming language and why?
 What is your favorite operating system? Why?
 Do you observe any coding standards? What is your opinion of them?
 What percent of your program code is usually original and what percent
copied and modified?
 Have you ever had to follow SOPs or programming guidelines?
 Which is worse: not testing your programs or not commenting your
programs?
 Name several ways to achieve efficiency in your program. Explain trade-
offs.
 What other SAS products have you used and consider yourself proficient
in using?

Functions
 How do you make use of functions?
 When looking for contained in a character string of 150 bytes, which
function is the best to locate that data: scan, index, or indexc?
 What is the significance of the 'OF' in X=SUM(OF a1-a4, a6, a9);?
 What do the PUT and INPUT functions do?
 Which date function advances a date, time or date/time value by a given
interval?
 What do the MOD and INT function do?
 How might you use MOD and INT on numerics to mimic SUBSTR on
character strings?
 In ARRAY processing, what does the DIM function do?
 How would you determine the number of missing or nonmissing values in
computations?
 What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?
 There is a field containing a date. It needs to be displayed in the format
"ddmonyy" if it's before 1975, "dd mon ccyy" if it's after 1985, and as 'Disco
Years' if it's between 1975 and 1985. How would you accomplish this in data
step code? Using only PROC FORMAT.
 In the following DATA step, what is needed for 'fraction' to print to the
log? data _null_; x=1/3; if x=.3333 then put 'fraction'; run;
 What is the difference between calculating the 'mean' using the mean
function and PROC MEANS?

PROCs
 Have you ever used "Proc Merge"? (be prepared for surprising
answers..)
 If you were given several SAS data sets you were unfamiliar with, how
would you find out the variable names and formats of each dataset?
 What SAS PROCs have you used and consider yourself proficient in
using?
 How would you keep SAS from overlaying the a SAS set with its sorted
version?
 In PROC PRINT, can you print only variables that begin with the letter
"A"?
 What are some differences between PROC SUMMARY and PROC
MEANS?
 PROC FREQ:
*Code the tables statement for a single-level (most common) frequency.
*Code the tables statement to produce a multi-level frequency.
*Name the option to produce a frequency line items rather that a table.
*Produce output from a frequency. Restrict the printing of the table.
 PROC MEANS:
*Code a PROC MEANS that shows both summed and averaged output of
the data.
*Code the option that will allow MEANS to include missing numeric data to
be included in the report.
*Code the MEANS to produce output to be used later.
 Do you use PROC REPORT or PROC TABULATE? Which do you
prefer? Explain.

Merging/Updating
 What happens in a one-on-one merge? When would you use one?
 How would you combine 3 or more tables with different structures?
 What is a problem with merging two data sets that have variables with
the same name but different data?
 When would you choose to MERGE two data sets together and when
would you SET two data sets?
 Which data set is the controlling data set in the MERGE statement?
 How do the IN= variables improve the capability of a MERGE?
 Explain the message 'MERGE HAS ONE OR MORE DATASETS
WITH REPEATS OF BY VARIABLES".
Simple statistics
 How would you generate 1000 observations from a normal distribution
with a mean of 50 and standard deviation of 20. How would you use PROC
CHART to look at the distribution? Describe the shape of the distribution.
 How do you generate random samples?

Customized Report Writing


 What is the purpose of the statement DATA _NULL_ ;?
 What is the pound sign used for in the DATA _NULL_?
 What would you use the trailing @ sign for?
 For what purpose(s) would you use the RETURN statement?
 How would you determine how far down on a page you have printed in
order to print out footnotes?
 What is the purpose of using the N=PS option?

Macro
 What system options would you use to help debug a macro?
 Describe how you would create a macro variable.
 How do you identify a macro variable?
 How do you define the end of a macro?
 How do you assign a macro variable to a SAS variable?
 For what purposes have you used SAS macros?
 What is the difference between %LOCAL and %GLOBAL?
 How long can a macro variable be? A token?
 If you use a SYMPUT in a DATA step, when and where can you use the
macro variable?
 What do you code to create a macro? End one?
 Describe how you would pass data to a macro.
 You have five data sets that need to be processed identically; how would
you simplify that processing with a macro?
 How would you code a macro statement to produce information on the
SAS log? This statement can be coded anywhere.
 How do you add a number to a macro variable?
 If you need the value of a variable rather than the variable itself, what
would you use to load the value to a macro variable?
 Can you execute a macro within a macro? Describe.
 Can you a macro within another macro? If so, how would SAS know
where the current macro ended and the new one began?
 How are parameters passed to a macro?

Pharmaceutical Industry
 Describe the types of SAS programming tasks that you performed:
Tables? Listings? Graphics? Ad hoc reports? Other?
 Have you been involved in editing the data or writing data queries?
 What techniques and/or PROCs do you use for tables?
 Do you prefer PROC REPORT or PROC TABULATE? Why?
 Are you involved in writing the inferential analysis plan? Tables
specifications?
 What do you feel about hardcoding?
 How experienced are you with customized reporting and use of DATA
_NULL_ features?
 How do you write a test plan?
 What is the difference between verification and validation?

Intangibles
 What was the last computer book you purchased? Why?
 What is your favorite all time computer book? Why?
 For contractors:
*Will it bother you if the guy at the next desk times the frequency and
duration of your bathroom/coffee breaks on the grounds that 'you are getting
paid twice as much as he is'?

*How will you react when, while consulting a SAS documentation manual to
get an answer to a problem, someone says: 'hey, I thought you were supposed
to know all that stuff already, and not have to look it up in a book!'

*Can you continue to write code while the rest of the people on the floor
where you work have a noisy party to which you were not invited?

Non-Technical
 Can you start on Monday?
 Do you think professionally?
*How do you put a giraffe into the refrigerator? Correct answer: Open the
refrigerator door, put the giraffe in, and close the door. This question tests
whether or not the candidate is doing simple things in a complicated way.

*How do you put an elephant in the refrigerator? Incorrect answer: Open


the refrigerator door, put in the elephant, and close the door. Correct
answer: Open the refrigerator door, take out the giraffe, put in the elephant,
and close the door. This question tests your foresight.

*The Lion King is hosting an animal conference. All the animals in the world
attend except one. Which animal does not attend? Correct answer: The
elephant. The elephant is in the refrigerator, remember? This tests if you are
capable of comprehensive thinking.

*There is a river notoriously known for it's large crocodile population. With
ease, how do you safely cross it? Correct answer: Simply swim across. All of
the crocodiles are attending the Lion King's animal conference. This
questions your reasoning ability.
Open-ended questions
 Describe a time when you were really stuck on a problem and how you
solved it.
 Describe the function and utility of the most difficult SAS macro that you
have written.
 Give me an example of ..
 Tell me how you dealt with ...
 How do handle working under pressure?
 Of all your work, where have you been the most successful?
 What are the best/worst aspects of your current job?
 If you could design your ideal job, what would it look like?
 How necessary is it to be creative in your work?
 If money were no object, what would you like to do?
 What would you change about your job?
if u want u read 0 Vijai
particular
Bhaskar
variables in the
data step by
using input
statement

Answer if u read priticular variables 0 Ram


in data by using keep and
drop statements

Answer Using with Var statment we can 0 Harsha


read the required variable.

What SAS statements would you


Answer
Question code to read an external raw Rank
data file to a DATA step? Posted By
Question Submitted By :: SasGuru
I also faced this Question!! © ALL Interview .com
Answer INFILE statement 0 Jothi Sankar
and

INPUT statement

Answer INFILE AND INPUT STATEMENTS 0 Mohan Reddy


EX;
DATA EMP;
INFILE 'E:\ABC\EMPLOYEE.TXT'
MISSOVER;
INPUT VAR1 VAR 2....VARN;
RUN;

Answer using proc import,infile and 0 Sivanjaneyulu


input

Answer using infile and input 0 God


statements must it is possible
to
clean and get the data into in
u r environment....

some body says using proc


import using proc import it is
not
possible to clean and get the
data in u r
environment..................it
will take as it is

Answer whenever the data in .txt .dat 0 G.jyotshna


format we can directly us
infile and input statements.
but incase of .xls
it is not possible to read
excel data file directly
through
infile input.
we have to use:
wizard
DDE(dynamic data exchange)
proc import (its best one)
(in projects we go for proc
import only)
after reading into sas session
we will go for cleaning.

Answer input & infile 0 Venki

There is a river notoriously


known for it?s large crocodile Answer
Question population. With ease, how do Rank
Posted By
you safely cross it?
Question Submitted By :: Anup Nair
This Interview Question Asked @ Oracle
I also faced this Question!! © ALL Interview .com
Answer Correct answer: Simply swim 0 Anup Nair
across. All of the crocodiles
are attending the Lion King?s
animal conference. This
questions your reasoning
ability.

The Lion King is hosting an


animal conference. All the
Answer
Question animals in the world attend Rank
except one. Which animal does Posted By
not attend?
Question Submitted By :: Anup Nair
This Interview Question Asked @ Oracle
I also faced this Question!! © ALL Interview .com
Answer The elephant. The elephant is 0 Anup Nair
in the refrigerator,
remember? This tests if you are
capable of comprehensive
thinking.
How do you put an elephant in Answer
Question the refrigerator? Rank
Posted By
Question Submitted By :: Anup Nair
This Interview Question Asked @ Oracle
I also faced this Question!! © ALL Interview .com
Answer Incorrect answer: Open the 0 Anup Nair
refrigerator door, put in the
elephant, and close the door.

Correct answer: Open the


refrigerator door, take out the
giraffe, put in the elephant,
and close the door. This
question tests your foresight.

How do you put a giraffe into Answer


Question the refrigerator? Rank
Posted By
Question Submitted By :: Anup Nair
This Interview Question Asked @ Oracle
I also faced this Question!! © ALL Interview .com
Answer Open the refrigerator door, put 0 Anup Nair
the giraffe in, and close
the door. This question tests
whether or not the candidate
is doing simple things in a
complicated way.

Answer
Question Do you think professionally? Rank
Posted By
Question Submitted By :: Anup Nair
This Interview Question Asked @ Oracle
I also faced this Question!! © ALL Interview .com
Answer as long as it is logical.

Anda mungkin juga menyukai