Hello All, I am trying to create a new column with using macro variables which were created by the beginning of program. But the macro variable doesn't show up as variable I assigned. It comes with "&location_name' Or it gives me an error ERROR: The following columns were not found in the contributing tables Here is a code I used... Data location; id=1; location_name='London'; sas_name='qqq'; output; id=1; location_name='New York'; sas_name='www'; output; id=1; location_name='Tokyo'; sas_name='eee'; output; Run; ..................... .............................. %macro process; %let I=1; %let sas_name=%scan(&sas_name_list, &1); %let location_name=%scan(&location_name_list, &1); %do %until(&sas_name= ); Proc SQL; Create table &sas_name as Select *, &location_name as loc_name from work.&sas_name; quit; %let I=%val(&I +1); %let sas_name = %scan(&sas_name_list, &I); %let location_name = %scan(&location_name_list, &I); %end; %mend; %process; Please let me know if anything is unclear and thanks! &location_name as loc_name
... View more