Dictionary/3000 Reference Manual (32244-90001)

Chapter 6 209
The Dictionary DICTPDE Utility
>GENERATE ELEMENTS
ELEMENT = account
ELEMENT-TYPE = I
ELEMENT-LENGTH = 4
The code is generated as follows:
> generate element Or G E could have been entered.
ELEMENT NAME(S)> account
The generated code is echoed to
TYPE the terminal.
ACCOUNT = INTEGER;
The next example shows the code generated for elements that have ELEMENT-COUNTS
in the Dictionary that are greater than 1. The two elements have no child entities related
to them. The elements are defined in the Dictionary as follows:
ELEMENT = PART1 PART2
ELEMENT-TYPE = I P
ELEMENT-LENGTH = 2 10
ELEMENT-COUNT = 10 4
The code is generated as follows:
> generate element
ELEMENT NAME(S)> part1 part2
TYPE
PART1 = ARRAY[1..10] OF -32768..32767;
PART2 = ARRAY[1..4] OF ARRAY[1..10] OF 0..255;
Note that ELEMENT-COUNT is used to determine the index of the array.
ELEMENT-TYPE and ELEMENT-LENGTH are used in determining the base type of the
array.
The third example shows the code generated for an element whose type is defined as an
asterisk “*” in the Dictionary. (This element back-references another element.) The
element is defined in the Dictionary as follows:
ELEMENT = CUSTNUM
ELEMENT-TYPE = *
ELEMENT-REFERENCE = CUSTNAME
CUSTNAME is defined in the Dictionary as:
ELEMENT = CUSTNAME
ELEMENT-TYPE = X
ELEMENT-LENGTH = 14
The TYPE declaration for the element CUSTNUM is generated as follows:
>generate element
ELEMENT(S)> custnum