BookmarkSubscribeRSS Feed
ybz12003
Rhodochrosite | Level 12

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

 

4 REPLIES 4
ballardw
Super User

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.

Ksharp
Super User

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';

 

ybz12003
Rhodochrosite | Level 12

Thanks for the suggestion.  However, the code (proc cport + proc cimport) is complecated for me to understand.

Ksharp
Super User

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 .?

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 Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1038 views
  • 1 like
  • 3 in conversation