Hi, I'm new to SAS. I've received two files (.sas7bdat) from my supervisor, who has SAS professional edition or whatever it is called. It is installed directly on his computer. I'm working in SAS Studio University Edition Release 3.8 trough Google Chrome version 77. I'm having trouble using his files. I'm trying to merge them but it is not working. At first, I thought it was a language barrier since I was working on a Mac so I tried doing the same thing on a PC but I got the same error message. The code I'm using is: /*creating a permanent library*/
libname T10LIB '/folders/myfolders/T10';
/*copy of the two files to merge*/
/*copy of the first file*/
data bas;
set T10LIB.bas_01;
/*copy of the second file*/
data randsf;
set T10LIB.randsf_01;
/*merge files*/
proc sort data=bas;
by Lop_nr_Sorsele;
proc sort data=randsf;
by Lop_nr_Sorsele;
data bas_00;
merge bas randsf;
by Lop_nr_Sorsele;
run; The error message that I'm getting is: Some character data was lost during transcoding in the dataset T10LIB.BAS_01. Either the data contains characters that are not representable in the new encoding or truncation occurred during transcoding. If I'm adding the code (encoding=any) after the filename bas_01 it is working. I'm getting the file that I want. However, the file does not work when I try to run it in the statistic module for example Summary Statistics. Regardless of which variables I'm choosing the result is the same, i.e. several error messages all saying either Invalid characters were present in the data or An error occurred while processing text data. When I'm testing with the original files it is working. To the question: What I'm doing wrong? How do I produce a merged file that will work in the statistical module? Hoping you experts have the answer to my frustration. Kind regards, Frida Lindberg
... View more