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
what is information maps?
How you can read the variables that you need?
is data integration and etl programming is same? : Sas-di
What is the purpose of trailing @ and @@? How do you use them?
how can you import .csv file in to sas? : Sas programming
What is the use of divide function?
what is sas database server? : Sas-di
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?
What are the difference between the sas data step and sas procs?
what is sas olap server? : Sas-di
Describe the ways in which you can create macro variables?
What commands are used in the case of including or excluding any specific variables in the data set?
What are the implications?
how are numeric and character missing values represented internally? : Sas programming
For clinical entire study how many tables will create approx?