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


Please Help Members By Posting Answers For Below Questions

What are the features of SAS?

576


Are you sensitive to code walk-throughs peer review or QC review?

2605


what is sas metadata server? : Sas-di

593


what is function of retain statment

1522


what can you learn from the sas log when debugging? : Sas programming

607






How to convert a numeric variable to a character variable?

630


Did you used proc test? when?

1575


How to test the debugging in sas?

606


what are several options for creating reports in web report studio? : Sas-bi

628


What are the difference between ceil and floor functions in sas?

706


How to read an input file in sas?

654


What is a pdv and what are its functions?

598


What are the default statistics that proc means produce?

604


How many data types are there in SAS?

634


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

747