hi guys ...i have one query...
data abc;
input s w k g o t a m;
cards;
1 2 3 4 5 6 7 8
2 3 4 5 6 7 8 9
;
run;
i want the output to be the sorted order(only
variables).observations should not be changed..
Answer Posted / hetal bhalani
data abc;
input s w k g o t a m;
cards;
1 2 3 4 5 6 7 8
2 3 4 5 6 7 8 9
;
run;
**Transpose your data by listing all the variables you want
to transpose in the VAR statement**
proc transpose data =abc ;
var s w k g o t a m;
run;
**Now you have to sort the values in _name_ variable in asc
**
proc sort data=data1;
by _name_ ;
run;
**now transpose again using _name_ in the ID statement**
proc transpose data=data1 out=data2(drop=_name_);
id _name_;
run;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the uses of sas?
What are the data types does SAS contain?
How can I remove header from output data set?
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
Explain the difference between using drop = data set option in set and data statement?
Explain how you can debug and test your SAS program?
what are some differences between proc summary and proc means? : Sas programming
Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro
Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?
what is enterprise guide? What is the use of it? : Sas programming
What does the RUN statement do?
In SAS explain which statement does not perform automatic conversions in comparisons?
What are the different servers in sas? : sas-grid-administration
Tell me about % include and % eval? : sas-macro