proc sql ;
select count(distinct origin) into: count from sashelp.cars ;
select distinct(strip(origin)) into:or1-:or%left(&count) from sashelp.cars ;
quit;
%put &or1 &count ;
%macro test ;
proc sql ;
%do i=1 %to 1 ;
%global co make%left(&co) ;
select count(distinct make) into:co from sashelp.cars
where strip(origin)="&&or&i" ;
select distinct make into:make1-:make%left(&co) from sashelp.cars
where strip(origin)="&&or&i" ;
%end;
quit;
%mend ;
options mprint symbolgen ;
%test ;
%put &make1 ;
when I want to see value of make1 macro variable it is showing not resolved.
How to convert local to global macro variable?
... View more