Interview Questions

AJAX Interview Questions Android Interview Questions Angular 2 Interview Questions AngularJs Interview Questions Apache Presto Interview Questions Apache Tapestry Interview Questions Arduino Interview Questions ASP.NET MVC Interview Questions Aurelia Interview Questions AWS Interview Questions Blockchain Interview Questions Bootstrap Interview Questions C Interview Questions C Programming Coding Interview Questions C# Interview Questions Cakephp Interview Questions Cassandra Interview Questions CherryPy Interview Questions Clojure Interview Questions Cobol Interview Questions CodeIgniter interview Questions CoffeeScript Interview Questions Cordova Interview Questions CouchDB interview questions CSS Buttons Interview Questions CSS Interview Questions D Programming Language Interview Questions Dart Programming Language Interview Questions Data structure & Algorithm Interview Questions DB2 Interview Questions DBMS Interview Questions Django Interview Questions Docker Interview Questions DOJO Interview Questions Drupal Interview Questions Electron Interview Questions Elixir Interview Questions Erlang Interview Questions ES6 Interview Questions and Answers Euphoria Interview Questions ExpressJS Interview Questions Ext Js Interview Questions Firebase Interview Questions Flask Interview Questions Flex Interview Questions Fortran Interview Questions Foundation Interview Questions Framework7 Interview Questions FuelPHP Framework Interview Questions Go Programming Language Interview Questions Google Maps Interview Questions Groovy interview Questions GWT Interview Questions Hadoop Interview Questions Haskell Interview Questions Highcharts Interview Questions HTML Interview Questions HTTP Interview Questions Ionic Interview Questions iOS Interview Questions IoT Interview Questions Java BeanUtils Interview Questions Java Collections Interview Questions Java Interview Questions Java JDBC Interview Questions Java Multithreading Interview Questions Java OOPS Interview Questions Java Programming Coding Interview Questions Java Swing Interview Questions JavaFX Interview Questions JavaScript Interview Questions JCL (Job Control Language) Interview Questions Joomla Interview Questions jQuery Interview Questions js Interview Questions JSF Interview Questions JSP Interview Questions KnockoutJS Interview Questions Koa Interview Questions Laravel Interview Questions Less Interview Questions LISP Interview Questions Magento Interview Questions MariaDB Interview Questions Material Design Lite Interview Questions Materialize CSS Framework Interview Questions MathML Interview Questions MATLAB Interview Questions Meteor Interview Questions MongoDB interview Questions Moo Tools Interview Questions MySQL Interview Questions NodeJS Interview Questions OpenStack Interview Questions Oracle DBA Interview Questions Pascal Interview Questions Perl interview questions Phalcon Framework Interview Questions PhantomJS Interview Questions PhoneGap Interview Questions Php Interview Questions PL/SQL Interview Questions PostgreSQL Interview Questions PouchDB Interview Questions Prototype Interview Questions Pure CSS Interview Questions Python Interview Questions R programming Language Interview Questions React Native Interview Questions ReactJS Interview Questions RequireJs Interview Questions RESTful Web Services Interview Questions RPA Interview Questions Ruby on Rails Interview Questions SAS Interview Questions SASS Interview Questions Scala Interview Questions Sencha Touch Interview Questions SEO Interview Questions Servlet Interview Questions SQL Interview Questions SQL Server Interview Questions SQLite Interview Questions Struts Interview Questions SVG Interview Questions Swift Interview Questions Symfony PHP Framework Interview Questions T-SQL(Transact-SQL) Interview Questions TurboGears Framework Interview Questions TypeScript Interview Questions UiPath Interview Questions VB Script Interview Questions VBA Interview Questions WCF Interview Questions Web icon Interview Questions Web Service Interview Questions Web2py Framework Interview Questions WebGL Interview Questions Website Development Interview Questions WordPress Interview Questions Xamarin Interview Questions XHTML Interview Questions XML Interview Questions XSL Interview Questions Yii PHP Framework Interview Questions Zend Framework Interview Questions Network Architect Interview Questions

Top 13 SAS Interview Questions for 2022

1. What is SAS and its functions?

SAS (Statistical Analysis System) is statistical software designed by SAS Institute in 1960 for data inspection and report writing. SAS runs on Windows, UNIX and can be downloaded into Mainframe too. It is an integrated software suite that enables us to perform statistical analysis by altering, managing, and retrieving data from a variety of sources for software solution development. It provides a graphical point-and-click user interface for non-technical users and more advanced options through SAS language.

Functions of SAS

  • Statistical and Mathematical Analysis
  • Data Entry, Retrieval, and Management
  • Forecasting, planning and Decision Support
  • Research and Management
  • Report Creation and Graphics

