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


Please Help Members By Posting Answers For Below Questions

Explain what Proc glm does?

609


what has been your most common programming mistake? : Sas programming

534


Do you need to rearrange the order of the data for the report?

1811


Which are the statements whose placement in the data step is critical?

728


what techniques and/or procs do you use for tables? : Sas programming

553






if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

915


What are all the problems you faced while validating tables and reports?

2975


What is the difference between where and if statement?

598


Enlist the functions performed by sas.

647


Name types of category in which SAS Informats are placed?

694


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

1536


what are some good sas programming practices for processing very large data sets? : Sas programming

490


what is operational data and operational system? : Sas-di

604


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

641


what is the function of catx syntax? : Sas-administrator

624