Dictionary/3000 Reference Manual (32244-90001)

Chapter 3 33
Using the DICTDBM Commands
Using Commands to Define Other File Structures
Creating MPE, MPER, KSAM, and VPLUS Elements and Files
Creating files and data elements for these structures is similar to creating them for a
database. An element or a file must be defined in your Dictionary before you can associate
or relate it to another entry. To define the entries, use the command string CREATE
ELEMENT or CREATE FILE. The name used for the element or the file must be unique.
Use the REPEAT option before the command string to create entries for many elements or
files without having to reenter the command. A definition for the VPLUS forms file must
be created before the hierarchical relationship between the forms file and the forms can be
created.
After the entries are created, use the LIST or DISPLAY commands to display the entry.
Entries can be deleted by using the PURGE command, and can be changed by using the
MODIFY or RENAME command. To define the CHILD elements (fields) within a PARENT
data element, use the RELATE ELEMENT command string.
Adding Data Elements to Files
The ADD command is used to associate data elements to files. Use the command string
ADD FILE to define this association.
Elements may not be directly associated to the VPLUS forms file. DICTDBM will not
accept this and will issue an error message. The elements must be associated with the file
according to the record layout or form design. When elements are associated with a KSAM
file, you must identify which element or elements are the keys for the file.
To display an alphabetized listing of association entries, use the REPORT command. For a
form, the list shows the elements associated with the form; for a VPLUS forms file, the list
shows all the elements associated with the CHILD files. The SHOW command is used to
display each file and the elements associated with it. It also gives a complete listing of the
forms in a VPLUS file and optionally, the elements within each form. The forms are
displayed in the physical order of their relationship to the VPLUS forms file, and the
elements are in the physical order of their association with the form. For KSAM files, the
SHOW command indicates key elements with an asterisk, “*” .
An association entry can be deleted with the DELETE command or changed with the
UPDATE command. If you want to change the physical order in which the association
entries were made, use the RESEQUENCE command.
Relating Forms to a VPLUS Forms File
The hierarchical relationship between the forms and a VPLUS forms file is established
using the RELATE command. The command string RELATE FILE is used to define this
relationship. This command allows more than one form to be related to the VPLUS file
during the command cycle. Use the SHOW command or the REPORT command to display
the relationship entries.
The relationship entry is deleted by using the REMOVE command and is changed by using
the CHANGE command. Use the REORDER command to change the physical order in
which the CHILD files are related to the PARENT file.