BookmarkSubscribeRSS Feed
beacon
Obsidian | Level 7

Hi,

 

I'm working with password protected data sets and I'd like to get the value from the 'Date Created' column in Dictionary.Tables to facilitate an iterative process across the data sets.

 

I've read that most of the data in Dictionary.Tables will display as missing for password protected data sets, but I'm curious if anyone knows a way to provide a password to unlock the data sets and access missing values. Is this possible?

 

Here's the query I'm using to access Dictionary.Tables:

 

LIBNAME TEST 'C:\MyData';

PROC SQL;
    SELECT
        LIBNAME, MEMNAME, CRDATE
    FROM
        DICTIONARY.TABLES
    WHERE
        LIBNAME = 'TEST'
    ;
QUIT;

Thanks.

4 REPLIES 4
LinusH
Tourmaline | Level 20

Not tested, but I should suspect that if you open the table using data step functions, you should be able to apply the password, and then be able to extract the necessary information.

A bit awkward, yes. But password protection is a quite old, and not so good way of protecting your data - so I would recommend to move away from it if possible.

Data never sleeps
beacon
Obsidian | Level 7

@LinusH wrote:

Not tested, but I should suspect that if you open the table using data step functions, you should be able to apply the password, and then be able to extract the necessary information.

A bit awkward, yes. But password protection is a quite old, and not so good way of protecting your data - so I would recommend to move away from it if possible.



Unfortunately, I am not the owner of the data set, so I can't remove password protection on the data set.

 

Also, the data in the data set does not contain a 'Date Created' or 'CRDATE' column. I would have obtained it using a data step functions or PROC SQL if it were there, but since it's not, the only option I could find was to try to obtain it from the metadata that's stored in Dictionary.Tables. This worked great for a test data set that I created (without password protection), but I found that the values I was after would display as missing for password protected files.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

"Unfortunately, I am not the owner of the data set, so I can't remove password protection on the data set." - but you are the owner of the data import process.  Yes, you can't edit source, but you can get: a transfer document detailing structure and other metadata, and can make your own copy of the data which is unprotected.  

 

"I'm working with password protected data sets and I'd like to get the value from the 'Date Created' column in Dictionary.Tables to facilitate an" - Eeek, eek, and eek.  Why password protected datafiles, there is no benefit I can see unless the whole system is open.  Second off using date created to do anything - this really doesn't mean anything.  Validated, repeatable processes should be run off fixed data with known metadata, automated dates and such like can be messed up. 

"iterative process across the data sets" - can't see why you would need it, append new data to old then run process, or run process on new data then append to old.  Abusing the macro system to do loops and such like results in messy code which falls over.

Kurt_Bremser
Super User

Don't place any value on the creation/modification date of a file. Most of the time that date has no connection to the actual logical date of the data contained in the files. Just copying a file from A to B will change that.

 

I have datasets containing data from 12/1999 that were created in 2006, because at that time we converted them from .ssd01 to .sas7bdat. We know the logical date of the data only because the datasets are stored in the '1999' library.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 9281 views
  • 0 likes
  • 4 in conversation