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

Name types of category in which SAS Informats are placed?

836


What is maximum storage capability of SAS?

989


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

655


What makes sas stand out to be the best over other data analytics tools?

678


AE datasets names? how many types?

2151






In sas, what are the areas that you are most interested in? : sas-grid-administration

725


what can you learn from the sas log when debugging? : Sas programming

700


what is change analysis in sas di ? : Sas-di

685


What would you change about your job?

2007


What are the limitations for memory allocation for SAS variables

1022


what are the scrubbing procedures in sas? : Sas programming

931


What are the parameters of scan function?

730


What was the last computer book you purchased? Why?

1997


what is the difference between floor and ceil functions in sas? : Sas-administrator

807


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

1461