DATA ABC;
INPUT TDATE DATE9. AVG;
CARDS;
18APR2008 150.00
19APR2008 167.00
20APR2008 123.00
21APR2008 145.00
;
RUN
HOW CAN I FIND THE DIFFERENCE BETWEEN AVG OF 18APR2008 ANF
21APR2008??
IF ANY ONE GETS IT PLS TRY TO POST IT.
Answer Posted / rajaanku11
Hi, pls modify slight changes to the above prog.
data _null_ ;
set abc;
if tdate='18APR2008'D then
call symput('x',avg);
if tdate='21APR2008'D then
call symput('y',avg);
run;
%put _user_;
data _null_;
z=&x-&y;
put 'the difference=' z;
run;
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Can you execute macro within another macro? : sas-macro
How do you use the do loop if you don’t know how many times you should execute the do loop?
What is the order of application for output data set options, input data set options and SAS statements?
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
describe about physical data integration? : Sas-di
explain the main difference between the nodup and nodupkey options? : Sas-administrator
How do you control the number of observations and/or variables read or written?
How would you identify a macro variable? : sas-macro
what is star schema? : Sas-di
Explain the special input delimiters used in sas programming.
What is the role of unrestrictive users? : sas-grid-administration
what are the benefits of data integration? : Sas-di
how to read the variables in sas? : Sas-administrator
Describe a time when you were really stuck on a problem and how you solved it?
what is transformation in sas data integration? : Sas-di