How could i automate the code in the scenario:Every month
one new data set will be created for that perticular month
transaction list.Now i would like to update the data in the
source table by appending every month data automatically.
jan---set jan;
feb---set jan feb;
mar---set jan mar;

Answer Posted / naresh

%macro update_table(demo1)
%let X = "JAN,FEB,MAR,APR";

%do i = 1 %to 4
%let y = scan(&x,i,',');

data &Master_table;
update &Master_table &y;
by acc_id;
run
%let i = %eval(&i+1);
%end;
%mend update_table;

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between using drop = data set option in data statement and set statement?

636


What are the table names in oracle database...?

2248


Tell e how how dealt with..

1752


how does sas handle missing values in functions? : Sas programming

597


what is the purpose of _error_? : Sas programming

606






what are the types of interactive display types? : Sas-bi

651


What is the role of unrestrictive users? : sas-grid-administration

571


What do the put and input function do?

583


Mention what are the data types does SAS contain?

695


In SAS explain which statement does not perform automatic conversions in comparisons?

795


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

694


What is the use of function Proc summary?

651


Differences between where and if statement?

580


what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake

1915


what is the effect of the options statement errors=1? : Sas programming

588