Hello All,
When I test SAS Logging Facility in SAS Programs,I met this error.
sample1:
filename TestLog (".\test.log" ) encoding='UTF-8';
%LOG4SAS( )
%LOG4SAS_APPENDER(TestLog,"FileRefAppender",'FILEREF=TestLog THRESHOLD=DEBUG')
%LOG4SAS_LOGGER("testLogger","ADDITIVITY=TRUE APPENDER-REF=(TestLog) LEVEL=DEBUG")
%macro test(x);
%LOG4SAS_DEBUG(testLogger, "&x") ;
%put &x.;
%mend;
%test(This is a test!);
filename TestLog clear;
It Works well .
I chang the "This is a test!" ->"This is 啊 test!" (just one double-byte char).It works well too;
but when I change it to“This is 啊 test !”(two double-byte chars).An error occurred
'ERROR: Can't create transcoding pipeline for fileref appender "TestLog ". '
What Happend? Why ?
what is the second dbcs char? HTML us utf8 and not seeing that one. Not every two bytes is a valid char in utf8 (1-4bytes).
@Japp Karman:
The second dbcs char is the last one "!" (exclamation mark).
When I change it to “This is 啊 test 哈” ,the error occurred,too .
Than your error makes no sense. Did you try SAS TS already?
NO ,I am not contact them. I was just curious about it .It's not a job. Tks,Japp Karman.
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.