Thursday 29 January 2015

SAS Interview Questions and Answers for freshers and Answers(Part3)

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

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

23. What  are _numeric_ and _character_ and what do they do?
A) Will either read or writes all numeric and character variables in dataset.

24. For what purpose would you use the RETAIN statement?
A) The retain statement is used to hold the values of variables across iterations of the data step. Normally, all variables in the data step are set to missing at the start of each iteration of the data step. What  is the order of evaluation of the comparison operators: + - * / ** ()?A) (), **, *, /, +, -

25. How could you generate test data with no input data?
A) Using Data Null and put statement

26. How do you debug and test your SAS programs? 
A) Using Obs=0 and systems options to trace the program execution in log.

27. What can you learn from the SAS log when debugging?
A) It will display the execution of whole program and the logic. It will also display the error with line number so that you can and edit the program.

28. What is the purpose of _error_?
A) It has only to values, which are 1 for error and 0 for no error.

29. How do you test for missing values?
A) Using Subset functions like IF then Else, Where and Select.

30. In the flow of DATA step processing, what is the first action in a typical DATA Step?
A) When you submit a DATA step, SAS processes the DATA step and then creates a new SAS data set.( creation of input buffer and PDV)
Compilation Phase
Execution Phase
More Questions :-
Part1  Part2  Part3  Part4  Part5

No comments:

Post a Comment