Commonly Asked SAS Interview Questions with Answer (SDW) : 1

Ques (SDW) : How many different types of SQL's statements are we use mainly ?

Ans : There are six types of SQL's Statements but mainly we refer to THREE types only.


  • DDL : Data Definition Language
  • DML : Data Manipulation Language
  • DCL : Data Control Language





Commonly Asked SAS Interview Questions with Answer (ST) : 1 - 5

Ques (ST) 1: What are the basic steps for data mining in SAS Enterprise Miner ?

Ans : The basic step for data mining in SAS Enterprise Miner is SEMMA. It is a short form of five processes which are given below :

  • Sample   (S
  • Explore   (E)
  • Modify    (M)
  • Model     (M)
  • Access   (A)



Ques (ST) 2: What is SAS Add-In for Microsoft Office ?

Ans : The SAS Add-In for Microsoft Office is a Component Object Model (COM) which provides access to SAS Datasets from MS-Excel, MS-Power Point, MS-Word and MS Outlook.

It also allows SAS Stored Processes to be run on server and the result to be returned to either MS-Word or MS-Excel.



Ques (ST) 3: What is Change Management feature in SAS DI Studio ?

Ans : The Change Management feature in SAS DI Studio allows multiple users to work on same metadata repository at the same time without overwriting each other's change.


  • If Change Management is enabling for specific user then user could see pop-up with Check-in and Check-out.



  • If a metadata object has been checked out by one user, it means that metadata object is locked so that it could not be updated by other user until the specific object has been checked back in by that user.




Ques (ST) 4: What is SAS OLAP Cube Studio ?

Ans : The SAS OLAP Cube Studio is to build and define OLAP Cubes in SAS. It is a Java interface tool.

OLAP - Online Analytical Processing is a software technology which allows us to analyze the data from multidimensional database tables dynamically.

CUBE - A Cube is a specific set of data which is organized, structured in a hierarchical and multidimensional manner with various dimensions and stages of data. Cubes also contains measures which are numeric analysis of input tables



Ques (ST) 5: What are the SAS Stored Process Desktop Clients ?

Ans : There are many Desktop clients by which we can access or execute the SAS Stored Process.
Few names are given below :

  1. SAS Enterprise Guide
  2. SAS Information Map Studio
  3. SAS Add-In for Microsoft Office

Commonly Asked SAS Interview Questions with Answer : 66 - 70

Ques 66 : Is it possible that we could sandwich INSERT and DELETE or any other statements in between PROC SQL and QUIT statement ?

Ans : Yes, We could sandwich INSERT and DELETE or any other statements in between PROC SQL and Quit statement.

Syntax :
PROC SQL;
DELETE from DSN
WHERE Id="2458";
INSERT into DSN
Select * from Uma.DSN
WHERE ID="2458";
QUIT; 



Ques 67 : How many tables can we join in a single INNER JOIN in PROC SQL and what could be the maximum length of a macro variable ?

Ans : 32

  • We can combine a maximum of 32 tables in a single INNER Join
  • Maximum length for macro variable is 32 character



Ques 68 : What is the difference between INPUT Statement and INPUT Function in SAS?

Ans : The INPUT Statement is used to define the variables while INPUT Function converts character values to numeric values (by using informat).



Ques 69 : How to get the defined range of observations from a SAS Dataset ?

Ans : To get the observation of a define range from a SAS Dataset, we can use SAS dataset options FIRSTOBS= and OBS=.

Suppose we have a dataset with 100 observations but we just want to print observation from 50 to 55 then we need to specify FIRSTOBS and OBS dataset options.



  • FIRSTOBS= : Specifies the starting point of desired range
  • OBS= : Specifies the ending point of desired range


 

Ques 70 : What is the use of Single dash (-) and Double dash (--) in between variables in SAS like Var V1-V4 and Var V1--V4 ?

Ans : When variables of a SAS dataset are in successive naming convention with same prefix and we want to get all or few of them, we can use single dash (-) or double dash (--) to select the variables.

Single Dash (-) : When variables names are in same prefix with successive suffix of number, we can use single dash to specify the entire range of variables. It would exclude all other variables which don't have same prefix.

Double Dash (--) : When we want to get a list of variables from a dataset in order in which they are specified in dataset, we can use double dash (--). It would include all other variables which don't have same prefix as well.



Commonly Asked SAS Interview Questions with Answer : 61 - 65

Ques 61 : How could we create a SAS date value by using separate variables representing day, month and year of the date ?

Ans : We can use MDY function to create a SAS date value by using separate variables like day, month and year.





Ques 62 : What are the ways to view cube data when cube has been created by SAS OLAP CUBE Studio ?

Ans : We can view the cube data (cube - created by SAS OLAP CUBE STUDIO ) by following ways :

1.  SAS Enterprise Guide
2.  SAS Web OLAP viewer for java
3.  MS- Excel Pivot tables
4.  SAS Information Delivery Portal's visual data explorer portlet



Ques 63 : What are the load styles or ways to load the data to DW or permanent table by using TABLE LOADER transformation in SAS DI Studio ?

Ans : There are THREE ways to load the data to permanent table by using Table Loader Transformation in SAS DI Studio as given below :

1. Append to Existing
2. Replace
3. Update / Insert



Ques 64 : Can we create an Index on a View ?

Ans : No, We can not create an Index on View.



Ques 65 : Why we do Indexing (in simple word) and how many types of Indexes we can create in SAS ?

Ans : Indexing : To extract a small subset of observations from a large data set.

We can create two types of Indexes in SAS :

1. Simple Index
2. Composite Index

Commonly Asked SAS Interview Questions with Answer : 56 - 60

Ques 56 : What is the use of MEANS Procedure in SAS and what are the defaults statistics for it ?

Ans : The MEANS Procedure (PROC MEANS) is to get summarized data by computing descriptive statistics for numeric variables on across all observations.

PROC MEANS produced five statistics by default which are given below :
1. N (Number of non-missing values)
2. MEAN
3. STD DEV (Standard Deviation)
4. MINIMUM
5. MAXIMUM



Ques 57 : What are the basic difference between PROC MEANS and PROC SUMMARY in SAS ?

Ans : PROC MEANS with NOPRINT option is just like as PROC SUMMARY.

The basic difference between both is : By default, PROC SUMMARY creates an output dataset while PROC MEANS produces a printed output.



Ques 58 : What are the NULL data sets and DEFAULT data sets in SAS ?

Ans : There are three types of special SAS Data Sets in SAS :
1. Null Data sets : _NULL_

2. Default Data sets : _LAST_

3. Automatic naming convention Data sets : DATAn

* for DATAn, Kindly referQuestion 17



Ques 59 : What is the use of PUT and INPUT function in SAS ?

Ans : PUT Function : It converts numeric values to character values and it requires FORMAT.

INPUT Function : It converts character values to numeric values and it requires INFORMAT.


Proc contents output of Data set R:



Ques 60 : How can we count the number of missing values of numeric variable in a SAS data set ?

Ans : To count the number of missing values for numeric variable, We could use MEANS Procedure with NMISS option.


PROC MEANS DATA=DSN NMISS;
VAR NUMV;
RUN;

Commonly Asked SAS Interview Questions with Answer : 51 - 55

Ques 51 : How could we create an empty table which should have all the attributes of an existing table ?

Ans : By using LIKE clause in PROC SQL, we can create an empty table which would have all the attributes of an existing table.

PROC SQL;
CREATE TABLE DSN1
LIKE DSN;
QUIT;

* DSN1 and DSN are tables



Ques 52 : While using SQL Procedure in SAS, What is the difference between 'SET' clause and 'VALUE' clause ?

Ans : For SQL Procedure in SAS, we use 'SET' clause and 'VALUE' Clause to insert the rows / value into the table.

By using SET clause we can assign values to column by name irrespective of column position while VALUE clause assigns values to column by column position.

* For SET clause, if we don't specify the data for a column then value of that column would be a missing value

* For VALUE clause, if we don't specify the data for a column then there would be an error : Row is not inserted



Ques 53 : What is 'TRANS_RC' and 'JOB_RC' in SAS DI Studio ?

Ans : TRANS_RC and JOB_RC are job's status handling macro variables. 
we can set &Trans_rc and &Job_rc macro variables with respect to the return code value of completed transformation and individual steps within a transformation respectively in SAS DI Studio.



Ques 54 : What is the difference between '%STR' and '%BQUOTE' SAS macro functions ?

Ans : %STR and %BQUOTE macro functions are for masking the special characters and Mnemonics. 

We can use %STR macro function is specifically for unmatched quotation marks and parentheses while we use %BQUOTE macro function for matched quotation marks and parentheses.

Macro function %STR is a compilation function while %BQUOTE is execution function.



Ques 55 :  What is the difference between '%EVAL' and '%SYSEVALF' SAS macro functions ?

Ans : SAS Macro functions %EVAL and %SYSEVALF are to evaluate the arithmetic expression.

%EVAL function supports only integer arithmetic expressions while %SYSEVALF function supports floating point values for arithmetic expressions.

Example:
%LET A=%EVAL(10+5);

%LET B=%SYSEVALF(10.5+ 5.5);

%Put The value of A is &A and the value of B is &B;