BookmarkSubscribeRSS Feed
ThomasH
Calcite | Level 5
Hi all,

I've got another one - maybe you can (as always) help.

Environment is SAS 9.2 / The current setup worked for 9.1.

I have encoded a DB2 password with sas002 (proc pwencode) and I store it in the autoexec file that is used upon job execution.

It looks like this:
%Let DBuser= %str(Username);
%Let DBpassw = %str({sas002}AString);

In the Management Console the DB user setup references &DBuser and &DBpassw but what happens in the generated Table Loader code is, that the &DBuser variable is resolved to the correct username but the password is transformed to

password="{sas002}AnotherString"

I found out that AnotherString is the sas002 encoded name(!) of the variable &DBpassw (exactly as entered in the Management Console), so it does not get resolved like the user variable. How is this to be entered correctly into the Management Console?

Thanks a lot!
Thomas Message was edited by: ThomasH
1 REPLY 1
Peter_C
Rhodochrosite | Level 12
have you tried it without that %STR()
?

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
  • 1 reply
  • 3572 views
  • 0 likes
  • 2 in conversation