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
what are _numeric_ and _character_ and what do they do? : Sas programming
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
How to create list output for cross-tabulations in proc freq?
How substr function works in sas?
what is the Population you used in your project, is it ITT or PP?
what do the sas log messages "numeric values have been converted to character" mean? : Sas programming
what are the considerations when picking a SAS/STAT procedure?
how to read the variables in sas? : Sas-administrator
What is the use of divide function?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
What are the automatic variables for macro? : sas-macro
if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming
what is the basic structure sas administrator? : Sas-administrator
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
Given an unsorted data set, how to read the last observation to a new data set?