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

What does a PROC TRANSPOSE do?

8 Answers   Accenture,


how to intersect the tables by using PROC MIXED?

1 Answers   CitiGroup,


what techniques and/or procs do you use for tables? : Sas programming

0 Answers  


What other SAS features do you use for error trapping and data validation?

2 Answers  


What is the maximum and minimum length of macro variable

0 Answers  






Does anybody has lastest SAS certification dumps,if anybody has please mail me at akshara_SAS@ymail.com Thanks Akshara

55 Answers  


what is sas business intelligence? : Sas-bi

0 Answers  


What is the difference between order and group variable in proc report?

0 Answers  


what is the usage for assigning error=1 in a dataset ?

2 Answers   Satyam,


How would you generate 1000 observations from a normal distribution with a mean of 50 and standard deviation of 20. How would you use PROC CHART to look at the distribution? Describe the shape of the distribution.

1 Answers  


What is the difference between an informat and a format. Name three informats or formats.

6 Answers  


What are the difficulties u faced while doing vital signs table or dataset?

0 Answers  


Categories