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
DATA ABC;
INPUT TDATE DATE9. AVG;
CARDS;
18APR2008 150.00
19APR2008 167.00
20APR2008 123.00
21APR2008 145.00
;
RUN;
data _null_;
set abc;
if tdate='18APR2008'D then
call symput('x',avg);
if tdate='21APR2008'D then
call symput('y',avg);
z=&x-&y;
run;
data _null_;
z=&x-&y;
put 'the difference='z;
run;
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
how can you put a "trace" in your program? : Sas programming
Approximately what date is represented by the SAS date value of 730?
what is slowly changing dimension? : Sas-di
what is the primary data source for the wrs? : Sas-bi
What do the mod and int function do? : Sas programming
why is a stop statement needed for the point=option on a set statement? : Sas programming
why is sas considered self-documenting? : Sas programming
what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
what is the use of sas management console? : Sas-di
what is sas and what are the functions? : Sas-administrator
how do you debug and test your sas programs? : Sas programming
describe the interaction table in sas di? : Sas-di
Are you sensitive to code walk-throughs peer review or QC review?