Dictionary/3000 Reference Manual (32244-90001)

Chapter 7 265
The Dictionary DICTCDE Utility
Examples of Generated Code
Compound Element Definitions
DICTCDE generates an array declaration for an element if its sub-element count is
defined in the Dictionary as greater than one. Since arrays cannot appear at the 01-level in
COBOL, DICTCDE will generate an array as an 05-level identifier, with a FILLER as an
01-level identifier.
For example, if an element is defined in the Dictionary as:
ELEMENT = PRICE
ELEMENT-TYPE = I
ELEMENT-SIZE = 2
ELEMENT-LENGTH = 2
ELEMENT-COUNT = 10
the following code will be generated:
000100
000200 01 FILLER.
000300 05 PRICE PIC S9(2) COMP OCCURS 10.
If the element is defined in the Dictionary as:
ELEMENT = ACCOUNT
ELEMENT-TYPE = P
ELEMENT-SIZE = 10
ELEMENT-DECIMAL = 1
ELEMENT-LENGTH = 6
ELEMENT-COUNT = 4
the following code will be generated:
000100
000200 01 FILLER.
000300 05 ACCOUNT PIC S9(8)V9(1) COMP-3 OCCURS 4.
Back-Referenced Elements
DICTCDE generates a COBOL table for an element if its element type is defined in the
Dictionary as “*”. (This element back references another element.) The element reference
becomes the name of the sublevel of the table. For example, if the entity is defined in the
Dictionary as:
ELEMENT = ACCOUNT
ELEMENT-TYPE = *
ELEMENT-REFERENCE = ACCOUNT-MASTER
ELEMENT-COUNT = 10
and the back-referenced element ACCOUNT-MASTER is defined in the Dictionary as:
ELEMENT = ACCOUNT-MASTER