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


Please Help Members By Posting Answers For Below Questions

what is sas metadata server? : Sas-di

597


What are the features of SAS?

583


how does sas handle missing values in assignment statements? : Sas programming

571


How to specify variables to be processed by the freq procedure?

619


Describe the ways in which you can create macro variables? : sas-macro

580






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

3066


What are the different servers in sas? : sas-grid-administration

605


Have you ever used the SAS Debugger?

1212


What are the difficulties u faced while doing vital signs table or dataset?

1939


what is hash files in sas and why we are using this one in sas?

1734


what is data governance? : Sas-di

627


For clinical entire study how many tables will create approx?

1525


what is the one statement to set the criteria of data that can be coded in any step? : Sas programming

654


What are the ways in which macro variables can be created in sas programming?

573


How would you determine the number of missing or nonmissing values in computations?

652