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
DATA ABC;
INPUT TDATE DATE9. AVG;
CARDS;
18APR2008 150.00
19APR2008 167.00
20APR2008 123.00
21APR2008 145.00
;
RUN;
data _null_;
set abc;
if tdate='18APR2008'D then
call symput('x',avg);
if tdate='21APR2008'D then
call symput('y',avg);
z=&x-&y;
run;
data _null_;
z=&x-&y;
put 'the difference='z;
run;
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
how sas deals with business intelligence? : Sas-bi
Can you execute a macro within a macro? Describe. : sas-macro
What are the different versions of sas that you have used until now? : sas-grid-administration
Mention what is SAS data set?
what do the pad and dim functions do? : Sas programming
What are the scrubbing procedures in sas?
what is sas data set?
what is factor analysis? : Sas-administrator
hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?
what are some good sas programming practices for processing very large data sets? : Sas programming
If a variable contains letters or special characters, can it be numeric data type?
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
why is a stop statement needed for the point=option on a set statement? : Sas programming
what are the best practices to process the large data sets in sas programming? : Sas-administrator
Explain data step in SAS