Friday, 6 February 2015

SAS Certification question, sas interview questions and answers (Page 7)

Below are some important SAS interview questions which are asked in most MNC company interviews for beginners or professionals.

31) How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
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. Note that the argument can be an

A = 123456 ;
X = INT( A/1000 ) ;
Y = MOD( A, 1000 ) ;
Z = MOD( INT( A/100 ), 100 ) ;
PUT A= X= Y= Z= ;

32) How to CREATE an external dataset with sas code?
I thought about sth like this:
Data _null_;
filename fileref <device-type>
something like this buy it do not work.
and i would like to add BLK, DISP; UNIT SIZE

33) What is the use of Proc SQl?
PROC SQL is a powerful tool in SAS, which combines the functionality of data and proc steps. PROC SQL can sort, summarize, subset, join (merge), and concatenate datasets, create new variables, and print the results or create a new dataset all in one step! PROC SQL uses fewer resources when compared to that of data and proc steps. To join files in PROC SQL it does not require to sort the data prior to merging, which is must, is data merge.

34) How can u create zero observation dataset?
Creating a data set by using the like clause.ex: proc sql;create table latha.emp like oracle.emp;quit;In this the like clause triggers the existing table structure to be copied to the new table. using  this method result in the creation of an empty table.

35. What are input dataset and output dataset options?
Input data set options are obs, firstobs, where, in output data set options compress, reuse.Both input and output dataset options include keep, drop, rename, obs, first obs.
More Questions & Answers :-
Page1  Page2  Page3  Page4  Page5  Page6  
Page7  Page8

No comments:

Post a Comment