DATA Step, Macro, Functions and more

Right arrow character causes problems only when logging with proc printto

Accepted Solution Solved
Reply
Super Contributor
Posts: 405
Accepted Solution

Right arrow character causes problems only when logging with proc printto

Hello,

 

I have a program that has a label that is using a small right arrow.  When I run the program through sas manually it runs fine with no errors.  I check the properties on the table and look for the variable and label shows the small right arrow. 

 

When I run the following code it gets to the the variable with the right arrow and stops.  It says that the "DATA STEP running" but nothing is happening.

 

proc printto log="C:\temp\test.log" new ;
run ;

%inc "C:\temp\test.sas" /source2 ;

proc printto ;
run ;

When I cancel submitted statement and go to the log file it is stopped at that variable and the label go to the character right before the right arrow.

 

My question is why it works if I just run the program, but doesn't when the program is included and proc printto is wrapped around it?

 

I think it is an encoding issue but I'm not sure how to correct this without having to do it manually and I can't do that because there could be many files to update.

 

 

 


Accepted Solutions
Solution
a month ago
Super Contributor
Posts: 405

Re: Right arrow character causes problems only when logging with proc printto

Posted in reply to jerry898969

I was able to figure it out by adding the encoding option to the include statement

 

proc printto log="C:\temp\test.log" new ;
run ;

%inc "C:\temp\test.sas" /encoding="utf-8" source2 ;

proc printto ;
run ;

View solution in original post


All Replies
Solution
a month ago
Super Contributor
Posts: 405

Re: Right arrow character causes problems only when logging with proc printto

Posted in reply to jerry898969

I was able to figure it out by adding the encoding option to the include statement

 

proc printto log="C:\temp\test.log" new ;
run ;

%inc "C:\temp\test.sas" /encoding="utf-8" source2 ;

proc printto ;
run ;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 68 views
  • 0 likes
  • 1 in conversation