SAS Interview Questions

  • Share this blog:

SAS Interview Questions and Answers

Q1: What is SAS and What are the functions of SAS? 

A: Statistical Analysis System(SAS) is a combined set of software products.

  • Data management and Information retrieval 
  • Business planning, decision support, and forecasting
  • Writing graphics and reports
  • Quality improvement 
  • Application Development
  • Statistical analytics, data mining, and econometrics
  • Operation research and project management 
  • Data Warehousing

Q2: What is the basic syntax style in SAS?

A: To run the program successfully, and you have the following essential elements: 

  • There should be a semi-colon at the end of every line. 
  • A data statement that defines your data set 
  • Input statement 
  • There should be at least one space between each word or statement. 
  • A run statement

For, e.g., In file ‘H:StatHWyourfilename.dat’;

Q3: Mention the different data types in SAS?

A: The data types in SAS are Character and Numeric.

Q4: What is the basic structure of the SAS base program? 

A: The basic structure of SAS consists of

== DATA step, that recovers and manipulates data. 

==PROC step is to interpret the data. 

Q5: Name types of category in which SAS Informats have?

A: SAS informats are of three categories,

  • Character Informats:$INFORMATw
  • Date/Time Informats: INFORMAT w.
  • Numeric Informats: INFORMAT w.d

Q6: List out some fundamental concept of SAS?

A: Some fundamental concept of SAS include,

  • DROP=, KEEP= dataset option
  • Missing values
  • Retain statement or Reset to missing, 
  • Log
  • FORMAT procedure for creating value formats 
  • Data types 
  • Data step logic
  • SORT procedure
  • IN= dataset option

Q7: What is the SAS data set? 

A: A SAS data set is a file consisting of two parts 

  • A descriptor portion 
  • A data portion

Q8: State the difference between Informat and Format?

A: An Informat is a specification that is to read the raw data, while a Format is a layout specification for how a variable should be displayed.

Q9: What are the ways to do a “table lookup” in SAS?

A: There are five ways to do a “ table lookup” in SAS that includes: 

  1. PROC SQL 
  2. Match Merging 
  3. Format Tables 
  4. Direct Access
  5. Arrays

Q10: What are the default statistics that PROC MEANS creates? 

A: The default statistics that PROC MEANS creates are as follows: 

  • N
  • MN 
  • MAX 
  • MENN 

Q11: What are the basic programming errors appears in SAS? 

A: Basic programming errors appear in SAS are as follows:

  • Missing semi-colon 
  • We are not using debugging methods. 
  • We are not checking the log after submitting the program. 
  • We are not using Fsview option vigorously. 

Q12: What is PROC in SAS? 

A: In SAS, PROC steps process and analyze data as a SAS data set. It controls a library of routine that performs takes on SAS data set option such as sorting, listing, and summarizing. 

Q13: What is factor analysis?

A: Factor analysis is a common term for a family of a statistical method associated with the reduction of a set of an observable variable in terms of a small number of inactive factors. The main aim of factor analysis is data reduction and summarization. 

Q14: How to create a permanent SAS data set?

A: Two steps used to create a permanent SAS data set

  • Assign a library and engine 
  • Create the data. Make sure to assign both a library and data set name to make the data set permanent. 

Q15: Define RUN-Group processing?

A: RUN-Group processing enables to submit a PROC step by using a RUN statement without closing the procedure.

Q16: Differentiate between CEIL and FLOOR function in SAS?

A: The ‘’FLOOR’’ returns the highest integer less than or equal to the argument. 

While the ‘CEIL’’ function remits the smallest integer greater than or equal to the argument.

Q17: What is the use of the %include statement?

A: %INCLUDE statement reads a whole file into the current SAS program you are running and submits the file to the SAS System right away.

Q18: Define PDV?

A: The Program Data Vector (PDV) is an analytical area of memory that is created during data processing. It builds a dataset of single observation at a time. An input buffer occurs at the time of compilation that carries a record from an external file. 

Q19: What is the method to debug and test your SAS program?

A: By using Obs=0, you can debug and test your SAS program and the system option to trace the program execution in the log.

