create macros---you have 365 number of data and you need to
merge it throw the macros,,,,,,
data file1;
input a @@;
cards;
1 2 3 4
;
run;
data file2;
input a @@;
cards;
5 6 7 8
;
run;
data file3;
input a @@;
cards;
9 10 11 12
;
run;data file4;
input a @@;
cards;
13 14 15 16
;
run;
Answer Posted / ashutosh
%macro mydata(my,n);
data XXX;
merge
%do i=1 %to &n;
&my&i
%end;
;
by a;
run;
%mend;
%mydata(file,4);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Give some ways by which you can define the variables to produce the summary report (using proc report)?
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
what is sas metadata repository? : Sas-bi
What is the difference between SAS functions and procedures?
Tell e how how dealt with..
How to limit decimal places for variable using proc means?
what is information maps?
How we can call macros with in data step? : sas-macro
Hi, If anyone has base SAS certification dumps, please share.
what is function of retain statment
What is the difference between %put and symbolgen? : sas-macro
Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com
How can I remove header from output data set?
What are the scrubbing procedures in sas?
what are _numeric_ and _character_ and what do they do? : Sas programming