Monday, January 30, 2017

Fix for invalid characters in data

For "ERROR: Some character data was lost during transcoding in the dataset DB.XXXDAT. Either the data contains characters that are not representable in the new encoding or truncation occurred during transcoding." use the following code in program:

proc options option=config; run;
proc options group=languagecontrol; run;

/* Show the encoding value for the problematic data set */
%let dsn=db.xxxdat;
%let dsid=%sysfunc(open(&dsn,i));
%put &dsn ENCODING is: %sysfunc(attrc(&dsid,encoding));

/*Renaming item desc file  (encoding=any) allowed reading */
data temp;
set db.xxxdat (encoding=any);


Anonymous said...

Thanks a lot!

Anonymous said...

Thank you for sharing. your blog is amazing! Keep up the good work!

Video Teraveloka said...

Penggemar Judi Online gak boleh lewatin info penting satu ini. Kali ini panduan tentang Deposit Pulsa XL Telkomsel ke akun Sbobet Online kamu. Hah ? Main judi pake pulsa ? Memang bisa ? (Baca Selengkapnya Disini...)