Dictionary/3000 Reference Manual (32244-90001)

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