If it's SAS tables then security needs to be applied on OS level. You don't need a password but you just store the SAS tables (files) in a folder which is only readable by defined users/groups.
If it's a database then use an authentication domain defined in SAS Metadata and apply SAS metadata security on this domain so that that only defined users/groups can use it.
If you leave out the filename the encrypted password is written to the SAS log where you can copy and paste it wherever you like.
Please bear in mind, that leaving even encrypted passwords in files is not secure. For example, anyone can copy this password into their own SAS programs and providing they also know the user name can access databases without unencrypting the password string.
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.