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 / vijay

%MACRO mer;
DATA file_all_365;
MERGE
%DO i=1 %TO 365;
file&i
%END;;
RUN;
%MEND;

%MER;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the statements in proc sql?

602


if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

953


what is data governance? : Sas-di

631


What is the difference between where and if statement?

630


What do the mod and int function do? : Sas programming

592






sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

3118


how does sas handle missing values in formats? : Sas programming

595


What do you code to create a macro? : sas-macro

592


What is the difference between reading data from an external file and reading data from an existing data set?

644


what is data integration? : Sas-di

622


what are some differences between proc summary and proc means? : Sas programming

515


how does sas handle missing values in sort order? : Sas programming

539


how does sas handle missing values in functions? : Sas programming

608


What is the function of Stop statement in a SAS Program?

652


How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?

2395