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 / venkat
%macro merging(f,x);
%do i=1 %to %eval(&x-1);
data &f&n;
merge &f&n &f%eval(&i+1);
by a;
run;
%end;
%mend merging;
%merging(file,4);
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the difference between order and group variable in proc report?
What is the length assigned to the target variable by the scan function?
How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?
which date function advances a date, time or datetime value by a given interval? : Sas programming
Can you suggest us materials for sdtm mapping?
Mention what is PROC in SAS?
what is the use of sas management console? : Sas-di
what is sas metadata repository? : Sas-bi
Differentiate input and infile.
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
What is the function of Stop statement in a SAS Program?
What are the automatic variables for macro? : sas-macro
Mention the difference between ceil and floor functions in sas?
for what purpose would you use the retain statement? : Sas programming
For what purposes have you used sas macros? : sas-macro