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;

No comments:

Post a Comment