Monday, May 26, 2014

20 TOP SAS Programming Interview Questions and Answers pdf

The below List of top 20 SAS Programming Interview Questions and Answers for freshers and experienced pdf free download

1.    Under what circumstances would you code a SELECT construct instead of IF statements?
A: I think Select statement is used when you are using one condition to compare with several conditions like…….
Data exam;
Set exam;
select (pass);
when Physics gt 60;
when math gt 100;
when English eq 50;
otherwise fail;
run;

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

3. What is the effect of the OPTIONS statement ERRORS=1?
A) The –ERROR- variable has a value of 1 if there is an error in the data for that observation and 0 if it is not.

4. What  is the different between functions and PROCs that calculate the same simple descriptive statistics?
A) Proc can be used with wider scope and the results can be sent to a different dataset. Functions usually affect the existing datasets.

5. What  do the SAS log messages "numeric values have been converted to character" mean? What are the implications?
A) It implies that automatic conversion took place to make character functions possible.

6. Why is a STOP statement needed for the POINT= option on a SET statement?
A) Because POINT= reads only the specified observations, SAS cannot detect an end-of-file condition as it would if the file were being read sequentially.

7. How do you control the number of observations and/or variables read or written?
A) FIRSTOBS and OBS option

8. Approximately what date is represented by the SAS date value of 730?
A) 31st December 1961

9. Identify statements whose placement in the DATA step is critical.
A) INPUT, DATA and RUN…

10. Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
A) Compile

11. What does the RUN statement do?
A) When SAS editor looks at Run it starts compiling 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.

12. 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.

13. What are some good SAS programming practices for processing very large data sets?
A) Sort them once, can use firstobs = and obs = ,

14. What is the different between functions and PROCs that calculate thesame 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 ...........

15. 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 variables are less use arrays if the var are more ................. depends

16. What is a method for assigning first.VAR and last.VAR to the BY groupvariable on unsorted data?
A) In unsorted data you can't use First. or Last.

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

18. What other SAS features do you use for error trapping and datavalidation?
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 ........

19. How would you combine 3 or more tables with different structures?
A) I think sort them with common variables and use merge statement. I am not sure what you mean different structures.

20. What areas of SAS are you most interested in?
A) BASE, STAT, GRAPH, ETSBriefly

No comments: