My SAS Tutorials

Monday 25 February 2013

SAS Interview Questions II


1. What has been your most common programming mistake?
2. What is your favorite programming language and why?
3. What is your favorite operating system? Why?
4. Do you observe any coding standards? What is your opinion of them?
5. What percent of your program code is usually original and what percent copied and modified?
6. Have you ever had to follow SOPs or programming guidelines?
7. Which is worse: not testing your programs or not commenting your programs?
8. Name several ways to achieve efficiency in your program. Explain trade-offs.
9. What other SAS products have you used and consider yourself proficient in using?
10.  How do you make use of functions?
11.  When looking for contained in a character string of 150 bytes, which function is the best to locate that data: scan, index, or indexc?
12.  What do the PUT and INPUT functions do?
13.  What do the MOD and INT function do?
14.  How might you use MOD and INT on numeric to mimic SUBSTR on character strings?
15.  In ARRAY processing, what does the DIM function do?
16.  How would you determine the number of missing or non missing values in computations?
17.  What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?
18.  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.
19.  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;
20.  What is the difference between calculating the ‘mean’ using the mean function and PROC MEANS?
21.  Have you ever used “Proc Merge”? (be prepared for surprising answers..)
22.  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?
23.  What SAS PROCs have you used and consider yourself proficient in using?
24.  How would you keep SAS from overlaying the a SAS set with its sorted version?
25.  In PROC PRINT, can you print only variables that begin with the letter “A”?
26.  What are some differences between PROC SUMMARY and PROC MEANS?
27.  Code the tables statement for a single-level (most common) frequency.
28.  Code the tables statement to produce a multi-level frequency.
29.  Name the option to produce a frequency line items rather that a table.
30.  Produce output from a frequency. Restrict the printing of the table.
31.  Code a PROC MEANS that shows both summed and averaged output of the data.
32.  Code the option that will allow MEANS to include missing numeric data to be included in the report.
33.  Code the MEANS to produce output to be used later.
34.  Do you use PROC REPORT or PROC TABULATE? Which do you prefer? Explain.
35.  What happens in a one-on-one merge? When would you use one?
36.  How would you combine 3 or more tables with different structures?
37.  What is a problem with merging two data sets that have variables with the same name but different data?
38.  When would you choose to MERGE two data sets together and when would you SET two data sets?
39.  Which data set is the controlling data set in the MERGE statement?
40.  How do the IN= variables improve the capability of a MERGE?
41.  Explain the message ‘MERGE HAS ONE OR MORE DATASETS WITH REPEATS OF BY VARIABLES”.
42.  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.
43.  How do you generate random samples?
44.  What is the purpose of the statement DATA _NULL_ ;?
45.  What is the pound sign used for in the DATA _NULL_?
46.  What would you use the trailing @ sign for?
47.  For what purpose(s) would you use the RETURN statement?
48.  How would you determine how far down on a page you have printed in order to print out footnotes?
49.  What is the purpose of using the N=PS option?
50.  What system options would you use to help debug a macro?
51.  Describe how you would create a macro variable.
52.  How do you identify a macro variable?
53.  How do you define the end of a macro?
54.  How do you assign a macro variable to a SAS variable?
55.  For what purposes have you used SAS macros?
56.  What is the difference between %LOCAL and %GLOBAL?
57.  How long can a macro variable be? A token?
58.  If you use a SYMPUT in a DATA step, when and where can you use the macro variable?
59.  What do you code to create a macro? End one?
60.  Describe how you would pass data to a macro.
61.  You have five data sets that need to be processed identically; how would you simplify that processing with a macro?
62.  How would you code a macro statement to produce information on the SAS log? This statement can be coded anywhere.
63.  How do you add a number to a macro variable?
64.  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?
65. Can you execute a macro within a macro? Describe.
66. Can you a macro within another macro? If so, how would SAS know where the current macro ended and the new one began?
67.  How are parameters passed to a macro?
   68.   Name statements that are recognized at compile time only?
   69.   Name statements that are execution only.
   70.  In the flow of DATA step processing, what is the first action in a typical DATA Step?
  71 .  Name statements that function at both compile and execution time.
  72.  What is the smallest length of numeric and character variable respectively?


Now prepare your Base SAS and Advance SAS Certification Exams with Online Mock tests:  http://exam.sankhyana.com

For training related info kindly mail us at info@sankhyana.com
Sankhyana Consultancy Services
www.sankhyana.com