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.
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.