Commonly Asked SAS Interview Questions with Answer : 16 -20

Ques 16 : Could you write a data step to create a SAS dataset with minimum use of SAS rules and letters?

Ans :      Data ;          
                 X=1;       
                 Run;



Ques 17 : Why have you not written SAS dataset name in above answer ? Would it get run or not ?

Ans :  The above example would get run as if we don't provide the sas dataset name in data step then SAS would use its by default sas dataset names that are 'DATA1, DATA2........DATAn.



Ques 18 : What would happen if I write "DATE" in place of Data in answer 16 ? It's just a typo mistake. Would it get run or not ? 'Yes' / 'No'... Explain.

Ans : It would get run with a warning like 'Assuming the symbol DATA was misspelled as DATE'.

for more info : Types of ERRORs in SAS



Ques 19 : What is _NULL_ and why have you not used this for question 16 ? What about the _LAST_ ?

Ans : You have asked to create a SAS dataset in above question and of course minimum letters of English.

_NULL_ is the default keyword in SAS which execute a datastep but does not create any dataset so i have not used it.

_LAST_ defines the most recently created SAS dataset. If we execute any Data step or Proc step without specifying any input dataset then by default SAS uses the _LAST_.



Ques 20 : Where we can use SAS datasets name ? How ? When ? Why ?

Ans : We named SAS dataset name when we need to create them.
If we want to create an output dataset in data step then we need to provide it in DATA Statement.

If we want to create an output dataset in Proc step then we need to name it in Procedure or in Output Statement.

If we don't provide any data set name then SAS would use it's default dataset names.

We can use SAS dataset name with following Statements, Procedures, Function and Options:

A.  Data Statement
B.  Set Statement
C.  Merge Statement
D.  Update Statement
E.  Modify Statement
F.  Data = DSN ( as option of any SAS procedure )
G. Open function

Whenever we create sas view, we also name SAS dataset name in SAS Procedure ( in PROC SQL ) and View = Option for Data step.





* Today I played both the role ( Interviewer and Candidate ), If you feel that answers are not completely polite in nature. I just tried to show some attitude in nature. Candidate is there to get the job not to beg the job. Attitude matters, it shows your confidence,But be POLITE.

4 comments:

  1. thanks for sharing ....Its very informative and helpful for guys like me who want to build a career in analytics/SAS. I regularly follow ur blogs....thanks

    ReplyDelete
  2. Thank you for sharing. I am preparing for base SAS Certification. Please send me any dumps and other information that is useful for the prepation. Thank you!!!

    ReplyDelete
  3. Hello Uma Shankar..Thanks for sharing all...concpet clearing material..really very much helpful for a beginer.

    ReplyDelete
  4. Hello Uma Shankar..Thanks for sharing all..stuff...really helpfull..

    ReplyDelete