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
What is the difference between using drop = data set option in data statement and set statement?
What are the table names in oracle database...?
Tell e how how dealt with..
how does sas handle missing values in functions? : Sas programming
what is the purpose of _error_? : Sas programming
what are the types of interactive display types? : Sas-bi
What is the role of unrestrictive users? : sas-grid-administration
What do the put and input function do?
Mention what are the data types does SAS contain?
In SAS explain which statement does not perform automatic conversions in comparisons?
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
What is the use of function Proc summary?
Differences between where and if statement?
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
what is the effect of the options statement errors=1? : Sas programming