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.
@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.
Will you be using ODS graphics output when this program is productionised? If not adding an "ODS graphics off;' statement will remove the warning.
I still get this error.
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;
Yes, this same error shows up in a new session.
@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.
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.
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.