Dictionary/3000 Reference Manual (32244-90001)

280 Chapter7
The Dictionary DICTCDE Utility
COBOL Data Type Mappings
VPLUS Data Items
VPLUS forms only contain ASCII characters as storage format. Therefore, regardless of
the data types defined in the Dictionary, all VPLUS fields are DISPLAY fields. You may
choose to convert all VPLUS fields to PIC X (regardless of the data type defined in the
Dictionary). You may also choose to define numeric fields as PIC 9. But you must ensure
that non-numeric data (except for a sign) will not appear in those fields. The sign for
signed numeric elements must appear in the first character position unless the element
was defined in the Dictionary as having a TRAILING-SEPARATE sign. The trailing
separate sign must appear in the last character position.
The following shows the COBOL clauses generated for some VPLUS fields.
ELEMENT-TYPE = X
ELEMENT-SIZE = 8 { PIC X(8).
ELEMENT-LENGTH = 9
Note that the VPLUS field is generated by SIZE not by LENGTH. Also, the next examples
assume that the PIC 9 numeric option was enabled.
ELEMENT-TYPE = I+
ELEMENT-SIZE = 8
ELEMENT-DECIMAL = 0 { PIC 9(8).
ELEMENT-LENGTH = 4
ELEMENT-TYPE = I
ELEMENT-SIZE = 8
ELEMENT-DECIMAL = 0 { PIC S9(8) SIGN LEADING SEPARATE.
ELEMENT-LENGTH = 4
Note that the sign field generated the SIGN LEADING SEPARATE clause.
ELEMENT-TYPE = I
ELEMENT-SIZE = 8
ELEMENT-DECIMAL = 2 { PIC S9(5)V9(2) SIGN LEADING SEPARATE.
ELEMENT-LENGTH = 4