WIDTH primary command
The WIDTH command sets the display width for one or more columns in TABL display format. You can also specify a display width by specifying a value in the output width field on the column attributes panel in the template editor; use the E prefix command to access the column attributes panel.
Syntax
- fieldref
- A single field reference (for example,
#1
), a range (for example,#2-#5
), or a list of single field references/ranges separated by spaces (for example,#1 #4 #6-#7
). A single field specification is#n
; n is a positive integer and cannot exceed the number of columns in the Db2® object or result table being processed. - fldname
- The name of a column in the Db2® object or result table being processed. The column name can be preceded by a pound sign (#). Any value entered is translated to upper case if the "Translate Db2® object names" system's option is selected.
- nnn
- A positive integer that represents the desired display width for
the fields. If this parameter is omitted, the display width is reset
to the default value. The minimum value of nnn is
6. The maximum value of nnn depends on the data
type:
Table 1. Maximum value of parameter nnn for different data types Data Type Maximum value of nnn DATE, TIME, or BINARY 30 binary floating point 35 TIMESTAMP 42 DECIMAL 45 decimal floating point 52 ZONED TIMESTAMP 165 Other data types If the value of the display length is less than 20, the maximum value of nnn is 30. Otherwise, the maximum value of nnn is the value of the display length plus 10.
Examples
WIDTH #9 30
- Sets the display width for column 9 to 30 bytes.
WIDTH #5-#7 20
- Sets the display width for columns #5 - #7 to 20 bytes.
Availability
- Db2 Browse panel
- Db2 Edit panel
- Db2 View panel
- Any panels displayed with the Object List utility (3.4)