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
This entry was posted in General. Bookmark the permalink. Post a comment or leave
What do you know about sas data set?
What are the difficulties u faced while doing vital signs table or dataset?
name some data transformation used in sas di? : Sas-di
What is PDV?
: and & modifiers.
What will calendar procedure do?
Explain the difference between nodup and nodupkey options?
How to create list output for cross-tabulations in proc freq?
for report generation which one you used proc report or data_null_?
what do the pad and dim functions do? : Sas programming
what do you mean by data staging area? : Sas-di
what versions of sas have you used (on which platforms)? : Sas programming
Intern stastical programmer written test
What sas features do you use to check errors and data validation?