Desktop productivity for business analysts and programmers

Change REPOSITORY/LOGIN credentials at top of EG script?

Reply
N/A
Posts: 0

Change REPOSITORY/LOGIN credentials at top of EG script?

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?
Community Manager
Posts: 2,891

Re: Change REPOSITORY/LOGIN credentials at top of EG script?

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
Contributor
Posts: 28

Re: Change REPOSITORY/LOGIN credentials at top of EG script?

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.
Community Manager
Posts: 2,891

Re: Change REPOSITORY/LOGIN credentials at top of EG script?

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
Ask a Question
Discussion stats
  • 3 replies
  • 152 views
  • 0 likes
  • 3 in conversation