BookmarkSubscribeRSS Feed
NewmanChow
Fluorite | Level 6

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 ?

4 REPLIES 4
jakarman
Barite | Level 11

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

---->-- ja karman --<-----
NewmanChow
Fluorite | Level 6

@Japp Karman:

The second dbcs char is the last one "!" (exclamation mark).

When I  change it to “This is 啊 test 哈” ,the error occurred,too .

jakarman
Barite | Level 11

Than your error makes no sense. Did you try SAS TS already?

---->-- ja karman --<-----
NewmanChow
Fluorite | Level 6

NO ,I am not contact them.  I was just curious about it .It's not  a job. Tks,Japp Karman.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1192 views
  • 0 likes
  • 2 in conversation