Hello,
My organization mostly uses the old school SAS Windowing Environment for running programs. A lot of these programs that connect to ORACLE DB have a prompt window that allows the user to type in the name and password and then after successfully entered, the program runs.
Is there a solution for SAS Studio to display a window prompt so a user can type in their username / pw to connect to Oracle?
DBPrompt=yes; works for SAS Windowing Environment.
DBPrompt=yes; doesn't work for SAS Studio.
Is there a solution for SAS Studio to also display a window prompt for username and password?
Thanks for any input!
Kaleb
You should be able to make a TASK in SAS/Studio that allows entry of information. Just be careful as I am not sure if there are ways to make the password secure.
Here is a picture of an example:
Hello,
Are you using SAS Studio to submit code on a SAS 9.4 server?
Or are you using SAS Studio to submit code on a SAS Viya server?
The DBPROMPT= LIBNAME Statement Option
is not applicable to SAS Viya.
Koen
The way I've seen that done normally:
Normally DBA's prefer this approach as it removes the need for user management/sync with SAS on the DB side.
If you really need individual user credentials with a Studio version where prompts are not available then one option would be for users to create environment variables with their credentials in their .profile.
In SAS code you then could use these environment variables instead of the SAS macro variables from the prompt. Or you could amend the autoexec and look for such environment variables (which will exist and have values set depending on the user who initiates the SAS session) and populates the macro variables as previously the prompt did.
....just giving you some ideas.
The most common approach is using an authdomain instead of explicit user credentials.
Using an authdomain in SAS 9.4 will also allow for an uncomplicated migration path to SAS Viya and Cloud.
https://blogs.sas.com/content/sgf/2017/08/17/sas-viya-sharing-credentials-for-database-access/
You should be able to make a TASK in SAS/Studio that allows entry of information. Just be careful as I am not sure if there are ways to make the password secure.
Here is a picture of an example:
Good idea from @Tom .
Here's how to do that:
Tasks are based on the common task model (CTM), which consists of XML (metalanguage that allows for custom mark-up language) and Velocity Template Language (VTL or Apache Velocity language). Each task, SAS-supplied or custom, is based on such a CTM file.
By the way ... I also don't know about the security.
Something I tried out of curiosity --> the macro windowing environment (%window and %display).
Test Result was negative ... these do not work in SAS Studio!
Koen
I don't know how well it would work but there's this from the SAS Github repository:
https://sassoftware.github.io/sas-studio-tasks/prompts/
I can't try it myself as our servers are blocked from going through our firewalls and proxies.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: