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")
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
RexDeus9
Quartz | Level 8

Thank you Chris, appreciated!

 

 

 

Yvan

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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