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

Sorry missed the data step here is the corrected Version;


%MACRO Data_Create;
%Do i = 1 %to 365;
DATA file&i;
INPUT a @@;
CARDS;
4*&i-3 4*&i-2 4*&i-1 4*&i
;
RUN;
%MEND;

%Data_Create;

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give e an example of..

1834


Tell me about % include and % eval? : sas-macro

674


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

1219


How substr function works in sas?

696


What are the different types of sas functions?

603






what are sas bi dashboard components? : Sas-bi

653


What is slibref?

739


which date function advances a date, time or datetime value by a given interval? : Sas programming

584


what are sas/access and sas/connect? : Sas programming

544


what are all the reports you generated in your recent project?

1672


what is the function of catx syntax? : Sas-administrator

638


Which are the statements whose placement in the data step is critical?

754


explain what is data set in sas? : Sas-administrator

522


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?

2374


what are the best practices to process the large data sets in sas programming? : Sas-administrator

529