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 / venu

/*Sorting order by variable*/

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;
proc print data=abc;
run;


proc contents data=abc out=xyz;
run;


proc sql;
select name into :mac separated by " " from xyz;
quit;


proc print data=abc;
var &mac;
run;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?

1571


what does the run statement do? : Sas programming

550


What is SAS? What are the functions does it performs?

725


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

634


What will calendar procedure do?

590






How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?

2373


Explain data step in SAS

621


What are the 3 components in sas programming?

717


What are the automatic variables for macro? : sas-macro

668


What can be the size of largest dataset in SAS?

705


How can I remove header from output data set?

2056


Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya

1337


Name and describe few sas character functions that are used for data cleaning in brief.

658


Which statement does not perform automatic conversions in comparisons?

1196


what is broad cast agent? : Sas-bi

591