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

what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming

651


What will calendar procedure do?

707


Mention the validation tools used in SAS?

740


explain the proc in sas? : Sas-administrator

720


Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?

1329






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

702


where are dashboard components are created and maintained? : Sas-bi

657


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?

2469


hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?

1769


what is study design in while working with SAS? what are screening variables in SAS?

1795


AE datasets names? how many types?

2151


What does the RUN statement do?

949


Intern stastical programmer written test

378


Explain the main difference between the sas procedures and functions? : Sas-administrator

635


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

839