Report: Data Dictionary
The *.dict.rpt files under rpt/ are concise, human-readable data dictionary reports for a connected OpenEdge database, produced by util/dictrpt.p.
One file is written per database, named <shortname-or-ldbname>.dict.rpt and placed in $RPTDIR (or the current directory if RPTDIR is unset). The output is fixed-width text formatted at 132 columns wide and 80 lines per page, suitable for printing or diff-ing across schema versions.
util/dictrpt.p is quite likely the oldest piece of code in ProTop —
its header comment dates the original to December 9, 1988 — and it
has been carried forward, largely intact, ever since.
The report walks every user table (_file._file-num between 1 and 9999, which excludes Progress’s internal metaschema tables) in alphabetical order by table name, and contains four distinct sections.
1. Table / field listing (the bulk of the report)
A repeating page-headed block with columns:
Table Indexes Field Order Type Extent Format
For each table, the table name is printed once on the first row, then each
field of that table is listed in _field._order sequence. The fields shown
are:
-
Indexes — an 8-character flag string showing which of the table’s
indexes (up to 8) the field participates in. Each character position
represents one index in the order they’re stored:U— unique index, and this is the table’s primary index
(_file._prime-index)u— unique index, non-primary+— non-unique index that is the primary index*— non-unique, non-primary index- blank — field is not in that index
This compact notation lets you see at a glance which fields are indexed and how.
-
Field — the field name (
_field._field-name) -
Order — the field’s display/storage order number (
_field._order) -
Type — the ABL data type (
_field._data-type):integer,int64,character,decimal,date,datetime-tz,recid,blob/clob, etc. -
Extent — array dimension (0 for scalars)
-
Format — the display format string (
_field._format), e.g.x(30),>>>>9,->,>>>,>>9.99
A blank line separates tables, and the page header is reprinted on every new
page.
2. Sequences
After a page break, every row of _sequence is listed: sequence name, sequence number, initial value, increment, minimum, maximum, and the cycle-OK flag. This captures all DB-defined sequences in one place.
3. RECID fields
A scan of every table for fields whose data type is recid. Each hit shows
table name, field name, and type. RECID-typed fields are typically legacy
references (RECIDs are not portable across dump/load) so this section is useful for migration audits.
4. LOB fields
A scan for fields whose data type matches *lob* (blob/clob). For each one,
the report joins to _storageobject (object-type 3) and _area to display the table, field, type, and the storage area name the LOB lives in. This
matters because LOBs often need their own dedicated areas for performance and backup reasons.
Side effects
When the report finishes writing, dictrpt.p calls lib/uploader.p to ship the file off (presumably to White Star’s collection endpoint as part of a
ProTop run). The commented-out fileviewer.p line suggests it used to
optionally pop the file open for viewing. The program can be run standalone
(mbpro dbname -p util/dictrpt.p) or interactively from inside ProTop via the Ctrl-D command, per the header comment.