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

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