10 Most Likely Asked SAS Interview Questions And Answers

10 Most Likely Asked SAS Interview Questions And Answers

Globalization brought to consumers a plethora of choices to choose from in products as well as boosted e-commerce. This has now increased competition as well and 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 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, GlaxoSmithKline are among the leading companies who look for professionals talented in SAS to bring value to their company by assuming the role of a SAS Programmer, Customer Analytics Manager, SAS Analyst among many. 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, our book, SAS Interview Questions You’ll Most Likely Be Asked, brings to you 645 interview questions which have been thoroughly researched to give spring to your footsteps enroute this job. This book enables you to be well prepared to ace the interview and stake your claim to fame.

Listed below are some questions from the book:

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 a SAS data file and a SAS data view?

Answer:

SAS data file and SAS data view are both SAS data sets. The main difference is that SAS data file contains both descriptor information and data values. Descriptor information refers to the

details of the data set like name of the data set, number of observations, number of variables, 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:

  1. a) This requires storage space for index which results in more utilization of disk space
  2. 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 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 input data set and output data set. 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;

 

 

 

 

 

 

 

 

 

GRAB YOUR COPY NOW

 

 

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 MDY function to create a date from the input values. The function calculates the date value, March 27, 2012 and assigns it to 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:

  1. a) special characters such as percentage signs, dollar signs and commas
  2. b) date value or time value
  3. c) data in fraction, binary and hexadecimal form

If these questions catch your interest then you must definitely go through  SAS Interview Questions You’ll Most Likely Be Asked book for the complete list of questions to ace the interview!

Good luck with your job hunt!