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 are the difference between ceil and floor functions in sas?
How does the internal authentication work in sas? : sas-grid-administration
What is the function of output statement in a SAS Program?
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
Did you used proc test? when?
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
Explain what Proc glm does?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro
name the scheduler for scheduling job and explain the scheduler? : Sas-di
Briefly explain input and put function?
What is a pdv and what are its functions?
Mention the category in which sas informats are placed?
Which command is used to perform sorting in sas program?