BookmarkSubscribeRSS Feed
rcwright
Calcite | Level 5

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.

8 REPLIES 8
TomKari
Onyx | Level 15

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

rcwright
Calcite | Level 5

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.

SandorSzalma
Fluorite | Level 6

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

rcwright
Calcite | Level 5

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

SASKiwi
PROC Star

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

nrose
Quartz | Level 8

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

ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
rcwright
Calcite | Level 5

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 8 replies
  • 1324 views
  • 0 likes
  • 6 in conversation