Q20: What is the use of function Proc summary?

A: Proc summary is used to create tables of summary statistics as well as complex summary data sets. The user has great options that can be used to customize the procedure to produce.

Q21: What is the use of DSD in SAS?

A: Delimiter Sensitive Data (DSD) option edits how SAS handles delimiters when we use list input and sets the existing delimiter to a comma. When you identify DSD, SAS treats two successive delimiters in a row as a missing value, it ignores quotation marks as part of your data, and it also ignores delimiters in data values enclosed in quotation marks.

Q22: What are the SAS features do you use to check errors and data validation?

A: To check errors, use the log, and for data validation, we use Proc Means, Proc Freq, or sometimes Proc print to see how the data appears.

Q23: How to include or exclude a particular variable in a data set?

A: To include or exclude the particular data set you can use Drop, Keep statement, and data set options.

Q24: What is the difference between SAS procedures and functions?

A: Function expects argument values to be supplied across an observation in a SAS data set while procedure assumes the value of one variable per observation.

Q25: How do PROC SQL works?

A: PROC SQL is a simultaneous process for all the observations. The PROC SQL works as follows:

  • SAS scans each statement in the SQL procedure and verifies the syntax errors, such as missing semi-colons and invalid statements
  • SQL optimizers scan the query inside the statement. It decides how the SQL query should be executed to minimize the run time.
  • Any tables in the FROM statement are loaded into the data engine where they can be accessed in memory.
  • Code and calculations are executed.
  • The final table is created in memory.
  • The final table is sent to the output table described in the SQL statement.

Q26: Mention some of the SAS functions?

A: Some of the SAS functions are as follows:

  • Scan
  • Substr
  • Trim
  • Catx
  • Index
  • Find
  • Sum
  • Tranwrd

Q27: What is the use of tranwrd function?

A: The tranwrd function helps to remove or replace all the occurrences of a pattern of characters within a character string.

Q28: What can be the size of the largest data set in SAS?

A: Before SAS 9.1, the data sets could contain around 32,767 variables but, in SAS 9.1, the maximum number of variables in the SAS data set is limited by the resources available on the computer.

Q29: What is the difference between the options Nodup and Nodupkey?

A: The Nodup option eliminates the duplicate observations where the values in all the variables are repeated, while the Nodupkey option eliminates duplicate observations where the value of the variable registered in the By statement is repeated.

Q30: Explain scrubbing procedures in SAS?

A: The scrubbing procedures in SAS is to Proc Sort with the Nodupkey option. It helps to eliminate duplicate values.

Q31: How to test the debugging in SAS?

A: To test the debugging in SAS, you can use the Debug clause after ‘/’ in the data statement.

Q32: How you generate test data with no input data?

A: We can generate test data with no input data by using a PUT statement and Data Null.

Q33: How SUBSTR function works in SAS?

A: The SUBSTR function is used to abstract substring from a character variable.

Q34: What is the function of stop statement in SAS program?

A: Stop statement aim the SAS to stop processing the on-going data step at once and continues processing the statement after the end of the existing data step.

Q35: What are the features of SAS?

A: The features of SAS are as follows:

  • Analytics: SAS is the market leader in the analytics of several business services and products
  • Business solutions: It provides business analytics that can be used as business products for several companies
  • Reporting and graphics: SAS helps to visualize the analysis in the form of summary, lists, and graphic reports
  • Data access and management: It can also be used as a DBMS software
  • Visualization: We can visualize the reports in the form of graphs ranging from scatter plots and bar charts to complex multi-page classification panels.

Q36: What is the function of the output statement in the SAS program?

A: You can use the output statement to save summary statistics in a SAS data set. This information can be used to create customized reports to save historical information about the process.

You can use the options in the OUTPUT statement to 

  • Specify the statistics to save the output data set
  • Compute and save percentiles no automatically computed by the capability procedure, and
  • The name of the output data

You liked the article?

Like : 2

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses


About Author
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.

Stay Updated

Get stories of change makers and innovators from the startup ecosystem in your inbox