HP System Dictionary/XL COBOL Definition Extractor (32257-90001)

C- 102
Generating the Edit Mask from Attributes
The generation of the PICTURE clause for each data element depends on whether or not you request the
use of the edit-mask. If you do not request that the edit-mask be used, Table C-1 shows how SDCDE
generates the PICTURE clause.
In Table C-1, "d" designates the display-length attribute value, "b" the byte-length attribute value, and "e"
the decimal attribute value.
Table 3:
System Dictionary
Element Type
COBOL PICTURE Clause
X , U X(d)
9 , 9+ 9(d)
Z+ If e > 0, then 9(b - e)V9(e)
If e = 0, then 9(b)
If e < 0, SDCDE issues a warning and generates the PICTURE clause as if e = 0
Z with sign separate If e > 0, then
S9(b-e-1)V9(e) SIGN LEADING SEPARATE or
S9(b-e-1)V9(e) SIGN TRAILING SEPARATE
If e = 0, then
S9(b-1) SIGN LEADING SEPARATE or
S9(b-1) SIGN TRAILING SEPARATE
If e < 0, SDCDE issues a warning and generates the PICTURE clause as if e = 0
Z with sign over-
punch
If e > 0, then
S9(b-e)V9(e) SIGN LEADING or SIGN TRAILING
If e = 0, then
S9(b) SIGN LEADING or SIGN TRAILING
If e < 0, SDCDE issues a warning and generates the PICTURE clause as if e = 0
P If e = 0, then S9(n) COMP-3, where
n = 2b-1, if d >= 2b-1
n = 2b-2, if d <= 2b-2
If e > 0, then S9(n)V9(e) COMP-3, where
n = 2b-e-1, if d >= 2b
n = 2b-e-2, if d <= 2b-1
If e < 0, SDCDE issues a warning and generates the PICTURE clause as if e = 0
P+ If e = 0, then 9(n) COMP-3, where
n = 2b-1, if d >= 2b-1
n = 2b-2, if d <= 2b-2
If e > 0, then 9(n)V9(e) COMP-3, where
n = 2b-e-1, if d >= 2b
n = 2b-e-2, if d <= 2b-1
If e < 0, SDCDE issues a warning and generates the PICTURE clause as if e = 0