2. What is SAS Data Set?

SAS Dataset is a SAS table or file stored in a SAS library that SAS recognizes and processes.  It is created from datalines in one's code or as the outcome of data extracted/manipulated from either a database or an external raw file. In a SAS Dataset, values are organized in a table of observations (rows) and variables (columns) and these values get processed by SAS software. A SAS dataset provides descriptor information which includes data types, length of variables, and which engine was used to create data.

3. Describe the basic structure of SAS program.

SAS program consists of three steps sequentially in which DATA and PROC are its main component as follows:
  • SAS DATA step retrieves and manipulates data and starts with DATA keyword. It produces a SAS data set named DISTANCE. It is used for getting input data into a SAS dataset and also for editing i.e., checks errors in data and corrects them.
  • SAS PROC analyzes the data. The PROC statement starts beginning of all procedures in SAS.
  • SAS OUTPUT step throws the result of analyzed data. A program ends when the PROC step ends with RUN statement. It is used to save summary statistics in a SAS data set.

4. What are the syntax rules of a SAS program?

There are three components of a SAS program with syntax rules as follows: SAS statements
  1. Statements can begin and stop anywhere, and there should be a semicolon at the end of every line as the end mark.
  2. Multiple statements can lie on the same line in which each statement ends with a semicolon.
  3. The components in a SAS program can be separated by using space.
  4. Every SAS program must end with RUN statement.
SAS Variables
  1. Length of a Variable name can be up to 32 characters.
  2. A variable name will be without blank.
  3. A variable name must start with any character (not case sensitive)or an underscore (_).
  4. A variable name can include number excepting its first character.
  5. Variable names are case insensitive.
SAS Data Set
  1. The name of a SAS Data Set can be prefixed with a library name which makes it a permanent Data Set such that it will be persisted even after the session get over.
  2. A single word after the DATA statement indicates a temporary data set name by which a data set gets erased at session end.
  3. If a SAS data set name get erased then SAS creates a data set whose name gets generated by SAS like (DATA1, DATA2, etc.)

5. What is PDV?

PDV (Program Data Vector) represents a logical area of memory that is formed at the time of DATA step processing and can also be created by the MERGE, SET, MODIFY or UPDATE statements in Data Step. It is a storage place where SAS builds the Data Set by reading one observation at a time. An input buffer is created during the compilation phase which holds a record from an external file. There are two types of variables encountered for every DATA step:
  1. Permanent (Data Set and computed variables)
  2. Temporary (Automatically generated and Option defined)

6. How many data types in SAS ?

SAS consists of two data types: Character and Numeric. Apart from these, dates also exists as characters although there are implicit functions to work upon dates.

7. What are _N_ and _Error_ in SAS?

_N_ and _Error_ are the temporary variables in SAS that gets generated automatically by the DATA step processing.

8. Difference between PROC MEANS and PROC SUMMARY.

  • PROC MEANS produces a printable output by default while a PROC SUMMARY statement requires a PRINT option.
  • PROC MEANS procedure produces default statistics (N, Mean, Standard Deviation, Minimum and Maximum) while PROC SUMMARY procedure provides the values _type_, _freq_, and _stat_.

9. Differences between One-to-One Merging and Match Merging.

  • One-to-one merging combines observations from multiple data sets into a single observation in a new SAS data set while Match-merging does this process according to the values of a common variable.
  • One-to-one merging uses the MERGE statement without BY statement while Match-merging use BY statement at just after the MERGE statement.
  • One-to-one merging is suitable for matching observations while Match-merge is suitable if the observations do not match.

10. How to create a permanent SAS data set?

To create a permanent SAS data file:
  1. Define a SAS library using the LIBNAME statement and assign an engine.
  2. Write the data. Assign both the library (other than work) and the name of data set for creating a permanent SAS data set.

11. List the error types that SAS recognizes.

These are the following error types that SAS recognizes:
  • Syntax errors occur when programming statements do not confirm the rules of SAS language. These errors are detected at the compile time.
  • Semantic errors occur when the language element is correct but might not be valid for a particular usage. These errors are detected at the compile time.
  • Execution-time occurs when SAS tries to execute a program and execution fails. These errors are detected at the execution time.
  • Data errors occur by the invalid data values and get detected at the time of execution.
  • Macro-related errors occur by the incorrect use of the macro facility and get detected at the execution time or macro compile time.

12. What do Input and Put function do?

Input function performs Character to numeric conversion. Input(source,informat) put function performs Numeric to character conversion. put(source,format)

13. What is SAS language?

SAS language is a computer programming language used for statistical analysis that can read data from common spreadsheets and databases and outputs the statistical analysis result in tables, graphs, and as RTF, HTML, and PDF documents.