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
SAS Innovate 2025: Call for Content! Submit your proposals before Sept 25. Accepted presenters get amazing perks to attend the conference!
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
SAS Innovate 2025: Call for Content! Submit your proposals before Sept 25. Accepted presenters get amazing perks to attend the conference!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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