BookmarkSubscribeRSS Feed
RexDeus9
Quartz | Level 8

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

3 REPLIES 3
Kurt_Bremser
Super User

A google search for "sas enterprise guide specify profile on the commandline" immediately got me this:

https://blogs.sas.com/content/sasdummy/2009/08/03/using-sas-enterprise-guide-with-different-sas-envi...

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.

ChrisHemedinger
Community Manager

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")
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
RexDeus9
Quartz | Level 8

Thank you Chris, appreciated!

 

 

 

Yvan

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1975 views
  • 3 likes
  • 3 in conversation