BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Where can I look the source code of some procedure? for example, proc sort. I want to look the source code of 'sort'. Thanks a lot
4 REPLIES 4
David_SAS
SAS Employee
The source code of SAS software is proprietary. Questions about the behavior of PROC SORT or other procedures are appropriate, of couse. Tech Support is good at answering those questions.

-- David Kelley, SAS
deleted_user
Not applicable
That means I can not look the source code for any procedure. Sometimes I don't understand what detail method to be used to write the procedures when I look the documents about the procedures. I just want to look the source code and check the method if I want and then I can decide if i use this procedure in my programming. By the way, I am also using another software "matlab" in my work. I can look the source code in this software. So I think that I can do it in SAS. Thank you, David.

Qionglin
Cynthia_sas
SAS Super FREQ
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
deleted_user
Not applicable
If I were a programmer in a scientific software company, I would like to see the SAS code, wouldn't I ?

I guess it's the reason why you can't see it. But I think the SAS help is pretty much clear.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1989 views
  • 0 likes
  • 3 in conversation