BookmarkSubscribeRSS Feed
suprangya2014
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

 

7 REPLIES 7
Kurt_Bremser
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.

suprangya2014
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. 

Kurt_Bremser
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.

 

mkeintz
PROC Star

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  https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/215-29.pdf 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

--------------------------
AnandVyas
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: https://go.documentation.sas.com/?cdcId=evcdc&cdcVersion=2.5_M1&docsetId=evug&docsetTarget=n12v4rjg7...

 

suprangya2014
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

gwootton
SAS Super FREQ

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:

<SASConfig>/Lev1/Web/SASEnvironmentManager/emi-client/Logs/logCollect*

<SASConfig>/Lev1/Web/SASEnvironmentManager/emi-framework/Logs/logCentralize*

<SASConfig>/Lev1/Web/SASEnvironmentManager/emi-framework/Logs/masterAPMETL*

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

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

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