BookmarkSubscribeRSS Feed
LisaSAS
Obsidian | Level 7

How can I create a list of our current SAS Stored Process that will indicate when each were last accessed and all the tables that are being used for each of the stored processes? 

 

I can get a listing of the stored processes that list name, description, location, creation and modified date, but I need to know when last accessed. We are wanting to do some cleanup, but not sure which ones to keep and which are no longer in use.  Here's a sample of what I'm looking for...

 

Name Description Location Created Modified Last Accessed Tables Used
SP 01 Description 1 /location of Stored Procedure MM/DD/YYYY MM/DD/YYYY MM/DD/YYYY Table 01
            Table 02
            Table 03
             
SP 02 Description 2 /location of Stored Procedure MM/DD/YYYY MM/DD/YYYY MM/DD/YYYY Table 01
            Table 02
            Table 04
5 REPLIES 5
r_behata
Barite | Level 11

Which version of SAS are you using ?

 

Have you explored the SAS Environment Manager.

 

https://support.sas.com/resources/papers/proceedings15/SAS1520-2015.pdf

 

SASKiwi
PROC Star

Are you referring to SAS Stored Processes? Stored Procedures are a relational database feature for advanced SQL processing.

LisaSAS
Obsidian | Level 7
SAS Stored Process - I went ahead and changed the original post. Sorry, SQL on my mind.
Sajid01
Meteorite | Level 14

There are multiple approaches to handle this issue

1. It is possible to run a code before the stored process, Using this feature write a code that updates a sas dataset with STP name and date and time of execution.

2.Use the stored process log. Write a shell script to extract the date and time of execution of the stored process

AllanBowe
Barite | Level 11
You can log events as part of the stpinit program

More info: https://rawsas.com/event-logging-of-stored-process-server-sessions/
/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

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
  • 5 replies
  • 994 views
  • 2 likes
  • 5 in conversation