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 / abhilash

Use symgetfunction to resolve a macro variable with in same
data step while creating macro variable using call symput.


DATA test;
SET ABC;
IF TDATE='18APR2008'D THEN
CALL SYMPUT('A2',AVG);
ELSE IF TDATE='21APR2008'D THEN
CALL SYMPUT('B2',AVG);
diff = symget('a2') - symget('b2');
RUN;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain proc sort?

667


Which statement does not perform automatic conversions in comparisons?

1202


Explain how you can debug and test your SAS program?

565


How is character variable converted into numeric variable and vice versa?

595


What are the ways to do a “table lookup” in sas?

592






How would you define the end of a macro? : sas-macro

612


What are the limitations for memory allocation for SAS variables

928


hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana

4912


what are the types of interactive display types? : Sas-bi

654


explain the concepts and capabilities of business object? : Sas-bi

538


What is the maximum length of the macro variable?

675


where are dashboard components are created and maintained? : Sas-bi

559


Explain what is SAS informats?

623


What is the difference between %put and symbolgen? : sas-macro

669


What is maximum storage capability of SAS?

904