Dictionary/3000 Reference Manual (32244-90001)

278 Chapter7
The Dictionary DICTCDE Utility
COBOL Data Type Mappings
Since this is an undefined COBOL type, DICTCDE will flag this element definition with a
warning message.
Real Number
Suppose the entity is defined in the Dictionary as:
ELEMENT-TYPE = E (or R)
ELEMENT-SIZE = 7
ELEMENT-DECIMAL = 2
ELEMENT-LENGTH = 4
the corresponding COBOL clause will be generated:
PIC X(4)
Since this is an undefined COBOL type, DICTCDE will flag this element definition with a
warning message.
Integer Number and Logical Value
The data types, defined in the Dictionary as I, J, or K are mapped to COBOL
COMPUTATIONAL data types. These data types are defined to take up the required
amount of storage (either 2, 4 or 8 bytes). If the number of digits specified in the Dictionary
for an entity are sufficient to fill the storage length (as defined in the Dictionary) then
DICTCDE will use the number of digits as specified in the Dictionary. However, if the
number of digits are insufficient, COBOL will use the minimum number of digits to fill the
required storage length. Also, if the number of digits is too large for the specified storage
size, DICTCDE will use the maximum number of digits that storage size allows.
For example, the following entities in the Dictionary are generated as follows:
ELEMENT-TYPE = I
ELEMENT-SIZE = 4
ELEMENT-DECIMAL = 0 { PIC S9(4) COMP.
ELEMENT-LENGTH = 2
ELEMENT-TYPE = I
ELEMENT-SIZE = 5
ELEMENT-DECIMAL = 2 { PIC S9(2)V9(2) COMP.
ELEMENT-LENGTH = 2
The decimal point for the above entity requires a digit place.
ELEMENT-TYPE = I
ELEMENT-SIZE = 4
ELEMENT-DECIMAL = 0 { PIC S9(5) COMP.
ELEMENT-LENGTH = 4
(Five digits used to force a 2-word integer.)
ELEMENT-TYPE = I