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.
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.
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.
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?
Looks to me as if the processing of such datasets is disabled on SAS On Demand.
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?
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.
Thanks Kurt - appreciate it!
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.
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)
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.
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.
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.
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.
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;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Ready to level-up your skills? Choose your own adventure.