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

Intern stastical programmer written test

0 Answers  


What is criteria for adverse events and treatment-emergent adverse events?

2 Answers   Accenture,


What system options would you use to help debug a macro? : sas-macro

0 Answers  


We want to merge file A and B. File A has variable age, file B provide birthdate. How to merge the data according to age in file B

3 Answers  


What are the criticality that you have faced during your project in SAS?

2 Answers  


Are you familiar with special input delimiters How are they used?

3 Answers  


What areas of SAS are you most interested in?

0 Answers   Quintiles,


How to get the repeated values by using sql in sas ?

2 Answers  


what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming

0 Answers  


i have a data set with 20 observations i want label from 8 to 15 observations ? how you create this one.

6 Answers   CTS,


Explain how you can debug and test your SAS program?

0 Answers  


Can you excute a macro within a macro? Describe.

2 Answers   Genta,


Categories