BookmarkSubscribeRSS Feed
hellind
Quartz | Level 8

 

I run this code in EG 8.3

 

proc sgplot data=intmonthly;

series x=mis_dt y=records;

run;

 

I get this warning message: 'Warning: The font <sans-serif> is not available. Albany AMT will be used.

 

In least amount of code, how do I remove this warning message?

 

As part of practice, when I deploy a production code, I have to ensure that all Warning Messages had been explicitly removed.

 

 

9 REPLIES 9
ballardw
Super User

@hellind wrote:

 

I run this code in EG 8.3

 

proc sgplot data=intmonthly;

series x=mis_dt y=records;

run;

 

I get this warning message: 'Warning: The font <sans-serif> is not available. Albany AMT will be used.

 

In least amount of code, how do I remove this warning message?

 

As part of practice, when I deploy a production code, I have to ensure that all Warning Messages had been explicitly removed.

 

 


Since you show no code that explicitly uses any font then the most likely issue is the ODS Style you are using is causing the message. So my question to you is what ODS STYLE is in effect?

 

Likely changing the style will remove the message. If you are using a custom ODS Style then use one of the SAS supplied styles like HTMLBlue and see if that corrects the issue.

 

There can also be interactions between specific ODS destinations, which you also do not indicate, and options. Activex has a number of interaction warnings depending on the version of SAS you are running.

SASKiwi
PROC Star

Will you be using ODS graphics output when this program is productionised? If not adding an "ODS graphics off;' statement will remove the warning. 

hellind
Quartz | Level 8

 

hellind_0-1696415506973.png

 

I still get this error.

hellind_1-1696415538377.png

 

andreas_lds
Jade | Level 19

Interesting. Is the error shown if the following code is executed in a fresh session?

data stocks;
   set sashelp.stocks;
   emphasis = 2;
   if stock eq 'Microsoft' then emphasis=1;
run;

title 'Microsoft Compared to IBM and Intel';
proc sgplot data=stocks (where=(date >= "01jan2003"d));
  series x=date y=close / 
    group=stock grouplc=emphasis;
run;
title;
hellind
Quartz | Level 8

Yes, this same error shows up in a new session.

ballardw
Super User

@hellind wrote:

Yes, this same error shows up in a new session.


I note that you have not answered what ODS Style is in effect.

hellind
Quartz | Level 8
Not sure how to check.

I think it is the default HTML Blue
FrankPoppe
Quartz | Level 8

I had this warning also (already 2 or 3 years back).

This warning pops up when you use the ODS Style HTMLBlue (the default), with UTF-8 as encoding.

 

Someone from Tech Support (the Netherlands) I consulted about it gave the following solution.

( I do not think it ever became a formal track - apparently the bug still exists).

The following code will prevent it.

 

proc fontreg mode=all msglevel=verbose;
fontfile 'C:\Windows\Fonts\arial.ttf';
fontfile 'C:\Windows\Fonts\arialbd.ttf';
fontfile 'C:\Windows\Fonts\arialbi.ttf';
fontfile 'C:\Windows\Fonts\ariali.ttf';
fontfile 'C:\Windows\Fonts\arialuni.ttf';
run;

I have not investigated how to make this permanent, so that you do not longer have to insert this in your code.

ballardw
Super User

You might try adding the USESASHELP option on Proc Fontreg to update the registry in SASHELP if you have write access to that library (likely not in server environment in which case an Admin should run this with appropriate privileges).

 


@FrankPoppe wrote:

I had this warning also (already 2 or 3 years back).

This warning pops up when you use the ODS Style HTMLBlue (the default), with UTF-8 as encoding.

 

Someone from Tech Support (the Netherlands) I consulted about it gave the following solution.

( I do not think it ever became a formal track - apparently the bug still exists).

The following code will prevent it.

 

proc fontreg mode=all msglevel=verbose;
fontfile 'C:\Windows\Fonts\arial.ttf';
fontfile 'C:\Windows\Fonts\arialbd.ttf';
fontfile 'C:\Windows\Fonts\arialbi.ttf';
fontfile 'C:\Windows\Fonts\ariali.ttf';
fontfile 'C:\Windows\Fonts\arialuni.ttf';
run;

I have not investigated how to make this permanent, so that you do not longer have to insert this in your code.


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

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
  • 9 replies
  • 1195 views
  • 0 likes
  • 5 in conversation