BookmarkSubscribeRSS Feed
shoin
Lapis Lazuli | Level 10

Hello all.  Bleated HNY '19

 

I am not a developer and trying to figure out the most efficient method of doing the two following things.

 

1) In BASE editor I had a %window macro when I started my editor for credentials input and then I did not have to do that for the rest of the session for my data sources, to do the same in EG, what is better? 

 a.   Write %let for ID, PWD and place it in INSERT CUSTOM CODE when starting EG? upon server connection? or

 b.   have the same  % let place it in an autoexec and point to it in a specific folder?  I need some access as the PWD will change every 45 days (data source specific)?  Or open to a better option?

 

2) Is there a way to set default action when EG initializes? .. That is, on EG session start and automatically open a particular SAS program?

 

As usual, TY in advance

 

S

9 REPLIES 9
TomKari
Onyx | Level 15

First of all, Happy 2019 to you as well! And welcome to the exciting, if occasionally frustrating world of Enterprise Guide.

 

1) How you address credentials may be different if you're in a "corporate", centrally managed environment or setting this up just for your use, with the SAS software on your machine. There are different options for credentials in EG. If you're in a corporate environment, you should talk to your SAS administrator about how your organization handles it. If you're alone, which credentials do you need to manage?

 

2) Not aware of any options for this specific requirement. Hopefully someone else will chime in.

 

Best,
Tom

shoin
Lapis Lazuli | Level 10

@TomKari Thank you for your reply.  The credentials are for data source (DB) which has its own local credential management system and not tied in with nt_authentication,  Instead of doing %let statements and creating &user, &pwd type variables in each sas code, just want the most efficient way of storing it once (change at one place) and those are available in my libname statements.

 

I hope that it clarifies it.

 

Re. #2 a long time ago i read something by Chris H. about some task or action item one could insert in the project flow, etc may be i am hallucinating ... this would be a great option to have to control some default action upon initialization ...

 

Best,

 

S

ballardw
Super User

@shoin wrote:

@TomKari Thank you for your reply.  The credentials are for data source (DB) which has its own local credential management system and not tied in with nt_authentication,  Instead of doing %let statements and creating &user, &pwd type variables in each sas code, just want the most efficient way of storing it once (change at one place) and those are available in my libname statements.

 

I hope that it clarifies it.

 


I think to replace a %window that in EG you would be looking for a PROMPT (or two or three), which opens a widow and prompts you to enter a value which is then placed in a macro variable if you want to enter them at run time.

Better might be to place the values in a data set if they don't change often and then create either the macro variables from the set or other code using those values.

SASKiwi
PROC Star

If your custom code is just for database connections, and you want those connections to be widely available to other users, then I would recommend investigating setting up these connections in SAS metadata. This means anyone starting an EG session could have these connections available to them and they would show in the EG Server List panel.

shoin
Lapis Lazuli | Level 10

Hello and TY for your reply.  Basically this is for ea. person DB connections and from enterprise perspective global libraries are not something under consideration,

 

If on a personal user level, i would like some libnames (BASE, DB, etc) available to me and I do not wish to code %let user and pwd statements but would like to have my ID & PWD available in a session what is the best way was the question I am looking for some insights.

 

TIA

 

S

SASKiwi
PROC Star

You can control who has the EG DB connections by using metadata permissions. It really is a better way to go than a coded solution.

 

When you say userid and password do you mean your DB one not your system logon?  

shoin
Lapis Lazuli | Level 10

I understand the best practice method.  However, sometimes it is akin to fitting a circle through a square ...  that was the first solution we thought of but due to logistics it is not viable in this situation.  All libraries regardless BASE or DB are set by end users (the need) so that is the modus operand.  Question simply is, how best to do that in EG?

 

Appreciate your time 🙂

 

S

SASKiwi
PROC Star

So each user has their own unique set of LIBNAMEs and a unique user name and password for database connections? How many users are we talking about? Just trying to understand your requirements more clearly. Ideally it would be better to minimise the differences in LIBNAME definitions between users.

 

Have you looked at SAS AUTOEXEC programs as an option? These are server-based so would be much easier to manage than EG custom code.

shoin
Lapis Lazuli | Level 10

autoexec was mentioned in the premise ... so thank you I will explore that option.  

 

Thank you for your time!

 

S

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 9 replies
  • 1160 views
  • 1 like
  • 4 in conversation