_ddedit.utl Utility - Data Dictionary Editor

Syntax

run "_ddedit.utl"

Overview

The _ddedit.utl utility is an interactive Data Dictionary Editor in the help system. It guides you through a series of forms to enter complete definitions of the files in your database and eliminates the detailed, error-prone coding involved with creating and maintaining the data dictionary by calling the utilities directly.

The data dictionary is actually created and maintained by several utility programs provided in the EUS Toolkit. Once you have entered your database definition, the DD Editor utility (_ddedit.utl) performs all the utility calls needed to create or modify the data dictionary definition files.

Configuration

To use the data dictionary, define the global string (DICTIONARY) with the path to the directory where the data dictionary files will reside. Note that if the (DICTIONARY) global does not exist, it first checks for a BBDICT global set in your environment. If it does not exist, it looks for a BBDICT directory in the current directory. If it does not exist it prompts for the location and offers to create it. Once created it, sets the global (DICTIONARY) in the global table but does not modify the configuration file. The entry must be made before using the Data Dictionary Editor the next time. It is also recommended that one or more of the global strings be set to point to the directories where the data files reside. The names of these global strings are unimportant as long as they are used consistently. See Getting Started for additional information on configuration for the EUS Toolkit. The following are sample entries in a configuration file:

DICTIONARY=/basis/pro5/bbdict/
DATA=/basis/data/

It is possible to define a global string and then use that value in the definition of other global strings. This technique can set up separate data dictionaries for different application projects, as follows:

PROJECT=/basis/applet_name
DICTIONARY=(PROJECT)bbdict/
DATA=(PROJECT)data/

It is important to create all the directories in the path part of the dictionary name before using the DD Editor to create the data dictionary. The DD Editor will create the (DICTIONARY) directory but not any higher-level directories.

When creating or maintaining the data dictionary, the DD Editor calls the _acu.utl and _lkeymap.utl programs to initialize the PRO/5 environment. The DD Editor also saves the existing keymap upon entry and restores it on completion.

File Creation and Editing Cycle

All data dictionary file definitions begin with assigning an alias to a file. The DD Editor will enter default values for the balance of the basic file definition.

Once the first alias is assigned, you are free to navigate through the DD Editor at will. You can define files, fields and indices, and edit the definitions - in any sequence you choose. There is, however, a natural sequence.

Normally, one file is defined at a time, completing the file definition first, the field definitions, and then the index definitions. The typical cycle used to create a file and edit the file definition parameters in the data dictionary is outlined below. Options labeled -a, -b, etc., are either/or choices.

 

Data Dictionary Operation

Menu Option

1.

Name the file alias you want to work with.

FileMaint, Load

2.

Define global file/record parameters

FileMaint, Edit

3-a.

Define the fields within this record.

Field, Edit, Add

3-b.

Import field information from a template file.

Field, Load

3-c.

Guess field structure information from an existing data file.

Field, Guess

4-a.

Define the index (key) structure for this file.

Index, Edit, Add

4-b.

Import index information based on an existing file.

Index, Load

5-a.

Create the data file, if it does not yet exist.

FileMaint, Make, Data File

5-b.

Create a template.

FileMaint, Make, Template

See Also

Alphabetical EUS Utilities

Functional Listing of EUS Utilities