Desktop productivity for business analysts and programmers

Where are the prompts located?

Reply
Contributor
Posts: 26

Where are the prompts located?

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?

Thanks.

PROC Star
Posts: 1,146

Re: Where are the prompts located?

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?

Tom

Contributor
Posts: 26

Re: Where are the prompts located?

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.

Contributor
Posts: 27

Re: Where are the prompts located?

Hi,

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.)

Regards,

Sándor

Contributor
Posts: 26

Re: Where are the prompts located?

Hi, Sandor:

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.

RCW

Super User
Posts: 3,238

Re: Where are the prompts located?

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... Smiley Sad

Frequent Contributor
Posts: 91

Re: Where are the prompts located?

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.

Nick

Community Manager
Posts: 2,889

Re: Where are the prompts located?

Good suggestion from Nick.

On the web page he references, you can find a "Signon" sample that shows, in concept, what you might want to do.

Chris

Contributor
Posts: 26

Re: Where are the prompts located?

Nick and chris:

I was somewhat expecting something along these lines - hoping it wasn't so, but knowing deep, deep in my SAS heart I was going to have to get into .net. Not that I haven't done this kind of stuff before - had to simulate a sas and web server onetime using vb and outlook and javascript. Except for having to OK every email that went out to something like 60 managers once a week, it actually worked pretty well. Survived a half dozen federal audits before being contracted out to a team of 12.

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,

RCW

Ask a Question
Discussion stats
  • 8 replies
  • 385 views
  • 0 likes
  • 6 in conversation