Hi,
I run several SAS EG scheduled jobs on a Windows server. Using a VBS script and Task Manager all runs smoothly.
Now I need to run scheduled jobs on a different SAS network. How can I force my SAS EG projects to run with a specific user profile?
Rex
A google search for "sas enterprise guide specify profile on the commandline" immediately got me this:
by our revered @ChrisHemedinger
But honestly, you're passing the point where it's still feasible to use the crutch of scheduled EG projects.
Export your project codes to .sas files and have them run by central scheduling, using sasbatch.bat or sasbatch.sh.
I won't disagree with my friend @Kurt_Bremser that EG-based scheduling can scale only so much. However, you can adjust your VB Script commands to set the active profile as your EG project starts up.
See this article for more information about EG Automation. Included you'll find an example script that lists your available profiles. And you can set the active profile with the SetActiveProfile method on the application object.
' Change if running a different version of EG Dim egVersion egVersion = "SASEGObjectModel.Application.7.1" Dim Application ' Application Dim Project ' Project object Dim sasProgram ' Code object (SAS program) Dim n ' counter Set Application = CreateObject(egVersion) ' Set to your metadata profile name, or "Null Provider" for just Local server Application.SetActiveProfile("My Server")
Thank you Chris, appreciated!
Yvan
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.