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 can you limit the variables written to output dataset in data step?

739


How do you convert basic cube to transaction cube and transaction cube to basic cube?

1761


What are the different types of sas functions?

601


Which date function advances a date, time or datetime value by a given interval?

658


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

608






What’s the difference between var b1 – b3 and var b1 — b3?

814


Explain substr function?

569


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

3891


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

1991


What is program data vector (pdv)?

625


How to read an input file in sas?

643


which date functions advances a date time or date/time value by a given interval? : Sas programming

523


Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com

1575


What do you know about sas data set?

586


what techniques and/or procs do you use for tables? : Sas programming

568