Hello, all:
I received some error message from Log while I was using ODS system. How to correct them?
ods excel file='\\C\2020yt.xlsx\2020yt2.xlsx';
22 proc print data=yt.final;
NOTE: Data file YT.FINAL.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.
23 run;
WARNING: Some character data was lost during transcoding in the dataset YT.FINAL. Either the data
contains characters that are not representable in the new encoding or truncation occurred
during transcoding.
NOTE: There were 96 observations read from the data set YT.FINAL.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.67 seconds
cpu time 0.62 seconds
24 ods excel close;
NOTE: Writing EXCEL file: \\C\2020yt.xlsx
Those are not errors. They indicate that some values were changed because the current system processing that data set, which likely originated on either a different OS or version of OS, and the coding of values is different. The specific differences could be flavors of unicode or other double-byte coding system or single vs double-byte.
Corrections to the data to eliminate the messages involve determining the exact difference and modifying the data.
It seems that the SAS encoding which create that dataset 'yt.final' is not the same as your SAS encoding .This could lost some character which your sas session don't support .
1) Use proc cport + proc cimport to transport sas dataset.
2)Make a CSV or TEXT file to transport and import it by right encoding:
infile '....' encoding='utf8';
Thanks for the suggestion. However, the code (proc cport + proc cimport) is complecated for me to understand.
1)Then can you transport these data via CSV or TXT file ?
2)Can you change your sas session's encoding to the same as the table should be .?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.