By admin | August 13, 2009

SAS Certified Adv Programmer 50 Questions (19)

The following SAS program is submitted:

data towns;
    input City $ pop year;
cards;
ANDOVER 75000 1998
CARY 80000 1998
ANDOVER 14000 1977
CARY 71000 1986
;

%macro a(location);
    data a;
        set towns;
    %if &location=UK %then %do;
        where city='ANDOVER';
    %end;
    %if &location=NC %then %do;
        where city='CARY';
    %end;
    if pop>70000;
    run;
%mend;
%a(UK)

Which one of the following represents the resulting output in the SAS data set A?

a. 1 observation with the value of CARY for the variable City
b. 2 observations with the value of CARY for the variable City
c. 1 observation with the value of ANDOVER for the variable City
d. 2 observations with the value of ANDOVER for the variable City

One comment | Add One

  1. admin - 08/13/2009 at 2:28 pm

    C

Leave a Comment

Leave a Reply

Your email address will not be published.