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 are all the problems you faced while validating tables and reports?

0 Answers   Accenture, Quintiles,


Hi... this is chandu, did MSc Microbiology, trying to get job in SAS tool, PLZ Tell me whether IT industries will give consider my education to gain a job....?

2 Answers  


How to sort in descending order?

0 Answers  


what is the difference between informat$8. $char8.

3 Answers   SAS,


what is sas application server? : Sas-di

0 Answers  






Difference between informat and format?

0 Answers  


In this question, I rename the numeric variable phone to numphone and then try use phone=put(numphone,comma16.) to store the numeric value numphone as a string value in phone. But I get a warning tha numphone already exists and in the data sat phone doesnt exist and numphone is set to missing. Why? data names_and_more; input Name $20. Phone : comma16. Height & $10. Mixed & $8.; Name = tranwrd(Name,' ',' '); rename phone = numphone; phone = put(numphone,comma16.); datalines; Roger Cody 9,087,821,234 5ft. 10in. 50 1/8 Thomas Jefferson 3,158,488,484 6ft. 1in. 23 1/2 Marco Polo 8,001,234,567 5Ft. 6in. 40 Brian Watson 5,183,551,766 5ft. 10in 89 3/4 Michael DeMarco 4,452,322,233 6ft. 76 1/3 ;

1 Answers  


what is the difference between proc report and proc format?

7 Answers   CTS,


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

0 Answers  


What is the difference between Regression and Logistic Regression? Can u explain the Assumptions/Conditions?

3 Answers  


In sas admin differentiate between roles and capabilities? : sas-grid-administration

0 Answers  


how will you location sas platform applications available from web browser? : Sas-bi

0 Answers  


Categories