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
How is character variable converted into numeric variable and vice versa?
How would you determine the number of missing or nonmissing values in computations?
How to create a permanent sas data set?
which date functions advances a date time or date/time value by a given interval? : Sas programming
Give an example where SAS fails to convert character value to numeric value automatically?
what is sas metadata server? : Sas-di
what are validation tools that are used in sas? : Sas-administrator
What function CATX syntax does?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
how can you put a "trace" in your program? : Sas programming
what is metadata? : Sas-bi
Define run-group processing?
what are all the reports you generated in your recent project?
What is connection profile? : sas-grid-administration
what is data access? : Sas-di