Showing posts with label input buffer. Show all posts
Showing posts with label input buffer. Show all posts

Commonly Asked SAS Interview Questions with Answer : 1 - 5

Ques 1 : What is SAS ?

Ans : SAS is a combined system for software solution which provide us the facility to retrieve the data, input the data, data management for writing the reports as well as for graphic design, statistical analysis and mathematical analysis.

In a common word we can say that " SAS is a integration of modules which are used to create, analyse and process the data." 

Originally it was only to use for statistical calculation and for creating reports but now it is in every field with specific tool.


Ques 2 :  What is PDV ?

Ans : PDV stands for Program Data Vector. In a general term "whenever SAS creates a new dataset, The information about each of the variable is stored in a reserved area of memory known as PDV." Here SAS creates a virtual dataset which keeps one observation at a time.


Ques 3 : What is Input Buffer ?

Ans : Input buffer is also a memory where SAS puts each record of data line by line if it is read by input file. Input buffer is created during the compile stage of data to hold the record from external file.


Note :  If input file is a SAS dataset, then SAS does not create an input buffer, it writes the data directly to the PDV.


Ques 4 : What are the stages in data step to process the data in SAS ?

Ans : SAS processes DATA Step in two stages :
                1. Compile Stage
                2. Execution Stage


Ques 5 : What is Descriptor and Data portion in SAS ?

Ans :  During the compile stage of data step, SAS conclude whether variable is character or numeric and defines the storage length of each variable. This facility or information is called as Descriptor Portion of data set. 
In a single line " Descriptor portion of a SAS dataset contains the information about the dataset".

The Data Portion of a sas dataset is a collection of data values which are positioned in a rectangular table. 

SAS PDV - Program Data Vector In SAS

Hi,

PDV (Program Data Vector) : The information about each of the variables is stored in a reserved area of memory called PDV.

SAS Processes data steps in two stages : (1) Compile Stage  (2) Execution Stage

In Compile stage SAS does some housekeeping jobs like to prepare an area to store the sas dataset, then to check input file ( infile statement) to fix various attribute of input file. Then to put all the information at a place in memory called as INPUT BUFFER (where it place each record of data as it is read from the input file).

SAS checks for each variable is character or numeric and the storage length of each variable, this information is called the descriptor portion of the data set.

Descriptor Portion contains : Name of data set, Date and time that the data set was created , Number of observations and the number of variables (It contains attribute information for each variable in the data set )

SAS does following action during compile stage :

(a)  Syntax Scan

(b)  Sas Source code translation to machine language

(c)  Definition of input and output files

(d)  Create input buffer, PDV and data set descriptor information

(e)  Setting the variable attribute for output sas data set

(f)  Capture of variables to be initialized to missing.

 

Regards

Uma Shanker Saini