Problem Note 2457: Incorrect values for style elements generate misleading error messages
from the REPORT and the TABULATE procedures
When specifying styles to customize output created by ODS HTML, PRINTER (PCL/PDF/PS), or RTF, if an invalid value is specified for a STYLE attribute such as FONT_STYLE or JUST, the following error can result:
ERROR 79-322: Expecting a (.
ERROR 76-322: Syntax error, statement will be ignored.
The error is misleading as there are no missing parentheses. In the
SAS Log, the element underlined indicating an error is to the right of
the actual incorrect style specification.
In the example code on the Full Code tab, the BOLD value for FONT_STYLE is invalid. The error
should read "ERROR: Expecting ITALIC/ROMAN/SLANT". BOLD is a valid
value for FONT_WEIGHT. C, R, and L are valid values for the JUST= style
element (Center, Right, Left).
A link to a table of valid style attributes and their values in SAS 9.2 is available here.
A link to this same table in the SAS Output Delivery System: User's Guide section of the SAS 9.1.3 Online Documentation can be found here.
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | Base SAS | Microsoft Windows NT Workstation | 8 TS M0 | |
| OpenVMS VAX | 8 TS M0 | |
| Microsoft Windows 2000 Professional | 8 TS M0 | |
| Microsoft Windows 95/98 | 8 TS M0 | |
| Solaris | 8 TS M0 | |
| IRIX | 8 TS M0 | |
| 64-bit Enabled Solaris | 8 TS M0 | |
| ABI+ for Intel Architecture | 8 TS M0 | |
| z/OS | 8 TS M0 | |
| OS/2 | 8 TS M0 | |
| Tru64 UNIX | 8 TS M0 | |
| 64-bit Enabled AIX | 8 TS M0 | |
| OpenVMS Alpha | 8 TS M0 | |
| CMS | 8 TS M0 | |
| 64-bit Enabled HP-UX | 8 TS M0 | |
| HP-UX | 8 TS M0 | |
| AIX | 8 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The following code replicates the problem: "ERROR 79-322: Expecting a (.". The commented code runs without error and produces the desired text in a bold typeface.
data test;
input x $ y $;
datalines;
a b
a b
w b
;
/* also occurs with: ods printer file='file.ps'; */
ods html body='body.html';
PROC TABULATE;
class y x;
table y, x * {s={background=burlywood foreground=darkblue
font_style=bold just=l}};
/* table y, x * {s={background=burlywood foreground=darkblue
font_weight=bold just=l}}; */
run;
PROC REPORT nowd
style(column)=[background=burlywood foreground=darkblue
font_style=bold font_size=5 just=l];
/* PROC REPORT nowd
style(column)=[background=burlywood foreground=darkblue
font_weight=bold font_size=5 just=l]; */
column x y;
define x / display;
define y / display ;
run;
ods html close;
Incorrect values for style elements generate misleading error messages
from the REPORT and the TABULATE procedures.
| Type: | Problem Note |
| Priority: | medium |
| Topic: | SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2008-07-11 09:54:54 |
| Date Created: | 2000-04-18 13:40:28 |