By admin | August 14, 2009

SAS Certified Adv Programmer 50 Questions (21)

The following SAS program is submitted at the start of a new SAS session:

%macro trans;
    %let type=Airplane;
    proc print data=sasuser.activities;
        where trans="&type";
    run;
    %location(Automobile)
    %put type is &type;
%mend;

%macro location(type);
    data _null_;
        call symput('type', 'Train');
    run;
%mend;
%trans

Which one of the following is written to the log by the %PUT statement?

a. type is &type
b. type is Train
c. type is Airplane
d. type is Automobile

3 comments | Add One

  1. admin - 08/14/2009 at 1:30 pm

    C

  2. Consty - 02/13/2013 at 4:06 pm

    C: type is Airplane

  3. Blaiso - 05/31/2013 at 11:22 pm

    C. the value Train is rather that of a local macro variable valid inside the program location

Leave a Comment

Leave a Reply

Your email address will not be published.