Hi:
As David said, SAS code -- the code behind the procedures -- is proprietary and you cannot see that code. The documentation is your best bet to understand how the different options can affect the outcome of a procedure. If you are not clear, after reading the documentation, about how a particular option or setting will affect your output results, again, Tech Support can help you figure out the best means to accomplish what you need.
If you are using SAS Enterprise Guide, SAS Learning Edition or SAS/Assist, those are GUI front ends that do hide the generated code from you. Tech Support can help you figure out the correct method to use with each of these interfaces to preview and save the generated code.
I always find that the examples in the SAS Sample programs are a great deal of help in figuring out the most common usage situations. If you have SAS installed on your desktop, this click path:
[pre]
Help--> SAS Help and Documentation -->
Contents (Tab) --> Learning to Use SAS -->
SAS Sample Programs --> Base SAS -->
Grouped or Sorted Observations, Chapter 10 [/pre] will show you many examples of using PROC SORT, including the syntax needed to get rid of duplicate observations and to sort in descending order.
I love the SAS Sample programs because they are practical examples of the syntax and they generally come as a complete program, including data, so you can cut and paste and then run the code to try to understand how the different syntax options affected the output.
cynthia