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
The Above can be done in a single data step as
follows.Actually this is suggestable.
data _null_;
set abc;
retain z;
if tdate='18APR2008'D then
z=avg;
if tdate='21APR2008'D then
do;
diff=Z-avg;
put 'the difference=' diff;
stop;
end;
run;
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
In SAS explain which statement does not perform automatic conversions in comparisons?
Describe the function and untility of the most difficult SAS macro that you have written.
For what purposes have you used sas macros? : sas-macro
How would you identify a macro variable?
what is sas olap server? : Sas-di
How to create a permanent sas data set?
do you need to know if there are any missing values? : Sas programming
Define run-group processing?
What is PDV?
what do you mean by data staging area? : Sas-di
Explain how you can debug and test your SAS program?
what are the component of range? : Sas-bi
Which statement does not perform automatic conversions in comparisons?
What are the different servers in sas? : sas-grid-administration
what is sas application server? : Sas-di