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 to limit decimal places for the variable using proc means?
how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming
What are the five ways to do a table lookup in sas? : sas-grid-administration
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
Which function is used to count the number of intervals between two sas dates?
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
What is the difference between match merge and one to one merge?
If you could design your ideal job, what would it look like?
Explain data step in SAS
What are the special input delimiters used in SAS?
what is transformation in sas data integration? : Sas-di
Name validation tools used in SAS
Explain append procedure?
What is program data vector (pdv)?
What is the difference between %put and symbolgen? : sas-macro