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
Have you ever used the SAS Debugger?
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
What is the purpose of trailing @ and @@? How do you use them?
What do the put and input function do?
please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??
Mention how to limit decimal places for the variable using proc means?
What are the table names in oracle database...?
What is a method to debug and test your SAS program?
What are the ways in which macro variables can be created in sas programming?
How to create an external dataset with sas code?
Explain substr function?
how many display types available in sas bi dashboard? : Sas-bi
What is the use of the %include statement?
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
How to limit decimal places for variable using proc means?