Dictionary/3000 Reference Manual (32244-90001)

Chapter 7 269
The Dictionary DICTCDE Utility
Examples of Generated Code
Forced REDEFINES
When the storage lengths and byte offsets for two child elements overlap each other within
the parent element, the two child elements cannot be placed adjacently within the parent
element record. DICTCDE generates these elements as a forced REDEFINES to insure
they overlap exactly as defined in the Dictionary. For example, the element NAME has the
child elements F-NAME and M-NAME. The parent element NAME is defined in the
Dictionary as:
ELEMENT = NAME
ELEMENT-TYPE = X
ELEMENT-SIZE = 44
ELEMENT-LENGTH = 44
The child elements are defined in the Dictionary as:
CHILD-ELEMENTS = F-NAME M-NAME
ELEMENT-TYPE = X X
ELEMENT-SIZE = 28 12
ELEMENT-LENGTH = 28 12
ELEMENT-BYTE POSITION = 1 12
The code for the element NAME would be generated as follows:
000100
000200 01 NAME.
000300 05 F-NAME PIC X(28).
000400 05 FILLER PIC X(16).
000500 01 FILLER REDEFINES NAME.
000600 05 FILLER PIC X(11).
000700 05 M-NAME PIC X(12).
000800 05 FILLER PIC X(21).