10 Most Likely Asked SAS Interview Questions And Answers
by Vibrant Publishers
Globalization brought consumers a plethora of choices to choose from in products as well as boosted e-commerce. This has now increased competition as well. As the companies aim to maximize their profits, they seek to know consumer behavior or track their profits. That’s where the Statistical Analysis System comes to the scene. With each company racing to clock maximum sales the search for a person skilled in SAS is the need of the hour, thus giving a huge scope to this industry. As per studies from payscale, SAS boasts of a massive 6.1% average pay boost which makes this job profile highly valuable.
Cognizant, Tata Consultancy Services, Accenture, and GlaxoSmithKline are among the leading companies that who look for professionals talented in SAS to bring value to their company by assuming the role of an SAS Programmer, a Customer Analytics Manager, or an SAS Analyst among many others. With large pay figures along with proper employee care this can be the job of one’s dreams. However, dreaming can give only a motive.
With the main task being cracking the interview, this blog, containing the most often-asked questions related to SAS, will surely assist you in your interview prep.
Listed below are some questions that are most often asked by interviewers:
1:How do SQL Views help better efficiency?
Answer:
A View typically consists of a subset of the entire table and hence is more efficient, as it accesses a smaller set of data which is required. View also lets you hide the sensitive columns and complex queries from the user by choosing only what needs to be shown. Views always fetch fresh data from the table as they do not store any data.
2: Explain the SASFILE statement.
Answer:
The SASFILE statement loads the SAS data file into the memory to be available further to the program. With SASFILE you can free the buffers. Instead, the file is loaded and kept in the system memory with a pointer in the program to access it. The following example explains the use of SASFILE in a simple way. The SASFILE statement opens the data set MyExam.MyClinic and allocates the buffer. It reads the file and loads it into the memory so that it is available to both the PROC PRINT as well as the PROC MEANS step. Finally, the SASFILE data file is closed with the CLOSE statement and the buffer is cleared.
sasfile MyExam.MyClinic load;
proc print data= MyExam.MyClinic
var. Serial No result;
run;
proc means data= MyExam.MyClinic;
run;
sasfile MyExam.MyClinic close;
|
3: What is the main difference between an SAS data file and an SAS data view?
Answer:
The SAS data file and the SAS data view are both SAS data sets. The main difference is that the SAS data file contains both descriptor information and data values. Descriptor information refers to the details of the data set like the name of the data set, number of observations, number of variables, and attributes of variables. The data view contains only descriptor information about the data and does not contain the values. The data view also contains information about how to retrieve the data.
4: What are the main disadvantages of using BY-group processing with an index?
Answer:
The main disadvantages of using BY-group processing with an index are as follows:
- a) This requires storage space for index which results in more utilization of disk space
- b) It is less efficient than sequentially reading a sorted data set as this requires retrieving the entire file to process the data.
5: Explain the significance of the EQUALS option.
Answer:
The EQUALS option is used to determine the order of observations in the output data set. It is normally used with NODUPRECS or NODUPKEY and it affects which observations are removed. Example: In the following program the value of EQUALS option is used. The use of the NODUPKEY option causes the elimination of observations with the same BY variable value. Since the option EQUALS is used, the order of observations remain the same in both the input data set and output data sets. NOEQUALS do not preserve the same order in the output data set.
proc sort data = exam.results nodupkey equals;
by id;
run; |
6: How do you select the variables and control the order in which they appear while creating a list report?
Answer:
This can be achieved by using the VAR statement in PROC PRINT.
Example:
proc print data= exam.questionset2;
varslno quest1 quest2 quest3;
run; |
7: Which keyword is used in the VALUE statement to label the missing value?
Answer:
The keyword OTHER is used in the VALUE statement to label the missing values as well as unknown values.
Example: The following program creates a format – Questfmt. The VALUE statement creates a format Questfmt to assign the descriptive labels. The values which do not fall in the range 1-300 as well as missing/unknown values are labelled using the keyword OTHER.
proc format lib=library;
value Questfmt
1-100=’initial’;
101-200=’middle’;
201-300=’final’
other=’unknown’;
run;
|
8: What is the difference between the default output produced by PROC MEANS and PROC SUMMARY?
Answer:
The results which are produced by PROC MEANS and PROC SUMMARY are the same. But the default output produced is different. PROC MEANS produces a report by default while PROC SUMMARY produces an output data set by default.
9: Explain the significance of the function MDY.
Answer:
MDY is a function which is used to create a date. It takes month, day and year as input and returns a date value. Example: The following program uses the MDY function to create a date from the input values. The function calculates the date value, March 27, 2012 and assigns it to the date variable.
data exam.questionset4;
set exam.set3;
date= mdy(3, 27, 2012);
Run;
|
10: Define nonstandard numeric data.
Answer:
Nonstandard numeric data can be defined as the data which contains:
- a) special characters such as percentage signs, dollar signs, and commas
- b) date value or time value
- c) data in fraction, binary and hexadecimal form
Along with these questions, make sure to check out the questions in our Job Interview Questions Book Series, which contains books like HR Interview Questions You’ll Most Likely Be Asked (Third Edition) and Leadership Interview Questions You’ll Most Likely Be Asked.
Good luck with your job hunt!
Share