04-06-2015 05:09 AM
When I merge a particular dataset, Organization2014, in SAS with others I continually come up with the same error regarding transcoding. I have been able to find that this datase is in Wlatin1 format, but I don't know how I can convert it so that it could be merged with the other datasets. Below is a screenshot of the error if it is any use. Thank for taking your time to read the question, I really appreciate i
04-06-2015 12:07 PM
I don't know if this will apply to you, but at my former organization I had a simple rule. When someone called, and mentioned an error that included the word "transcoding", I would reply that they had copied text out of Microsoft Word and tried to use it in SAS. There are a number of features, like smart quotes, where Word introduces characters that cause default SAS to burp.
If this applies to you, take a look at your data for things like slanted quotes, unusual dashes, and special characters. They could be the problem.
04-06-2015 12:36 PM
Where is the screenshot?
I think the correct word is encoding when your are about NLS SAS(R) 9.4 National Language Support (NLS): Reference Guide, Third Edition
If you look at that you will find even Wlatin1 is used in different charactersets/encodings.
Your messages is indicating a difference has been marked so the process of transcoding will try to correct the differences
The most modern encoding used with internet (html) and office is utf8. This encoding is of variable length 1-4 bytes and you need a run-time version of SAS to handle that. Eguide however (.NET) is always utf8.
Another common message is foreign native format. That is about CEDA Moving and Accessing SAS(R) 9.4 Files, Second Edition.
Originally it was aprt of SAS/connect (SAS v6) but move to base as a generic approach. The cause of this is not having the SAS-datasets being processed by the current version. SAS is weird to common RDBMs approaches allowing cross ref versions machine layout to be read and created.
You should think of sas-datasets / tables as they are RDBMS like an not drag/drop using the files-tab of Eguide or Windows explorer.
Use the SAS explorer and libnames to access data.
04-07-2015 01:27 AM
That screen is showing a lot:
- You have Eguide that is UTF-8
- There is that CEDA message in the top, The data is coming from a different SAS releases/machines.
- The transcoding message is a result of having different encodings and different SAS releases/machines.
- It is a student/teachers Eguide approach that was the common approach SAS offered until a year ago. You are working on the Orion dataset.
What has happened is that your teacher did an upload from his system to the educations environment and it was a different version or afterwards the version/release did change. When your teacher wil do a fresh copy may be just using this environment the data is updated to the current native one and the message will disappear.
04-07-2015 03:28 AM
Thanks for your information Jaap.Unfortunately my teacher is not going to release another fresh copy of the data set. Is there anyway I could fix it manually? Thanks
04-07-2015 05:38 AM
The dataset with the error is connected to a lot of other further datasets that I have created and if I delete the original one then it will affect many other things in my process flow. Is there a way around this?
04-07-2015 06:22 AM
I have tried to copy the dataset out using this code:
proc append base=ORION.neworganization2014 data=ORION.organization2014;
However, I am still receiving the same error:
ERROR: Some character data was lost during transcoding in the dataset ORION.ORGANIZATION2014. Either the data contains characters
that are not representable in the new encoding or truncation occurred during transcoding.
04-07-2015 06:29 AM
Than rename those datasets and use the new one. Every time you are using the old one the message will pop-pup the new one is converted and should not give any conversions note anymore. Why not using proc copy with the noclone option?
04-07-2015 07:03 AM
How do I use proc copy exactly? I have looked online but it is hard to understand by me with very limited computer/coding skill.This is an example, is this the right code?
LIBNAME inlib cvp 'SAS-library';
LIBNAME outlib 'SAS-library' outencoding=”encoding value for output”;
proc copy noclone in=inlib out=outlib;
04-07-2015 07:23 AM
LIBNAME inlib '/?/??? ' ; /* put in the physical location where the data is now */
LIBNAME outlib '/?/??? ' ; /* put in the physical location where the data should copy to */i
proc copy in=inlib out=outlib noclone;
/* selection is not needed when copying all */
Use the new physical location in your old code using the old libname ref. See example 3 and the syntax.
04-07-2015 07:43 AM
I have inserted this code:
LIBNAME inlib '/home/zclchjh/sasuser.v94/all_SASDATA/';
LIBNAME outlib '/home/zclchjh/sasuser.v94/all_excel' ;
proc copy in=inlib out=outlib noclone;
I am expecting that the datset organization2014 ends up all_excel but that hasn't happened