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
Name validation tools used in SAS
how does sas handle missing values in assignment statements? : Sas programming
I have a dataset concat having variable a b & c. How to rename a b to e & f?
Mention what are the data types does SAS contain?
What are the parameters of scan function?
What is proc sort?
Explain what is data step?
how will you location sas platform applications available from web browser? : Sas-bi
What is the difference between %put and symbolgen? : sas-macro
what is the use of proc contents and proc print in sas? : Sas-administrator
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
What are the difference between sas functions and procedures?
How to create list output for cross-tabulations in proc freq?
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
Mention how to limit decimal places for the variable using proc means?