DATA Step, Macro, Functions and more

How to display missing values in Dictionary.Tables for password protected data sets?

Reply
Occasional Contributor
Posts: 19

How to display missing values in Dictionary.Tables for password protected data sets?

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.

Super User
Posts: 5,882

Re: How to display missing values in Dictionary.Tables for password protected data sets?

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
Occasional Contributor
Posts: 19

Re: How to display missing values in Dictionary.Tables for password protected data sets?


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.

Super User
Super User
Posts: 9,599

Re: How to display missing values in Dictionary.Tables for password protected data sets?

"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.

Super User
Posts: 10,267

Re: How to display missing values in Dictionary.Tables for password protected data sets?

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 4 replies
  • 142 views
  • 0 likes
  • 4 in conversation