Commonly Asked SAS Interview Questions with Answer : 71 - 75

Ques 71 : What is the difference between OUTPUT and PUT statement in SAS ?

Ans : PUT Statement is to write the variable values or text strings to an external file or SAS log or SAS output window in SAS while OUTPUT Statement is to write observations to a SAS dataset.



Ques 72 : What are the table look-up techniques in SAS (any four) ?

Ans : There are four table look-up techniques in SAS :

  1. Match Merge of two sas data sets
  2. Format tables
  3. Arrays
  4. Direct Access by using Point option



Ques 73 : Can we use Global Statements anywhere in SAS ? How many Global Statements have you used ?

Ans : Yes, We can use Global Statements anywhere is SAS program. I have used several Global Statements and some names are as given below :

  1. FILENAME    : To access data file
  2. LIBNAME      : To access SAS data libraries
  3. FOOTNOTE  : To write 10 foot note lines
  4. TITLE            :  To write title lines
  5. COMMENT   : To specify the purpose of program
  6. %INCLUDE   : To include files of SAS statements
  7. %LIST           : To list lines from current session
  8. OPTIONS      : To specify the SAS system options
  9. RUN              : To execute the previously entered SAS statements
  10. SKIP              : To create a blank line in SAS log



Ques 74 :  Can we use multiple SAS directories or libraries in a single Libname Statement ?

Ans : Yes, We can use multiple SAS directories or libraries in a single Libname Statement.

Kindly refer : Library Concatenation



Ques 75 : How could we read an external file which contains long lines ? or What is the use of LRECL in Infile / File SAS Statement ?

Ans : We can use LRECL (Logical Record Length) SAS system option to read or write the lines longer than 256 character.

As we know that logical record length for Windows and Unix systems is 256 bytes, to read or write the long data we can specify LRECL with Infile or File Statement in SAS.

  • Minimum and Maximum LRECL is 1 and 32767 bytes respectively

No comments:

Post a Comment