BookmarkSubscribeRSS Feed
andrewjmdata
Obsidian | Level 7

Hi, We want to send a password from a batch file to be used in a sas prog that actually comes from an Azzure Vault (encrypted key). 

 

The batch file command runs sas, the prog and then we put sysparm at the end:

 

c:\progs\sas.exe -sysin "test.sas" -sysparm (Passwordstringalphanum)

 

In a test environment our solution works fine where the password is a mix of alpha and numeric. However, when we use any non alpha/numeric character it fails. eg comma,hash,star,slash etc.

 

Am pretty sure the issue is the non alpha/num characters in the password.

 

We have no control over the password so can't suggest passwords are only alpha/num.

 

Any ideas appreciated!

 

Thanks

 

Andrew

5 REPLIES 5
SASKiwi
PROC Star

Have you tried enclosing the string with single quotes? That should mask non-alphanumeric characters.

andrewjmdata
Obsidian | Level 7

I think we have tried all sorts of variations like that but I'll check.

 

Was hoping there might be a flag I could use/something.

 

Thanks

 

Andrew

Kurt_Bremser
Super User

NEVER, EVER, not even in your baddest dreams, put a password in a commandline. Your CSO will have you hung, drawn and quartered, and rightfully so.

Store passwords in metadata, where you can control access, or setup passwordless connections with (protected) public/private key pairs.

andrewjmdata
Obsidian | Level 7

Hi Kurt, As I said in my message the actual password is stored in Azzure Vault. We are testing to ensure we can pass strings as passwords that will almost certainly contain non alpha/numeric chars.

 

Andrew

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!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 803 views
  • 2 likes
  • 3 in conversation