Do you have scheduled interview and want to know about the general questions asked in the SAS interview?
Here are some of the general questions asked in an interview with their answers.
When would you use select instead of IF statement?
A: Select is used over IF statement when you are using a condition to compare with several other conditions: Here is an example:
Data exam;
Set exam;
select (pass);
when Physics >60;
when math > 100;
when English = 50;
otherwise fail;
run;
What is the one statement to set the criteria of data that can be coded in any step?
A) Options statement.
What does ERRORS = 1 do in the OPTIONS statement?
A)If there an error in the data for a observation then ERROR variable will have a value of 1 else 0
Is there any difference between VAR A1 - A4 and VAR A1 -- A4?
A) No, there is no diff between VAR A1-A4 and VAR A1—A4. You can use single (-) or double (--) but if you use more than 2 (---) then it will thrown an error.
Have you seen the error message ""numeric values have been converted to character"? What does it mean?
A) It means SAS has automatically converted the numeric variable to character to perform the functions.
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.
Can you control the number of observations read in by SAS?
A) Yes, by using FIRSTOBS and OBS option
Approximately what date is represented by the SAS date value of 730?
A) 31st December 1961
Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
A) Compile
What does the RUN statement do?
A)SAS editor will start compiling the data or proc step as soon as it encounters the run statement. SO if there are more than one data steps or a proc step followed by a data step then you can avoid using the run statement.