BookmarkSubscribeRSS Feed
JuanBedoya
SAS Employee
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
2 REPLIES 2
deleted_user
Not applicable
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
darrylovia
Quartz | Level 8
Make sure that the {sas001}cHJ1ZWJh is wrapped in quotes

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

D

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 2 replies
  • 1709 views
  • 0 likes
  • 3 in conversation