DATA Step, Macro, Functions and more

Encoded password

Reply
SAS Employee
Posts: 1

Encoded password

Hi everyone.

I have a table protected with a password. Created with this sentence:

data sasuser.passtab (password=prueba);
format MACHINE PORT USER PWD $15.;
MACHINE='arriero'; PORT='8561'; USER='sasadm'; PWD='sasdesa'; output; run;

I need to access this table with the password encrypted. Then I encrypted this password with the next sentence:


proc pwencode in=prueba out=pwfile;
run;

And that returns me the value: {sas001}cHJ1ZWJh

But when I try to match the table's password and the encrypted password, it doesn't work. Send to me this message:


ERROR: The value specified for the PASSWORD option is too long.




What can I do? We need to solve this issue as soon as possible.

Thank you for your help.


Juan Bedoya
Consultor SAS Colombia
N/A
Posts: 0

Re: Encoded password

Posted in reply to JuanBedoya
Juan -
In the same way you had to quote the password in the pwencode submission:
proc pwencode in="prueba"...
You must also quote the password when used.

This works for 9.2 and later versions. It was not in place for 9.1 (or anything
pre-9.2).

Doing this:
proc print data=sasuser.passtab(password="{sas001}cHJ1ZWJh"); run;

will work at 9.2.
best wishes,
Nancy
Frequent Contributor
Posts: 139

Re: Encoded password

Posted in reply to JuanBedoya
Make sure that the {sas001}cHJ1ZWJh is wrapped in quotes

data one;
set sasuser.passtab(password='{sas001}cHJ1ZWJh');
run;

D
Ask a Question
Discussion stats
  • 2 replies
  • 185 views
  • 0 likes
  • 3 in conversation