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
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 |
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 |
I use NOCUM/NOPERCENT option in the tables statement like this Proc freq data = deepak; tables x y /nocum nopercent; run; Here I get nopercent and nocum in the output only for variables x and y. How do i do it for all variables? Deepak
do you prefer proc report or proc tabulate? Why? : Sas programming
what is the difference between compiler and interpreter? give any one example (software product) that act as a interpreter?
36 Answers Accenture, College School Exams Tests, CTS, IBM, IHRD, Infosys, Sylhet Engineering College, TCS, Wipro,
What is difference between rename and lable in sas?
What is the registered Key word is sas????
What are common programming errors committed in sas
How would you determine how far down on a page you have printed in order to print out footnotes?
What are the data types does SAS contain?
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 ;
What are exact SAS Base contents..?N what r SAS Tools..?
Explain what is data step?
What is the maximum length of the macro variable?