IBM SC41-5210-04 Server User Manual


 
Note: For all these edit codes, decimal points are always shown, and leading zeros are always
suppressed.
Query uses the J edit code as the default edit code whenever an error occurs during numeric field editing
or whenever there are no other editing values to use. If an error occurs, an error message is shown along
with the edited result produced using the J code.
For a field that does not have an edit code specified in its definition, edit code J is shown as the default
the first time you see this display for that field.
The other edit codes and edit descriptions are:
v Edit code W suppresses the three leftmost zeros of a date field that is six to eight digits long, and it
suppresses the leftmost zero of a date field that is five digits long. It also inserts slashes (/) between the
year, month, and day. The positions of the slashes depend on the number of digits in the field: nn/nnn,
nnnn/nn, nnnn/nnn, and nnnn/nn/nn.
v Edit code X shows the values in their unedited form. For example, a value of −12 is shown as 1K.You
can think of the unedited form as the character presentation of the hexadecimal string that makes up
the zoned decimal representation for the numeric value. Table 4 shows the unedited presentation form
and internal representation of numbers in zoned, packed, and binary format.
Table 4. Edit Code X Examples
Format Length/ Dec. Places Actual Value
Unedited
Presentation
Internal
Representation (How
Stored)
Zoned 7 549134 0549134 XF0F5F4F9F1F3F4
Packed 7 549134 0549134 X0549134F
Binary 7 549134 0549134 X008610E
Zoned 5/2 -319.34 3194N XF3F1F9F4D5
Packed 5/2 -319.34 3194N X31945D
Binary 5/2 -319.34 3194N X000F8337
v Edit code Y suppresses the farthest left zero of a date field that is three to six digits long or eight digits
long, and it suppresses the two farthest left zeros of a date field that is seven digits long. It also inserts
slashes (/) between the month, day, and year. The positions of the slashes depend on the number of
digits in the field: nn/n, nn/nn, nn/nn/n, nn/nn/nn, and nnn/nn/nn, and nn/nn/nnnn.
v Edit code Z removes any plus or minus sign from a numeric field and suppresses leading zeros.
v Edit descriptions 5 through 9 are user-defined edit codes. They can be defined to use other
characters or combinations of characters to edit a numeric field.
The negative sign is on the left of the value for edit codes N through Q, and on the right of the value for
other edit codes and edit descriptions.
You must either specify an edit code here or press F12 to return to the Define Numeric Field Editing
display. (You can then specify, for example, option 4 in Edit option and then define your own edit words on
the Specify Edit Word display.)
v The only currency symbol that can be used with any of these edit codes is the one defined in the
system-supplied system value QCURSYM.
v If date/time edit code Y is specified for a field, the field must be three to eight digits long.
v If the definition of an edit code is changed (done outside of Query), the changes are reflected in all
query reports that use that edit code.
130 Query for iSeries Use V5R2