BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
scottyoung77
Fluorite | Level 6

Hi,

 

I'm brand new to the SAS environment and am trying to load/open a password protected data file in SAS but keep getting the "opening of password protected data sets is not supported" error message (see attachment). I wouldn't normally ask, but I'm getting the sense that this might be related to the version of SAS I'm using? The organization that owns the data set (the National Institute of Alcohol Use and Alcoholism - a division of the NIH) is insisting that SAS does support password protected data sets and that the issue is on my end.

 

So I guess I'm not sure if the issue is that SAS doesn't support password protected data files in general? That the version I'm using doesn't support them? Or something else entirely? I'm accessing SAS Studio through SAS OnDemand for Academics (Release: 3.81 - Enterprise Edition). At least I think that's the version I'm using - like I said, I'm brand new and it's a little hard to tell with all of the different versions and components of SAS that are available (version info attached as well).
 
Any help would be greatly appreciated.
 
Thanks!
Scott
1 ACCEPTED SOLUTION

Accepted Solutions
12 REPLIES 12
SASKiwi
PROC Star

Do you know on what OS this dataset was created and how it was downloaded from the provider? What is the file extension of the dataset? SODA runs on Linux so if the dataset was created under a different OS then that might cause issues.

scottyoung77
Fluorite | Level 6

Thanks SASKiwi - I appreciate the assist!

 

Unfortunately, I don't know what OS the dataset was created on. Is there a way of determining that from the file itself? As for how it was downloaded, I downloaded a compressed folder from the NIH's secure file transfer service (https://secureemail.nih.gov/bds/Login.do). And the file extension is sas7bdat.

 

Does any of that help narrow things down?

scottyoung77
Fluorite | Level 6

Thanks Kurt - I appreciate it. Are you getting that conclusion from the error message attachment in my original post or did you find a resource online that suggests it?

Kurt_Bremser
Super User

I ran this short test:

data test;
set sashelp.class (read=xxx);
run;

proc print data=test (read=xxx);
run;

and could verify that password protection is working on SAS On Demand.

So it's either the dataset itself or the password which does not work.

 

Since there's no longer a direct link to SAS technical support on the ODA site, I'm calling out to @ChrisHemedinger if he can find us someone who can deal with this specific kind of issue.

scottyoung77
Fluorite | Level 6

Thanks Kurt - appreciate it!

Kurt_Bremser
Super User

I made a mistake in my earlier post, and so it failed to reveal your issue.

data test (read=xxx);
set sashelp.class;
run;

proc print data=test (read=xxx);
run;

Now I get the same pop-up because of the failure of the viewer to open the dataset, but the PROC PRINT output works.

So it is now confirmed that On Demand can work with password protected files, but (IMO) the dataset/table viewer should ask the user for a password instead of just failing.

Tom
Super User Tom
Super User

I suspect that the pop-up error is from SAS/Studio (and not the actual SAS program you are using SAS/Studio to submit).

 

If I run this program in SAS on demand 

data class(read='test'); set sashelp.class; run;
proc contents data=class(read='test'); run;

it runs fine

 69         data class(read=XXXXXX); set sashelp.class; run;
 
 WARNING: The file WORK.CLASS.DATA is not ALTER protected.  It could be deleted or replaced without knowing the password.
 NOTE: There were 19 observations read from the data set SASHELP.CLASS.
 NOTE: The data set WORK.CLASS has 19 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 70         proc contents data=class(read=XXXXXX); run;
 
 NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.02 seconds
       cpu time            0.03 seconds

, but I get that same pop-up error (blocking the view of the actually correct output)

Tom_0-1720285498272.png

 

because it is automatically trying to let me view the CLASS dataset in the SAS/Studio interface.

 

So if you actually want to view the data just use PROC PRINT to make an output of the data instead.

scottyoung77
Fluorite | Level 6

Thanks for the suggestion Tom. I tried swapping out proc contents for proc print but I think my dataset might be either too large for the procedure or too large to be supported by ODA. It's the data from an NIH epidemiological study with >4K variables for >36K respondents. Not sure if that's too big for this environment or not, but when I ran the proc print program, it just ran. And ran. And ran some more. I finally terminated it after about 15 minutes.

Kurt_Bremser
Super User

If you want to use PROC PRINT, use the OBS= dataset option to reduce the amount of rows, and a VAR statement to select only some of this mass of variables.

scottyoung77
Fluorite | Level 6

Looks like I was ultimately going about this all wrong. I don't think I even realized what I was asking SAS Studio to do and it threw an unrelated error message because my ask was just too much. Once I started using OBS and VAR statements to create, explore, and work with subsets of the dataset, the password protected datafiles error message stopped happening. Makes sense - the dataset is massive and it's not functional to try and work with >4K variables all at once. The error isn't related to the issue (it points you in the wrong direction entirely), but that's a different problem altogether.

 

Thank you Kurt and Tom for your suggestions - they got me pointed in the right direction and helped me solve the problem.

Tom
Super User Tom
Super User

If you are curious about the dataset then do things like run PROC CONTENTS on it.  Or print just a few of the observations.  I find it helpful to dump a few observations of the values to the LOG and look at them that way:

data _null_;
  set have(read='pw' obs=3);
  put (_all_) (=) ;
run;

You can also try getting a sense of which variables have a lot of different values and which have only a small set of values (like yes/no variables for example) by using the NLEVELS output of PROC FREQ.

proc freq data=have(read='pw') nlevels;
  tables _all_ / noprint;
run;

You are not going to be able to look at a printout that big anyway.   It probably wouldn't work very well in the SAS/Studio viewer either, especially so many variables.  But you could easily make a copy of the dataset that does not have the password attached and look at that version instead.

data nopw ;
  set have(read='pw');
run;

 

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 12 replies
  • 689 views
  • 6 likes
  • 4 in conversation