how to rearrange the data as our wish by using dataset block?
Answers were Sorted based on User's Feedback
Answer / srinivas anumalla
Probably there are many options,like id statement,proc sort.
As Some body said retain is not for that operation.
But i strongly suggest Proc sort.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / raaman
data Temp;
input Sno Sname $ Eng Maths Sci Soc;
cards;
1212 Smith 67 78 89 98
2334 Lisa 78 89 99 87
;
run;
data Temp1;
retain Sname Sci Eng Maths Soc Sno;
set Temp;
run;
proc print data = Temp1;
title "1.Use of Retain Statement";
run;
use retain statement before the set statement
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nani
by using id statement
proc print data=dsn;
id var3 var5 var1;
run;
| Is This Answer Correct ? | 0 Yes | 1 No |
We want to merge file A and B. File A has variable age, file B provide birthdate. How to merge the data according to age in file B
what is the basic structure sas administrator? : Sas-administrator
How would you determine the number of missing or nonmissing values in computations?
What is _n_?
how to import HTML files into SAS datasets?
Explain the main difference between the sas procedures and functions? : Sas-administrator
What is the purpose of the trailing @? The @@? How would you use them?
What is the difference between an informat and a format. Name three informats or formats.
I need help in merging two different datasets. I am merging by date and I want to propagate observations from one dataset to the corresponding dates. One dataset has a unique date for each day of the month, while the other dataset has same date for different patient visits. For example I want to spread an observation on the 31DEC2008 from one dataset to several observations with the same date on a second dataset for all the patients who visited on that date. I have tried to merge the two and the result is not what I wanted. Instead I get a dataset whereby all the dates have missing values where observations from the first datset should have spread.
diff between nodup rec and ondup key???
data jagan1.s; input bp$; cards; 100/90 120/89 112/87 run; in the above code how to convert character data values to numeric data values?
I have a dataset concat having a variable a b & c. How to rename a b to e & f?