BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
petrosb
Calcite | Level 5

Hi,

 

I'm working in SAS EG and I've used macros to set up special characters. For example:

 

%LET DEG=%SYSFUNC(BYTE(176));

 

But when I call the macro, I only get a black diamond with a question mark. The exact same code works in SAS Display Manager perfectly fine. Does anyone know what is going wrong? There are no errors or warnings displayed.

 

Thanks so much.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

What display font is showing the result?

 

Send the result to a text file.

Open the file.

Change the display font. You will likely see a change in the character shown.

 

Since you are asking this in the Enterprise Guide section then perhaps you want to investigate what font has been set by the SAS admin for your output.

 

ASCII characters above 126 are very much subject to the font used.

 

Unicode is one of the attempts, in addition to other issues, to get around the font supplier settings.

 

View solution in original post

4 REPLIES 4
ballardw
Super User

What display font is showing the result?

 

Send the result to a text file.

Open the file.

Change the display font. You will likely see a change in the character shown.

 

Since you are asking this in the Enterprise Guide section then perhaps you want to investigate what font has been set by the SAS admin for your output.

 

ASCII characters above 126 are very much subject to the font used.

 

Unicode is one of the attempts, in addition to other issues, to get around the font supplier settings.

 

petrosb
Calcite | Level 5

You are right, it is the font. Thank you so much, I will sort it with the admin.

ballardw
Super User

You don't mention where/how you are using this value.

It may be that you can override the default font(s) such as in a title or variable label for a reporting procedure.

 

Of you might create a custom ODS style that overrides the fonts to use one where the symbol(s) display as desired and use that style on an ODS destination.

 

For what very little this may be worth, this issue goes back to about the days of DOS 3. For example the original IBM PC character set used a set of nice box drawing characters that were often used to make "pretty" dialog boxes. The Microsoft changed the default display characters and those nice boxes appearance changed. You can actually see this in SAS and the FORMCHAR option for box drawing in the output (listing) window.

The font used to display text in the text box for my setting of FORMCHAR shows:

 

 FORMCHAR=‚ƒ„…†‡ˆ‰Š‹Œ+=|-/\<>*

But since I use the SAS MONOSPACE font my listing output has nice boxes instead of using the + and - characters to make the corners and horizontal lines in boxes.

The standard other set of Formchar looks like

formchar="|----|+|---+=|-/\<>*";

 

petrosb
Calcite | Level 5

It was for a proc report title so I was able to override it in the end. I'm new to this so all this is very interesting, thank you for the context.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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