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

What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

2010


why is sas data integration studio important? : Sas-di

565


How does the internal authentication work in sas? : sas-grid-administration

587


what other sas products have you used and consider yourself proficient in using? : Sas programming

689


Give e an example of..

1657






What do you know about symput and symget?

733


Did you used proc test? when?

1577


How do dates work in sas?

649


describe how to adjust the performance of data integrator? : Sas-di

568


Explain the purpose of retain statement.

607


how can you create zero observation dataset? : Sas programming

644


How would you identify a macro variable?

653


what are the categories that sas informats are used to the place the data? : Sas-administrator

621


How we can call macros with in data step? : sas-macro

619


What is the difference between %put and symbolgen? : sas-macro

675