In organizations, it’s common to find thousands of SAS Enterprise Guide projects (.egp files), each with:
Enterprise Guide is a very versatile application which operates like a compressed archive as it allows you to have many process flows, many tasks and many pieces of code. It’s a great way to keep everything you ever needed all in one place.
The questions we want to answer are:
The reason for finding this out is to make a move to Viya more cost effective. There is no value in moving the legacy clutter fully to Viya. If you were moving house, it is highly unlikely that you would invite a moving company round before having a tidy up, decluttering and working out what is important to you. If you didn’t do these steps, then you will have paid the movers too much!
Every time an Enterprise Guide project connects to the server it will pick up its configuration details from the workspace server. If logs are enabled, then a duplicate log will be captured for every session. If you don’t have it setup then you can follow this guide (SAS Help Center: Create a Log File for Workspace Server Troubleshooting) and remember to ensure the appenders are in INFO. This makes sure that the logs are small and only capturing the log messages that a user would see. DEBUG or TRACE will cause your logs to capture everything, and this would result in very large logs. Only do this if advised by SAS Technical Support.
These logs contain valuable markers:
By scanning these logs, we can reverse-engineer usage:
To tackle the sprawl of Enterprise Guide projects, we developed a tool that parses workspace server logs. By scanning for specific markers like _CLIENTPROJECTPATH and _SASPROGRAMFILE, the tool identifies which EG projects and SAS programs are actively executed.
All you need to do is provide some configuration input and then let the process return the results for you. The time taken to run will be dependent on the number of logs processed and the length of them. The best way is to start slowing with the last day and then scale the process up.
PRINT_JSON = This will print the JSON results to the terminal window. This is great if you are getting a feel for the process of debugging. Set to False if you choose JSON as the format and are processing large numbers of logs.
OUTPUT_FORMAT = You have the choice of JSON or CSV and you can select which one you prefer. A datetime stamp is added to each file so if you run for the last 90 days and then want to capture deltas for the last data then you can append the files together
CSV
JSON
RECURSIVE_SEARCH = TRUE or FALSE to decide where you want the process to look
LOG_DIRECTORY = This is the folder where your logs reside. Unless you have changed the folder location from the default they will be in \Lev1\SASApp\WorkspaceServer\Logs
OUTPUT_DIRECTORY = This will be where you want the file to be saved. If the folder does not exist then it will create it.
OUTPUT_FILENAME = The name of the file that you want to create. All filenames will be appended with a datetime stamp on every run.
LOG_AGE_DAYS = This allows you to control how many logs to process. It will use the date stamp in the log which is set by default. Setting the value to ) allows you to wildcard and process all logs so if have changed the default you might want to use this option.
DRY_RUN = This allows you to gauge how many logs will be processed. It doesn’t execute anything except the find and filter by date. Use this on the first run.
These outputs can then be analyzed to determine usage frequency, execution duration, and the types of procedures being run.
By turning passive logs into actionable intelligence, this solution enables teams to pinpoint exactly which assets are worth migrating—eliminating guesswork and dramatically streamlining the transition to SAS Viya. With this information you can get all active projects and code, centralise them and then run the content assessment tool across all of them. This will refine your content assessment results by targeting the key, critical activities which make your business work.
Instead of migrating every .egp file blindly, you can:
This approach transforms your migration from a guessing game into a data-driven strategy.
If you’re facing a SAS9-to-Viya migration, this log intelligence approach could save you months of effort and thousands in migration costs.
If you would like to know more about this approach then comment below and get in touch.
Hi @George-Beevers , this looks very interesting and highly relevant for migration or assessing EGP usage at user level or project level. During some migration project towards Viya, I had coded some (smaller) SAS parser from Workspace log file focussed with long-running steps, so I know at first hand how useful these metrics can be. My code was rough at the edges, vibe-coded manually (!) : basically it was just parsing 100s of log files using RegEx to retrieve headers info and enrich long-duration steps (Data Step, SQL queries mainly). Launched in an interactive Workspace session, it was lacking some fundamental features like, for instance, creating an exclusion list of currently opened log file (error prone) or retrieving the completion status of each recorded steps (Success/Warning/Error) ... Please, if you can share the code here, I am sure that the community members involved in EG migration will be more than grateful :-).
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.