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

What is the difference between order and group variable in proc report?

853


Briefly explain input and put function?

642


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

762


Tell me more about the parameters in macro? : sas-macro

602


what is metadata? : Sas-bi

612






In proc transpose and data step with arrays which one you pick?

2584


What is the function of Stop statement in a SAS Program?

652


what is function of retain statment

1533


how many types of prompts are there? : Sas-bi

560


If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?

712


how can you create zero observation dataset? : Sas programming

647


What does the trace option do?

676


Explain why double trailing @@ is used in input statement?

579


I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com

2274


Describe the function and untility of the most difficult SAS macro that you have written.

1570