Using SAS Enterprise Guide with different SAS environments

"DEV/TEST/PROD": If that term means something to you, then you are probably among our many customers that use SAS software across different environments. You might have one SAS environment for playing around ("dev" for "development"), another for testing candidate changes ("test"), and yet another for production processes ("prod").

The Connections window in SAS Enterprise Guide

Or, you might work with different environments that are segregated across business units: one for Finance, for example, and another for Human Resources. You can also create different profiles for a single environment, but with different user accounts -- for example, one account with admin privileges, and another as a "mere mortal" end user.

Shortcuts that can make your life easier
Wouldn't it be convenient to have different shortcuts on your desktop so that you can launch SAS Enterprise Guide and point directly to the environment that you want to use? We thought so, and so we added some command-line options in the 4.2 release to make this easy to do.

The command-line option is /profile:"ProfileName", where "ProfileName" is the friendly name you used to label your SAS profile definition. (The quotes are optional unless the profile name contains spaces or special characters, in which case the quotes are necessary.) Here is an example command that you can use in a desktop shortcut to connect to the "prod" environment:

"C:\Program Files\SAS\EnterpriseGuide\4.2\seguide.exe" /profile:prod

Here is a variation with a space in the profile name ("My Server"):

"C:\Program Files\SAS\EnterpriseGuide\4.2\seguide.exe" /profile:"My Server"

And finally, if you want to run with no profile: that is, without connecting to a SAS metadata server at all (using just your local SAS installation), you can run:

"C:\Program Files\SAS\EnterpriseGuide\4.2\seguide.exe" /noprofile

tags: SAS tips

2 Comments

  1. Shane Gibson
    Posted July 26, 2011 at 12:00 am | Permalink

    Hi Chris

    Is there anyway to invoke the profile option for an EG project that is scheduled via the EG/Windows schedule function?

    The VBS that is created calls a egp project file directly and then opens it via the windows association, so I can't seem to find a way of inserting the profile parameter.

    Cheers
    Shane

  2. Chris
    Posted July 26, 2011 at 8:43 am | Permalink

    Shane, yes there is a way.

    Use the SetActiveProfile method on the Application object. Example:

    Set app = CreateObject("SASEGObjectModel.Application.4.3")
    ' Set to your metadata profile name, or "Null Provider" for just Local server
    app.SetActiveProfile("My Server")

    Full example is in this blog post:
    http://blogs.sas.com/sasdummy/index.php?/archives/256-Using-SAS-Enterprise-Guide-to-run-programs-in-batch.html

One Trackback

  1. [...] When you're connected to a SAS environment in SAS Enterprise Guide, you'll see some of that profile information reflected in the status bar: To activate a different profile or to define a new one, you can click on the Connections link in the status bar. This invokes the Connections window, showing all of your available profiles and their details. The profile name is important, because you can make use of this name as a shortcut (sort of like "speed dial") to direct SAS Enterprise Guide to a particular metadata environment automatically.  To learn more, read about how to use SAS Enterprise Guide with different SAS environments. [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>