Dictionary/3000 Reference Manual (32244-90001)

266 Chapter7
The Dictionary DICTCDE Utility
Examples of Generated Code
ELEMENT-TYPE = X
ELEMENT-SIZE = 14
ELEMENT-LENGTH = 14
ELEMENT-COUNT = 1
the following code is generated:
000100
000200 01 FILLER.
000300 05 ACCOUNT OCCURS 10.
000400 10 ACCOUNT-MASTER PIC X(14).
If both the element and the element reference have COUNTS greater than one, a
multi-dimensional table is generated. For example, an element is defined in the Dictionary
as:
ELEMENT = ACCOUNT
ELEMENT-TYPE = *
ELEMENT-REFERENCE = ACCOUNT-MASTER
ELEMENT-COUNT = 10
The back-referenced element ACCOUNT-MASTER is defined in the Dictionary as:
ELEMENT = ACCOUNT-MASTER
ELEMENT-TYPE = X
ELEMENT-SIZE = 14
ELEMENT-LENGTH = 14
ELEMENT-COUNT = 3
The code for ACCOUNT would be generated as follows:
000100
000200 01 FILLER.
000300 05 ACCOUNT OCCURS 10.
000400 10 ACCOUNT-MASTER PIC X(14) OCCURS 3.
The next example shows how DICTCDE generates code for an element that
back-references an element that has child elements related to it. If an element is defined in
the Dictionary as:
ELEMENT = ACCOUNT
ELEMENT-TYPE = *
ELEMENT-REFERENCE = ACCOUNT-MASTER
ELEMENT-COUNT = 10
and the back-referenced element ACCOUNT-MASTER has the elements NAME,
ADDRESS and COST related to it, then these elements are defined in the Dictionary as:
PARENT-ELEMENT = ACCOUNT-MASTER
ELEMENT-TYPE = X