NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
A-56
Display Descriptors for Character Items
Display Descriptors for Character Items
Note that the PIC 9 data type is numeric and should not use the A[w] descriptor. The
following table, Display Descriptors for Numeric Items, describes descriptors you can
use with PIC 9.
Also note that a print position is one byte, so a double-byte character (which occupies
two print positions) requires a descriptor width of at least twice its number of characters.
For example, a double-byte column with ten characters requires an A20 display
descriptor.
Form and Usage Example Value Printed
A[w]
Character field, w print positions wide.
Default for w is width of item. If too
small, left justify and blank fill. If too
large, truncate.
A
A4
A3
“[LJ] A3”
“[RJ] A3”
WORD
WORD
WORD
WORD
WORD
|WORD|
|WORD|
|WOR|
|WOR|
|ORD|
Cn[.w]
Multiline character field, n print positions
wide with w print positions per line. If n
is 0, use width of item; if n is more than
255, you must specify w.
C0.8 Customer has
a low credit
rating.
(VARCHAR
string)
|Customer|
| has a l|
|ow credi|
|t rating|
|. |
To break a value at blanks, use the F
modifier with a Cn descriptor.
“[F] C40.8” A reliable
vendor - fast
delivery
|A |
|reliable|
| vendor |
| — fast |
|delivery|
w is an unsigned integer in the range 1-255
n is an unsigned integer in the range 1-4071
| | indicates the boundaries of the output field
LJ and RJ are modifiers (covered later in this entry) that specify left and right justification