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


Please Help Members By Posting Answers For Below Questions

how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming

838


What are the limitations for memory allocation for SAS variables

927


Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

1910


how many types prompting framework can be broken down to? : Sas-bi

627


Of all your work, where have you been the most successful?

4198






What are the different servers in sas? : sas-grid-administration

600


What are the prime responsibilities of data integration administrator? : Sas-di

585


Explain bmdp procedure?

614


what is SAS OPTIMIZATION?

1813


How you can read the variables that you need?

653


What are the differences between sum function and using “+” operator?

576


what is treatment emergent events and treatment emregent adverse event

1937


what are several options for creating reports in web report studio? : Sas-bi

628


What do the put and input function do?

583


What is proc sort?

715