SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

How to analyze SAS password protected data with no WRITE or ALTER passwords

Reply
Occasional Contributor
Posts: 17

How to analyze SAS password protected data with no WRITE or ALTER passwords

Hello,

I have a password protected SAS dataset. I have been provided the READ password, but not the WRITE or ALTER passwords. 

 

If I try subsetting the dataset, then I encounter the following error,

 

7    Data SubsetData;
8    Set in.VisionData;
NOTE: Data file IN.VISIONDATA.DATA is in a format that is native to another host, or the
      file encoding does not match the session encoding. Cross Environment Data Access will be
      used, which might require additional CPU resources and might reduce performance.
WARNING: Some character data was lost during transcoding in the dataset IN.VISIONDATA.
         Either the data contains characters that are not representable in the new encoding or
         truncation occurred during transcoding.
9    Run;
 
ERROR: Some character data was lost during transcoding in the dataset WORK.SUBSETDATA. Either the
       data contains characters that are not representable in the new encoding or truncation
       occurred during transcoding.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.SUBSETDATA may be incomplete.  When this step was stopped there were 0
         observations and 2746 variables.
WARNING: Data set WORK.SUBSETDATA was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           2.58 seconds
      cpu time            0.03 seconds

 

I can execute some procdures (e.g. PROC Freq) using the READ password in the procedures statement, but not other procedures (e.g. PROC sort). I need to recode the variables in this dataset for my analyses.

 

Thanks.

Super User
Posts: 19,822

Re: How to analyze SAS password protected data with no WRITE or ALTER passwords

This has nothing to do with the password portion of the dataset, but with the fact that you're working on different systems. Either Unix vs Windows.

 

You can avoid this by transfering data via a CPORT/XPORT file instead of as a SAS dataset.

Occasional Contributor
Posts: 17

Re: How to analyze SAS password protected data with no WRITE or ALTER passwords

I am working on a Virtual Windows on my MacBook, and the dataset in a sas7bdat format. I have analyzed other databases in this format as well without any errors. Let me know your thoughts.


Thank you for your response.

Super User
Posts: 19,822

Re: How to analyze SAS password protected data with no WRITE or ALTER passwords

It depends on where the SAS7bdat file originated. You're using SAS UE which is actually a UNIX box. 

Most likely this file was created on a Windows machine.

 

It doesn't matter that you've used other files, it depends on where the file originates. 

If this is from a source you've used without issue previously, and think it should work without issue, contact them for specifications on the file. 

Occasional Contributor
Posts: 17

Re: How to analyze SAS password protected data with no WRITE or ALTER passwords

Thank you for your quick response. Two more questions,

 

  • Can you elaborate on the type of file specifications that need to be examined?
  • Is it possible to convert the sas7bdat file that I have received so that it can work on my Virtual Windows?

 

Sorry for bugging you, but I’m a beginner. Thanks!

Super User
Posts: 19,822

Re: How to analyze SAS password protected data with no WRITE or ALTER passwords

By file specs, I meant what OS, bit (32/64 bit), and encoding was used to create the file. These are more system settings. I can't recall if encoding matters for a SAS dataset or just text files. 

 

AFAIK when you get the truncation error there isn't a workaround except to recreate the data. 

Super User
Posts: 19,822

Re: How to analyze SAS password protected data with no WRITE or ALTER passwords

Here's a better explanation. And more correct than mine /)

 

http://support.sas.com/kb/52/716.html

Super User
Posts: 19,822

Re: How to analyze SAS password protected data with no WRITE or ALTER passwords

And last but not least, you don't have access to the CFG file on SAS UE. 

Ask a Question
Discussion stats
  • 7 replies
  • 260 views
  • 0 likes
  • 2 in conversation