Co-Developers & Authors: Afshin Mirtorabi (Afshin.Mirtorabi@sas.com) & Irina-Gabriela Popescu (Irina-Gabriela.Popescu@sas.com)
Migrating from SAS Enterprise Guide (EG) to SAS Viya can feel like balancing business continuity with the pressure to innovate. But what if you could keep your projects running smoothly while tackling the toughest migration headaches—like those stubborn hard-coded file paths?
This blog blends the best of both worlds: connect EG to Viya for instant compatibility (EG to Viya Connection Blog), and use a targeted path-modification workflow to clear legacy roadblocks. Whether you’re a systems engineer, analyst, or team lead, this guide will help you cut friction, minimize risk, and unlock Viya’s full potential—without a disruptive overhaul on day one. Let’s dive into a pragmatic approach that keeps your business moving and your tech stack evolving.
If you would like to read about how this task was completed 10 times faster using all of Viya's integrated capabilities then you can head to my other blog and get your recipes ready!; Engineering Excellence: Creating a Michelin Star Analytics Experience with SAS Viya
Most teams want two outcomes at once: keep business running and reduce migration toil. Connecting EG to Viya gives you the supported runway to execute existing projects on a modern platform. The path‑mod approach adds a targeted clean‑up layer so you’re not blocked by legacy Windows/UNC (Universal Naming Convention) paths when running on Linux‑hosted Viya or cloud storage. Used together (with SAS support), you’ll cut friction without committing to a full refactor on day one.
What you get: Keep your familiar EG UX while running code on Viya’s SAS Compute (and, where applicable, leveraging CAS for scale). It’s an official path that buys you time to plan modernization, especially if you are using conditional tasks and copy files task to move files from and to your local machine / networks.
At a glance you will:
Your projects are already “path‑clean” or rely on libraries that resolve correctly on Viya.
What it solves: .egp projects often embed hard‑coded paths inside:
On Viya, these stale C:... or \server\share... references cause failures. The workflow below finds and updates them systematically.
Scan/report (EGP Path Finder)
Mini‑example (conceptual)
Detect a Windows path inside LIBNAME and rewrite to a Viya prefix.
Code Comments
While a SAS program is effective, the real power of this utility is unleashed when it's packaged as a Custom Step in SAS Viya. This transforms the command-line script into a user-friendly interface that any user—regardless of their coding expertise—can use to automate path changes.
EGP-PathFinder
EGP-Modify
A custom step provides a graphical user interface (GUI) with control options that map directly to the SAS macro variables in our code. This eliminates the need for users to manually edit any code. The interface would include the following controls:
The custom step allows you to modify the prefix path with its default being "/opt/warehouse" for the development of this process. If you are using this site wide you can edit the custom step and change the default for everyone. If you are working with SAS Managed Cloud Services for your system then the Professional Services team will make sure that path mapping is present to enable simple substitution.
4. Review PATHS_TO_CHANGE - Review the table and ensure that you are happy with the paths that its found. If you need to make amendments you can do it directly to this table. The table is held as a CSV and is only read to provide a visual in the flow. So for instance if the New Path isn’t quite right you can manually override it at this stage.
Copy Files Task
Code
By automating this tedious and error-prone process, this utility delivers significant benefits:
This utility is a powerful example of how combining SAS with other technologies can solve real-world problems, making the transition to SAS Viya smoother and more efficient.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.