BookmarkSubscribeRSS Feed
Fluorite | Level 6

Do we have an existing report which will give me the list of Procedures used by all SAS users?

Or can I run some SAS code/Unix code to find that?

I want to see what all procedures (proc sort, proc SQL, proc fedsql, etc.) are used by SAS users.

We have SAS installed in the Linux server and all Enterprise Guide logs are saved in one common path


Super User

As a first step, run

grep -i proc *

in the directory where your logs are stored.

As long as the PROC or PROCEDURE keyword is on the same code line with the procedure name, this will get your calls.

Fluorite | Level 6

Thanks, but that gives me a lot of other information as well.

I only need SQL, sort, fedsql, etc. from the log and I have way too many logs to check on.


If there is any environment manager report or something like that which can help me. 

Super User

You can use the grep command in an INFILE with PIPE (if XCMD is enabled) and use SAS for further filtering. Since the grep will include filenames in its output, you can parse them out also.

You have to use the full (absolute) path to the files being searched.


Jade | Level 19

You can use the RTRACE= option in combination with the RTRACELOC= option.    RTRACE usually defaults to NONE.  So you'll want to choose between the VER and ALL options.  But it has to be in the sas configuration file, the SASV9_OPTIONS environment variable, or as part of the SAS invocation command.  You can't use it in an OPTIONS statement in the SAS program.


The RTRACELOC option tells sas where to put the RTRACE output - the default is apparently the sas log.   But if you always use the same location, each session will overwrite RTRACE output from prior sessions.  So each session will needs its own name.  If you use well-structured names for RTRACELOC, you can trivially read RTRACE output from all sessions in a periodic report.  A good illustration of how to do this is in Michael Raithel's presentation at the SUGI 29 conference.  


rtrace documentation at SAS Companion for UNIX Environments: RTRACE System Option: UNIX 

rtraceloc doc: SAS Companion for UNIX Environments : RTRACELOC System Option: UNIX   It looks like the rtraceloc option has directives %p, %d, %t to assign process id, date, and time.   And Raithel's paper shows how to get the userid into the name.  


Here's an example of what RTRACE output looks like:


File opened: F:\sas82\SAS\core\sasexe\saszaf.DLL
File referenced: F:\sas82\SAS\core\sasexe\sasfm.DLL
File referenced: F:\sas82\SAS\core\sasexe\sasfm.DLL
File opened: F:\sas82\SAS\core\sasexe\sasfm.DLL
File opened: F:\sas82\SAS\core\sasexe\sasp14.DLL
File referenced: F:\sas82\SAS\core\sasmsg\base.msg
File opened: F:\sas82\SAS\core\sasmsg\base.msg


You can learn the names of the files for the PROC's of interest and filter to just process those DLL files.   With naming convetions like referred to above, you can even get usage profiles by user.


The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

Ammonite | Level 13

Hi @suprangya2014 


If you have SAS EVM installed and configured, you can enable the service architecture framework which collects lots of data and generate few OOTB reports about the environment. One of this report under ARM is the PROC usage report.


You can find more about the reports here:


Fluorite | Level 6

Thank you. SAS EVM is installed and I see the report exists, but I do not get any result.

Do I have to enter anything for the "Where clause to filter SAS Environment Manager Data Mart table" in the below report:

Stored Processes>> Products>> SAS Environment Manager>>Nightly Reports>>ARM Performance Reports>> Resource - Procedure usage


Adding a where filter would limit the existing results. If you aren't getting any, adding a where filter wouldn't help.


No results in the report suggests an issue with the SAS Environment Manager Service Architecture Framework's Log Collection, Log Centralization, or APM ETL processes. You may wish to check those log files for errors:




Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1 like
  • 5 in conversation