SQL/MX Report Writer Guide

Customizing a Report
HP NonStop SQL/MX Report Writer Guide527194-002
4-40
Truncated Values
To specify the width of the field, include an AS clause in the print item:
CONCAT (FIRST_NAME STRIP, SPACE 1, LAST_NAME) AS A25
Truncated Values
The VARCHAR_WIDTH style option specifies the maximum number of characters that
can appear in a print item with a value of a variable-length character data type. The
excess characters are truncated. The default is 80 single-byte characters. You can set
a value up to 255 single-byte (or 177 double-byte) characters. For example:
>> SET STYLE VARCHAR_WIDTH 120;
Values of fixed-length character data types are truncated if they do not fit in the display
format you specify.
By default, numeric values are not truncated. If a numeric print item is too large for its
display format, it is filled with overflow characters.
The overflow character is determined by the setting of the OVERFLOW_CHAR style
option.
You can truncate the decimal part of a fixed-point number by specifying the number of
significant digits to the right of the decimal point.
For example, F10.2 truncates any digits beyond the first two following the decimal
point.
Filler Characters
The report writer uses these types of filler characters:
If a numeric value is too large for the specified display format, the report writer fills
the field with the default overflow character, which is an asterisk (*).
You can change the overflow character in two ways:
°
Set another single character; for example, a pound sign:
>> SET STYLE OVERFLOW_CHAR '#';
°
Include the OC modifier in the display format for a particular print item. For
example, the following AS clause specifies that the item is to be filled with plus
signs when overflow occurs:
AS '[OC''+''] F8.2'
The FL modifier of display formats specifies a character to be used to fill a field
when:
Note. If you are defining a report that contains double-byte characters, see Printing Double-
Byte Characters on page 4-58 for special considerations regarding truncating values.