11-23-2012 11:10 AM
So, I am now at my wits end.
I've been putting off doing anything serious with EG for a while now, but recently a problem arose that needs more attention to it than I've paid in the past.
In the past we have used SAS Windows and %Windows to prompt for userids and passwords. Basically we created SAS file that people could %include in their projects.
Now I want to replicate that (and other similar processes) in EG.
I created a little program that included prompts. These in turn feed a macro used to assign database libraries.
And everything works, great. Open the project, up comes the prompt, I fill things, and I can %run the macro.
Now I want to do something like make it available for %include ....
But apparently the only thing I can do is re-open the project - the prompts do not seem to be associated with program file.
Is there a way, for example, to test in autoexec.sas that someone is opening an EG session and then include code?
11-23-2012 11:50 AM
Are your Enterprise Guide users using the SAS installation on their local machines? Or are you all using a common SAS server environment?
What version of Enterprise Guide and SAS are you using?
11-26-2012 01:45 PM
Thought I replied to this, but I guess the email didn't go through...
We're using local versions of EG. We have access to a SAS server, and in the future that may come into play, but right now we're running local. In particular, we do not used stored processes.
Versions are current SAS 9.3 something, EG 5.1.
11-27-2012 02:45 AM
Do you really need prompts?
With SAS Server & SAS Metadata Server you could create authentication domains for logins.
with SAS local without SAS Metadata Server you could create file with libname statements with encrypted passwords.
Do you share a technical user in the database, you can share the file, too.
Do you have your own user in the database, you can put the file on your own drive.
(Here we all have our private H: drive, I would put the file there.)
11-27-2012 10:14 AM
We're working with a somewhat limited config, here.
In particular, we do not have a Metadata server. And by policy, we are not supposed to store our passwords - encrypted or otherwise.
Beyond that, we have twenty something databases, each one of which would require a dozen logons. To further complicate matters, the passwords are changed every 3 months.
But beyond these immediate issues, the question has broader implications. I have several programs that use windows/%windows, and would like to convert these over. I have developed a work-around by calling out, via the X statement, to a little form to be filled out (which raises another, interprocess communications queue, question), and could do the same, or something similar for the logon.
But things would be so much simpler to get access to the prompts.
11-27-2012 02:23 PM
What databases are you using? Where I work we exclusively use Windows Authentification against SQL Server databases so no userids or passwords are required. If your databases are not on Windows servers this is probably not an option you could use though.
Sadly you have discovered one of the limitations of EG - it doesn't support server-initiated windowing so options like the LIBNAME PROMPT for userids and passwords are not available...
11-27-2012 03:46 PM
You have figured out that you cant attach prompts to a .sas program - they are part of a SAS EG project.
However, if you would like to have a dialog screen with takes in passwords and hides details from the user, consider creating custom tasks. They are shareable, and can be included in SAS projects, but, they do require programming knowledge in .NET. See http://support.sas.com/documentation/onlinedoc/guide/customtasks/index.htm for more details.
11-27-2012 04:05 PM
Nick and chris:
Don't know that I'm allowed to compile .net stuff or not - we're tied down pretty tight here.
Let me look it over, see what's what.
Thanks for the lead,