My SAS Tutorials

Monday 14 July 2014

SAS INTERVIEWS CONCEPTUAL QUESTIONS XXIV

We have a SAS data Set:

              One

Name          Age
Ram 27
Sita 28
Radha 21
Arjun  20
Ram 27
Radha 21
Arjun  20
Sita 28
Bhim 19


Required Output:(We need to remove the duplicates without changing the order of the observations)

                Two
Name          Age
Ram 27
Sita 28
Radha 21
Arjun 20
Bhim 19

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

1 comment:

  1. Data test;
    infile datalines dsd;
    input Name $ Age ;
    X+1;
    datalines;
    Ram,27
    Sita,28
    Radha,21
    Arjun,20
    Ram,27
    Radha,21
    Arjun,20
    Sita,28
    Bhim,19

    ;
    run;

    proc sort data = test
    out = test1 nodupkey;
    by name;
    run;

    Proc sort data = test1 out = test2(drop = X);
    by X;
    run;

    ReplyDelete