Dictionary/3000 Reference Manual (32244-90001)

208 Chapter6
The Dictionary DICTPDE Utility
>GENERATE ELEMENTS
>GENERATE ELEMENTS
Generates PASCAL data declarations for element definitions in the Dictionary.
Prompts
The following prompt is issued when the command-subcommand GENERATE ELEMENT
is entered:
ELEMENT(S)>
ELEMENT(S)> Enter the name(s) of the elements to be extracted from the Dictionary
and for which the data declaration(s) will be generated. More than one
element name can be entered in one command line as long as each element
is separated by a comma (,) or a space. Also, the element names can not
exceed the first 72 characters of the command line. DICTPDE will
continue to prompt for element names until [[RETURN]] is pressed in
response to this prompt.
If a parent element is entered in response to this prompt, DICTPDE will
generate data declarations for the parent element as well as for the related
child elements. The parent element will be generated as a record. The
primary name of the parent element will be the record name. The child
elements will be generated as fields within the record. The aliases of the
child elements will be the field names (unless a child element does not
have an alias; then its primary name will be the field name).
A data declaration can be generated for a specified element only once to an
output file. However, many data declarations can be generated for a
specified element if each declaration generated for that element is written
to a different output file.
Pressing [[RETURN]] in response to this prompt indicates that no more
element names are to be entered. DICTPDE will then stop prompting for
element(s) and begin the code generation process. The generated code is
echoed to the terminal as it is written to the output file.
Discussion
GENERATE ELEMENT allows you to identify the element(s) to be used for code
generation.
Example
The following examples show how the GENERATE ELEMENT command-subcommand is
used and the code that it generates.
The first example shows the data declaration generated for a simple element. The element
“account” does not have any child elements related to it.
The element “account” is defined in the Dictionary as follows: