Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / natraj boga

here is solution to ur problem
options formdlim='.';

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;
**** create a dummy variable by assigning the values of any
one of ur variable;
**** here I have taken the values of S variable of your ABC
data set;
data setabc;
set abc;
l=s;
run;
proc print;run;
* transpose the variables into observations of a transposed
data set by using the ID statement;
proc transpose data=setabc out=T1_abc let;
id l;
run;
proc print;run;
**sort the transposed data set by using _name_ variable
inorder to get varibales in a ascending order;
proc sort data=T1_abc;
by _name_;
run;
proc print;run;
** once again transpose the sorted data set with the _name_
variable in ID statement;
proc transpose data=t1_abc out=t2_abc(drop=_name_) let;
id _name_;
run;
proc print noobs;
title 'sorting the variables in Ascending order';
run;

Is This Answer Correct ?    23 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the special input delimiters used in sas programming.

959


What can be the size of largest dataset in SAS?

1174


Explain the difference between using drop = data set option in set and data statement?

1104


what is sas business intelligence? : Sas-bi

1093


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

1093


Explain the main difference between the sas procedures and functions? : Sas-administrator

1015


how does sas handle missing values in sort order? : Sas programming

873


What are the implications?

1629


How to sort in descending order?

1202


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

2056


State the difference between INFORMAT and FORMAT ?

1040


explain about data integrator metadata reports? : Sas-di

1040


Describe the function and utility of the most difficult SAS macro that you have written?

2481


What are the limitations for memory allocation for SAS variables

1427


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1555