how to add distinctly var variable values ex..
Data a;
input var;
datalines;
0
1
2
3
-1
-2
-3
;
run;
adding all +ve value in one varibale n do the same for -ve
too
Answer Posted / ravikumar marappan
data test;
input var;
retain sub;
retain ad;
if var < 0 then sub=sum(sub,var);
else ad=sum(ad,var);
datalines;
1
2
3
-1
-2
-3
;
run;
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is the basic syntax style in SAS?
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 is interleaving in SAS?
what is proc Index? and what is proc document?
if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming
what is data governance? : Sas-di
what are input dataset and output dataset options? : Sas programming
how can you put a "trace" in your program? : Sas programming
Hi Jeevan/Akshara I have tried to contact SASI Vats for latest Advanced SAS Programming Certification Dumps (A00-212) but have not got any response. I would highly and gratefully appreciate your assistance in this regard. If you guys have access to this, would you be kind enough to forward it to me ? I would abide by all the terms you have for this. Please, note my email id: upretigopi@yahoo.com Preti Sharma
Can you suggest us materials for sdtm mapping?
for whom is sas data integration studio designed? : Sas-di
what is the use of sas management console? : Sas-di
Explain proc univariate?
What are the limitations for memory allocation for SAS variables
What does the trace option do?