I use SAS PC Connect to extract a large database from the WRDS server using PROC DOWNLOAD. In the process, I kept getting warning messages "an error occurred translating a data set variable's value". This really bothers me, since the downloading takes 20+ hours. Why do we have these messages, and is there a good solution?
Hello @xyxu ,
Maybe your "problem" is related to this Cross-Architecture Issue :
SAS® 9.4 and SAS® Viya® 3.5 Programming Documentation
SAS/CONNECT
Encoding Compatibility between SAS/CONNECT Client and Server Sessions
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/n1smv71b6303yen17kx46uxc0nxh.htm
UTF-8 versus WLATIN1 for example.
You can do a PROC CONTENTS on the Wharton data set to find out about its encoding!
Good luck,
Koen
Hello @xyxu ,
Maybe your "problem" is related to this Cross-Architecture Issue :
SAS® 9.4 and SAS® Viya® 3.5 Programming Documentation
SAS/CONNECT
Encoding Compatibility between SAS/CONNECT Client and Server Sessions
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/n1smv71b6303yen17kx46uxc0nxh.htm
UTF-8 versus WLATIN1 for example.
You can do a PROC CONTENTS on the Wharton data set to find out about its encoding!
Good luck,
Koen
Hello,
I am afraid you have to set the encoding of your local SAS session to UTF-8 as well.
Look in the documentation for :
"Setting the Encoding of a SAS Session".
Although you can also try to add some data set options to the datasets in proc download. Not sure if that will work. Maybe worthwhile to check this first !!
Something like :
select sales(outrep=);
select sales(encoding=);
I guess your (Windows?) local SAS session is in WLATIN1.
And I suppose you want to stick to WLATIN1.
That's no problem.
If you start your Windows SAS session again with WLATIN1 , you will be able to work with the Wharton UTF-8 dataset thanks to CEDA (Cross Environment Data Access).
But it's more efficient to change the encoding of the data set.
This is how that can de done :
LIBNAME inlib cvp 'SAS-library';
LIBNAME outlib 'SAS-library' outencoding=”encoding value for output”;
proc copy noclone in=inlib out=outlib;
select car;
run;
Koen
Here is how I did it. Might be useful to others. I used
proc options option=encoding; run;
to find my current encoding. It was indeed WLATIN1. Then I followed the instructions here to change the encoding of my local SAS session to UTF-8. The "problem" disappeared!
If your local encoding is wlatin, this character set has no means to represent or store all the characters available in UTF8.
The only way to keep all the source UTF8 characters is to save your data in a UTF8 SAS data set.
To do this, you should run your SAS session as a UFT8 session. This change can only be made in the configuration file that's read when SAS starts.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: