Professional Documents
Culture Documents
Macro
Macro
Macro
%let a= 10;
%macro test;
%let a= 20;
%mend test;
%test
%put _user_;
2.
%let a=10;
%macro test;
%let b=20;
%put _local_;
%mend test;
%test
%put _user_;
3.
%let a=10;
%macro test;
%local a;
%let a= 30;
%put _local_;
%mend test;
%test
%put _user_;
What will be the value of a?
4.
%let a= 20;
%macro test;
data _null_;
call symputx('B', 30);
run;
%mend test;
%test
%put _user_;
What will be the value of a and b?
5.
%let a=30;
%macro test;
data _null_;
call symputx('a', 20);
%let a=40;
run;
%mend test;
%test
%put _user_;
What will be the value of a?
6.
%let a=40;
%macro test;
data _null_;
call symputx('c', 60);
run;
%let b=50;
%put _local_;
%mend test;
%test
%put _user_;
What will be the value of a b c?
7.
%let a=10;
%macro test;
%local a;
data _null_;
call symputx('a', 20);
run;
%put _local_;
%mend test;
%test
%put _user_;
What will be the value of a?