My SAS Tutorials

Friday 14 March 2014

WNS Interview Questions

1.       What is PDV?
2.       Diff between where & if statement in respect to PDV?
3.       Different ways of creating macro variables.
4.       Diff between call symputx & %let.
5.       What are intck & intnx functions & what is the diff between them.
6.       What is vlookup in Excel?
7.       What are the diff types of joins?
8.       What are macros % what are the debugging techniques in macro.
9.       What is symbolgen?
10.   %let i= 1+2
%put &i.
What is the value of i.
11.   What  is the function used in macros to do arithmetic calculations?
12.   What  is the function used in macros to use SAS functions?
13.   What is data _null_ ?
14.   %let i=1
Data _null_;
Set one;
Call symputx (‘x’, 2);
Run;
%put &i
What is the value of i?

15.   %let i=1
Data _null_;
Set one;
Call symputx (‘x’, 2);
%put &i
Run;
What is the value of i?

16.    what are the key factors that should  be considered while converting .CSV, .txt & .xls to SAS data set.

17.   What is the statement used to reference .csv file in data step?

18.   Data set one has 5 observations & two has 10 observations. What will be the no. of observations in the output datasets in the below programs.

Data three;                 Data four;
Set one two;               set one;
Run;                              set two;
                                      Run;

19.   What is the name of the following methods referenced in data step processing.

Data three;                 Data four;
Set one two;               set one;
Run;                              set two;
                                      Run;


20.   Write the syntax for inner join in proc SQL & data step processing.


21 We have a SAS Data Set One:

One
Name Subject Marks
Ram                             Maths 30
Ram                     Maths  20
Ram                       Sceince   30
Ram                       Sceince   50
Ram                        Sceince   60
Ram                           History  30
Ram                          History  50

                          We need the output Like:
                                    Two
Name Subject Marks Total
Ram                             Maths 30 30
Ram                     Maths  20 50
Ram                       Sceince   30 30
Ram                       Sceince   50 80
Ram                        Sceince   60 140
Ram                           History  30 30
Ram                          History  50 80

                                     And
                                     Three


Name Subject Marks
Ram                     Maths  20
Ram                        Sceince   60
Ram                          History  50

Now prepare your Base SAS and Advance SAS Certification Exams with Online Mock tests:  http://exam.sankhyana.com

For training related info kindly mail us at info@sankhyana.com
Sankhyana Consultancy Services
www.sankhyana.com



1 comment:

  1. 21Ans:
    data one;
    input name$ Sub$ Marks;
    cards;
    Ram Maths 30
    Ram Maths 20
    Ram Sceince 30
    Ram Sceince 50
    Ram Sceince 60
    Ram History 30
    Ram History 50
    ;
    run;
    sorted by sub.

    data two;
    set one;
    by sub;
    if first.sub=1 then total=0;
    total + marks;
    run;

    data three (drop=total);
    set one;
    by sub;
    if first.sub=1 then total=0;
    total + marks;
    if last.sub=1;
    run;

    ReplyDelete