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
Explain proc sort?
Which statement does not perform automatic conversions in comparisons?
Explain how you can debug and test your SAS program?
How is character variable converted into numeric variable and vice versa?
What are the ways to do a “table lookup” in sas?
How would you define the end of a macro? : sas-macro
What are the limitations for memory allocation for SAS variables
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
what are the types of interactive display types? : Sas-bi
explain the concepts and capabilities of business object? : Sas-bi
What is the maximum length of the macro variable?
where are dashboard components are created and maintained? : Sas-bi
Explain what is SAS informats?
What is the difference between %put and symbolgen? : sas-macro
What is maximum storage capability of SAS?