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


Please Help Members By Posting Answers For Below Questions

How we can call macros with in data step? : sas-macro

611


what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi

550


What is the maximum and minimum length of macro variable

652


What is the difference between class statement and by statement in proc means?

645


how will you locate the sas platform applications? : Sas-bi

581






What is the difference between where and if statement?

619


What do you know about symput and symget?

731


What is the order of application for output data set options, input data set options and SAS statements?

1080


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

696


How do you convert basic cube to transaction cube and transaction cube to basic cube?

1771


Explain what is data step?

727


what is information maps?

1616


how does sas handle missing values in sort order? : Sas programming

532


what techniques and/or procs do you use for tables? : Sas programming

573


I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.

1697