The SAS Output Delivery System and reporting techniques

ods

Reply
Super Contributor
Posts: 297

ods

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

 

Super User
Posts: 10,500

Re: ods

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.

Super User
Posts: 9,681

Re: ods

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

 

Super Contributor
Posts: 297

Re: ods

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

Super User
Posts: 9,681

Re: ods

[ Edited ]

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

Ask a Question
Discussion stats
  • 4 replies
  • 393 views
  • 1 like
  • 3 in conversation