BookmarkSubscribeRSS Feed
ImSame
Calcite | Level 5

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.

7 REPLIES 7
Reeza
Super User

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.

ImSame
Calcite | Level 5

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.

Reeza
Super User

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. 

ImSame
Calcite | Level 5

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!

Reeza
Super User

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. 

Reeza
Super User

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

 

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

Reeza
Super User

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1433 views
  • 0 likes
  • 2 in conversation