BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I would like to be able to change the login credentials at the top of a SAS script in EG. For example, when I run PROC OLAP to create a cube, I need to use a different user-id than the one I use for all other types of development. Currently, I am just manually changing the "Repository and Server" to use a different connection that conatins the 2nd userid. Then when the script is finished, I change it back. Is there a way to automate this using SAS code?
3 REPLIES 3
ChrisHemedinger
Community Manager
You can change the EG script (VBS file) to call SetActiveProfile on the application object. Something like:

objApp.SetActiveProfile("MyOlapProfile")

This assumes that the necessary credentials are available within the profile.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
jklein271
Calcite | Level 5
Chris:

Is there a similar way to set the server, port, user, and password without calling the profile itself? I'm trying to schedule the EG vbs using a 3rd party enterprise scheduler. The problem I appear to be hitting is that the runtime user in the scheduler logs into the server as a non-interactive user. Since there is no profile available to it the vbs executes, but no code is run in the EG 4.2 project.

Thanks.
ChrisHemedinger
Community Manager
Unfortunately, no. There isn't a way to create a profile on the fly via automation, although you might be able to rig something up by creating a Configuration42.xml file in the profile area for the running user. That would require some additional script logic on your part.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 696 views
  • 0 likes
  • 3 in conversation