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
How would you define the end of a macro?
What is the difference between order and group variable in proc report?
How to sort in descending order?
How to read an input file in sas?
what is metadata? : Sas-bi
What is the difference between using drop = data set option in data statement and set statement?
Explain what is SAS informats?
Mention what are the data types does SAS contain?
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
Explain what Proc glm does?
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
name some data transformation used in sas di? : Sas-di
How can you limit the variables written to output dataset in data step?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming