DATA Step, Macro, Functions and more

sas002 encoding and usage in SMC

Posts: 51

sas002 encoding and usage in SMC

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


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
Valued Guide
Posts: 2,191

Re: sas002 encoding and usage in SMC

have you tried it without that %STR()
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation