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

what is information maps?

1626


How you can read the variables that you need?

661


is data integration and etl programming is same? : Sas-di

586


What is the purpose of trailing @ and @@? How do you use them?

619


how can you import .csv file in to sas? : Sas programming

646






What is the use of divide function?

614


what is sas database server? : Sas-di

623


How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?

2395


What are the difference between the sas data step and sas procs?

618


what is sas olap server? : Sas-di

700


Describe the ways in which you can create macro variables?

647


What commands are used in the case of including or excluding any specific variables in the data set?

602


What are the implications?

1190


how are numeric and character missing values represented internally? : Sas programming

627


For clinical entire study how many tables will create approx?

1530