DISPSIGN
The DISPSIGN
option controls output formatting
for DISPLAY
of signed numeric items.
Default is: DISPSIGN(COMPAT)
Abbreviations
are: DS(C | S)
- DISPSIGN(COMPAT)
- If you specify
DISPSIGN(COMPAT)
, formatting for displayed values of signed numeric items is compatible with prior versions of Enterprise COBOL. Overpunch signs are generated in some cases.
- DISPSIGN(SEP)
- If you specify
DISPSIGN(SEP)
, the displayed values for signed binary, signed packed-decimal, or overpunch signed zoned-decimal items are always formatted with a leading separate sign.
The following example shows the
DISPLAY
output
with the DISPSIGN(COMPAT)
option or the DISPSIGN(SEP)
option
specified:
Data items | DISPLAY output with the DISPSIGN(COMPAT) option
specified |
DISPLAY output with the DISPSIGN(SEP) option
specified |
---|---|---|
Unsigned binary | 111 | 111 |
Positive binary | 111 | +111 |
Negative binary | 11J | -111 |
Unsigned packed-decimal | 222 | 222 |
Positive packed-decimal | 222 | +222 |
Negative packed-decimal | 22K | -222 |
Zoned-decimal unsigned | 333 | 333 |
Zoned-decimal trailing positive | 33C | +333 |
Zoned-decimal trailing negative | 33L | -333 |
Zoned-decimal leading positive | C33 | +333 |
Zoned-decimal leading negative | L33 | -333 |