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
How can you limit the variables written to output dataset in data step?
How do you convert basic cube to transaction cube and transaction cube to basic cube?
What are the different types of sas functions?
Which date function advances a date, time or datetime value by a given interval?
what are the categories that sas informats are used to the place the data? : Sas-administrator
What’s the difference between var b1 – b3 and var b1 — b3?
Explain substr function?
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
What is program data vector (pdv)?
How to read an input file in sas?
which date functions advances a date time or date/time value by a given interval? : Sas programming
Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com
What do you know about sas data set?
what techniques and/or procs do you use for tables? : Sas programming