Showing posts with label SAS interview question with answer. Show all posts
Showing posts with label SAS interview question with answer. Show all posts

Commonly Asked SAS Interview Questions with Answer : 11 -15

Ques 11 : What is Format and Informat in SAS ?

Ans : In a simple word, when we are writing or printing the data from the SAS, we use Format to read the data as required and when we write the data to the SAS, we can use Informat to read the data by the SAS as required.
My favourite one liner : Informats are to read the data by SAS and Formats are to write the data by SAS.




Ques 12 : What is the type of variable in SAS ?

Ans : A Variable type is either character or numeric in SAS and each variable has a name that conforms to SAS naming conventions.



Ques 13 : How we could get the Descriptor information of an individual SAS dataset ?

Ans : We can use PROC CONTENTS (Procedure) to create SAS output which would describe the contents of the library and descriptor information of an individual SAS dataset.

Syntax : PROC CONTENTS DATA = Libref._ALL_ NODS ;                                  Run;



Quest 14 : If we use "Contents" Statement with PROC DATASETS, then what could be the result ?

Ans : The result would be same as Proc Contents (Procedure).
PROC DATASETS with Contents Statement is to view the contents of a SAS library or the descriptor information of a dataset.

Syntax :  PROC DATASETS;
                Contents Data = Libref._All_ Nodetails; 
                Quit ;



Ques 15 : How can we copy an entire SAS Library to other location ?

Ans : With the help of PROC DATASETS we can copy an entire SAS Library to other location.

Syntax :      Proc Datasets Library = Source;
                    Copy Out = Destination;
                    Quit;

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.