Commonly Asked SAS Interview Questions with Answer : 6 - 10

Ques 6 : What are the Automatic Variables in SAS ?

Ans : Automatic variables are automatically created by Data Step in SAS. There are two default automatic variable in SAS :
            1. _N_                          2. _ERROR_

_N_ : It represents the number of times of Data Step iteration. It is initially set to 1 and increases by 1 for each complete iteration of data step.

_ERROR_ : It is initially set to 0. Whenever any error come across in SAS code or data step, it increases by 1.



Ques 7 : Are Automatic Variables added to PDV ?

Ans : Yes, Automatic Variables are added to PDV but these are not a part of output data set being created.



Ques 8 : How many ERRORs SAS prints by default ?

Ans : 20 Errors at a time.



Ques 9 : How many data types are there in SAS ?

Ans : There are only two type of data type for variable in SAS :
             1. Character              2. Numeric
Note : SAS date values are in Integer



Ques 10 : What is SAS Date and what is the use of it ?

Ans : SAS Date is " 01 January 1960". It helps to calculate the given date.  SAS keeps dates as integer and values would be equal to the number of days from 01 January 1960.

No comments:

Post a Comment