31 March 2008

SAS Technical questions for your interview

What is the difference between %LOCAL and %GLOBAL?

They are used to create local and global macro variables.

What do the MOD and INT function do?

MOD and INT are numeric functions. The first argument to the MOD function is a numeric, the second is a non-zero numeric; the result is the remainder when the integer quotient of argument-1 is divided by argument-2.

The INT function takes only one argument and returns the integer portion of an argument, truncating the decimal portion.

When looking for contained in a character string of 150 bytes, which function is the best to locate that data: scan, index, or indexc?

INDEX function. Scan just sub strings the data and INDEXC looks for one char.

What is the significance of the ‘OF’ in X=SUM(OF a1-a4, a6, a9);?

Without OF this will be considered as subtraction. I mean a4 will be subtracted from a1.

What do the PUT and INPUT functions do?

PUT converts Numeric to character and INPUT converts Character to Numeric explicitly

Which date function advances a date, time or date/time value by a given interval?

INTNX

In the following DATA step, what is needed for ‘fraction’ to print to the log? data _null_; x=1/3; if x=.3333 then put ‘fraction’; run;

FRACTw. format can be used to accomplish this

2 comments:

  1. Hi,

    Will you write about more interview questions ?

    ReplyDelete
  2. Hi

    We will continue collecting and answering any interview questions related to Clinical Research, CDM and SAS. We are looking for product specific questions and we hope to build up a comprehensive list in the next few weeks.

    ReplyDelete