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
What is the basic structure of the SAS base program?
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
Are you involved in writing the inferential analysis plan? Tables specifications?
what is the difference between infile and input? : Sas-administrator
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
What do you know about sas and what we do? : sas-grid-administration
WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?
What is the role of administrative users? : sas-grid-administration
What will calendar procedure do?
what are sas bi dashboard components? : Sas-bi
What are the statements in proc sql?
what other sas products have you used and consider yourself proficient in using? : Sas programming
how does sas handle missing values in procs? : Sas programming
What is the use of divide function?
Give some examples where proc report’s defaults are same as proc print’s defaults?