SQL/MX Report Writer Guide
Customizing a Report
HP NonStop SQL/MX Report Writer Guide—527194-002
4-33
Display Format Specifications
•
The essential part of a display format is the display-descriptor. A display
descriptor controls the width of a field and, for numeric values, the scale of the
value.
The display descriptors for character values are:
°
A[ w] specifies alphanumeric display of width w. For example, A20 displays
characters in a field that is 20 single-byte print positions wide. Values are left
justified in this format.
The display descriptors for numeric values are:
°
F w. d[. m] specifies fixed-point display of width w. You can specify the
number of significant digits to the right of the decimal point with d. You can
specify the number of digits to the left of the decimal point with m. For example,
F10.2.6 specifies that all values are displayed with 2 digits following the
decimal point and 6 digits preceding it. The field width is 10.
°
I w[. m] specifies integer display of width w. You can specify the number of
required digits with m, which might result in leading zeros. For example, I6.4
specifies that all values are displayed as integers with a field width of 6 and 4
required digits.
°
M mask specifies a template, enclosed in angle brackets, apostrophes, or
quotes, for displaying data. You can insert characters and specify whether
digits are to be included in the value. Masks are useful for monetary values,
dates, and suppression of leading and trailing zeros. For example, M<9,999>
inserts a comma in the thousandths place.
Values are right justified in F and I descriptor and date-time formats.
•
You can include a scale-sign-descriptor to specify a scale factor for
numeric values.
•
You can specify decorations. These character strings are inserted at a specified
location in the value, depending upon whether the value is negative, positive, zero,
or too large for the field. You can specify multiple conditions. For more information
on examples of using decorations, see Monetary Values on page 4-35.
•
You can specify modifiers to control justification, insert filler characters, and
specify an overflow character for the print item. A modifier applies to a single
print item and overrides report defaults. For example, you can specify a special
overflow character for one print item and use the default OVERFLOW_CHAR
value for other print items.
Note. If you are defining a report that contains double-bye characters, see Printing
Double-Byte Characters on page 4-58 for special considerations for using display
descriptors.