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;

Answers were Sorted based on User's Feedback



How could i automate the code in the scenario:Every month one new data set will be created for tha..

Answer / 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

How could i automate the code in the scenario:Every month one new data set will be created for tha..

Answer / satheesh

%macro sam (&mon);
data &mon1.;
set &mon.;
run;

proc append base = sav.appendData data = &mon.;
run;
%mend;
%sam(Jan);
%sam(Feb);
%sam(Mar);

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SAS Interview Questions

how to delete the duplicates by using proc sql?

3 Answers   Genpact,


What is the difference between nodupkey and nodup options?

0 Answers  


How to get top scorer student from a class-table having different sections A,B, C & D? Each section having same number of students.

2 Answers  


Which is the Best SAS training Institute in Delhi NCR for SAS certification preparation

1 Answers   SAS,


Describe the function and untility of the most difficult SAS macro that you have written.

0 Answers  






what is syntax of proc merge ?

7 Answers   TCS,


what are different type of sas servers ? On which server does the sas code execute ?

4 Answers   TCS,


what is sas application server? : Sas-di

0 Answers  


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

0 Answers  


explain the main difference between the nodup and nodupkey options? : Sas-administrator

0 Answers  


is QUALCOMM using SAS ?

1 Answers  


What is the basic syntax style in SAS?

0 Answers  


Categories