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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1570 views
  • 2 likes
  • 3 in conversation