HP 3000 Manuals

HP Dictionary/3000 [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

HP Dictionary/3000 

Setting up HP Dictionary/3000 

See the HP Dictionary/3000 manual for a full explanation of HP
Dictionary/3000.

Use the following programs to set up HP Dictionary/3000:

DICTINIT              For each dictionary you want, run this program to
                      create an empty dictionary.

DICTDBD               This program loads the data dictionary with the
                      item and dataset definitions of an IMAGE database.
                      It defines every item, but does not know about
                      decimal places or date and time items.  These must
                      be completed using DICTDBM.

DICTDBM               Since DICTDBD loads only an extract from the
                      database's root file, you must also run DICTDBM to
                      specify the number of decimal places for numeric
                      elements and add date and time item formats.  That
                      is, use DICTDBM to refine and complete the
                      dictionary definitions, if needed.

Terminology 

The terminology in HP Dictionary/3000 and HP ALLBASE/BRW is not always
the same.  The table below shows the difference in terminology in these
two products:

------------------------------------------------------------------------------------------
|                                                                                        |
|      HP ALLBASE/BRW                            HP Dictionary/3000                      |
|                                                                                        |
------------------------------------------------------------------------------------------
|                                                                                        |
| Item                      Element                                                      |
|                                                                                        |
| Format                    File/Element relation                                        |
|                                                                                        |
| File                      MPEF, MPER, KSAM file types                                  |
|                                                                                        |
| Dataset                   DETL, AUTO, MAST file types                                  |
|                                                                                        |
| Database                  Parent database BASE file type                               |
|                                                                                        |
| Location                  File/Location relation                                       |
|                                                                                        |
------------------------------------------------------------------------------------------

In this section the terminology used is that of HP Dictionary/3000.  For
example, the term element is used instead of item.  (However, date and
time items are HP ALLBASE/BRW constructions only, so they are described
as date and time items, rather than date and time elements.)

Elements/Items 

For the element (item) name, follow these rules:

   *   Use a maximum of 20 characters for the element name, unless the
       report is to run with BRW/V, in which case you can use a maximum
       of only 16.

   *   Use a letter as the first character of the element name.

   *   Do not include spaces, dots, commas and parentheses in the element
       name.

   *   For existing elements whose names conflict with the above rules,
       define alias names.  If an element has an alias name, that name is
       used by HP ALLBASE/BRW.

HP ALLBASE/BRW supports the following element data types:

-------------------------------------------------------------------------------------------
|                                                                                         |
| Strings                        Maximum length of 255 characters                         |
|                                                                                         |
| Numeric elements               Maximum of 13 integer digits and 6 decimal places        |
|                                                                                         |
| Packed numeric elements        Maximum of 13 integer digits and 6 decimal places, with  |
|                                Trailing Overpunch or No Sign                            |
|                                                                                         |
| Zoned numeric elements         Maximum of 13 integer digits and 6 decimal places, with  |
|                                Trailing Overpunch or No Sign                            |
|                                                                                         |
| 16-Bit integers                                                                         |
|                                                                                         |
| 32-Bit integers                                                                         |
|                                                                                         |
| 64-Bit integers                (type N in HP ALLBASE/BRW)                               |
|                                                                                         |
| Integers with decimals         (type N in HP ALLBASE/BRW)                               |
|                                                                                         |
| 32-Bit and 64-Bit Real numbers Real numbers can be either HP 3000 or IEEE format.  You  |
|                                can (optionally) tell HP ALLBASE/BRW which format a Real |
|                                number element is stored in by adding the long-name      |
|                                !REAL-HP 3000 or !REAL-IEEE to that element.             |
|                                                                                         |
|                                If there is no long name, HP ALLBASE/BRW assumes real    |
|                                numbers in IMAGE databases are HP 3000 real numbers, and |
|                                real numbers in MPE and KSAM files are IEEE real         |
|                                numbers.                                                 |
|                                                                                         |
| HP Business BASIC              This type converts to fixed-point numeric in HP          |
| floating-point decimal (D)     ALLBASE/BRW. Note that the range of numeric numbers is + |
|                                or - 9(13).9(6).  If a type D number overflows, it will  |
|                                be set to OVERFLOW; if it underflows it will be set to   |
|                                zero.                                                    |
|                                                                                         |
-------------------------------------------------------------------------------------------

This table illustrates the HP Dictionary/3000 item types, and how they
are handled by HP ALLBASE/BRW. A number suffix equals the number of
words.  For example I2 equals a 2-word (4-byte) integer.

--------------------------------------------------------------------------------------------
|                                                                                          |
|    Dictionary/3000     Decimals         BRW Type                    Remarks              |
|         Type                                                                             |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| I, I2, J, J2, K, K2             0 I (integer)                                            |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| I, I2, J, J2, K, K2           > 0 N (numeric)                                            |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| I4, J4, K4                        N (numeric)                                            |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| P, Z, 9, Z+, D, P+                N (numeric)           Maximum 13 integer digits and 6  |
|                                                         decimals                         |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| Z (sign ' ' or sign =             N (numeric)           Trailing Overpunch assumed       |
| 'TO')                                                                                    |
|                                                                                          |
| Z (sign = 'TS' 'LS'               Not supported         Not supported                    |
| or 'LO'                                                                                  |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| R2, R4, E2, Er                    R (real)                                               |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| U, X                              S (string)            Maximum length 255 bytes         |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| X, 9, I, J, K                     D (date)              Long-name begins !DATE           |
|                                                                                          |
| X, 9, I, J, K                     T (time)              Long-name begins !TIME           |
|                                                                                          |
--------------------------------------------------------------------------------------------
|                                                                                          |
| B, S, *                           Not supported         Not supported                    |
|                                                                                          |
--------------------------------------------------------------------------------------------

HP ALLBASE/BRW supports both parent and child elements.  You can use
either the child elements alone, or the child elements and the parent
element.  If several parent elements have the same child element, HP
ALLBASE/BRW treats all occurrences of that child element in a dataset or
file as synonyms, that is, as the same element.  Only the parent and
child items are taken, not any intermediate child items.

String elements or numbers to be used as date or time items in HP
ALLBASE/BRW are defined by specifying the date or time type in the long
name of the element. 

          Dictionary/3000 DATE-ITEM Table (DISPLAY and INTEGER Format) 

-------------------------------------------------------------------------------------------
|                                                                                         |
|    Dictionary/3000       Length Required          Base Type             Example:        |
|       Long Name         (1 wd = 16 bits)                           (Date is 04/28/92)   |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !DATE-DMY-D           8 Bytes                         X           28/04/92              |
|                                                                                         |
| !DATE-DMYY-D          10 Bytes                        X           28/04/1992            |
|                                                                                         |
| !DATE-MDY-D           8 Bytes                         X           04/28/92              |
|                                                                                         |
| !DATE-MDYY-D          10 Bytes                        X           04/28/1992            |
|                                                                                         |
| !DATE-YMD-D           8 Bytes                         X           92/04/28              |
|                                                                                         |
| !DATE-YYMD-D          10 Bytes                        X           1992/04/28            |
|                                                                                         |

| !DATE-DDY-D           6 Bytes                         X           118/92                |
|                                                                                         |
| !DATE-DDYY-D          8 Bytes                         X           118/1992              |
|                                                                                         |
| !DATE-YDD-D           6 Bytes                         X           92/118                |
|                                                                                         |
| !DATE-YYDD-D          8 Bytes                         X           1992/118              |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !DATE-DM-D            5 Bytes                         X           28/04                 |
|                                                                                         |
| !DATE-MD-D            5 Bytes                         X           04/28                 |
|                                                                                         |
| !DATE-MY-D            5 Bytes                         X           04/92                 |
|                                                                                         |
| !DATE-MYY-D           7 Bytes                         X           04/1992               |
|                                                                                         |
| !DATE-YM-D            5 Bytes                         X           92/04                 |
|                                                                                         |
| !DATE-YYM-D           7 Bytes                         X           1992/04               |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !DATE-DMY             3 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-DMYY            3 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-MDY             3 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-MDYY            3 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-YMD             3 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-YYMD            3 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-DDY             2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-DDYY            2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-YDD             2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-YYDD            2 Words                    I, J, or K                             |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !DATE-DM              2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-MD              2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-DD              1 Word                     I, J, or K                             |
|                                                                                         |
| !DATE-MY              2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-MYY             2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-YM              2 Words                    I, J, or K                             |
|                                                                                         |
| !DATE-YYM             2 Words                    I, J, or K                             |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !DATE-CALENDAR        2 Bytes                    I, J, or K                             |
|                                                                                         |

| !DATE-JULIAN          4 Bytes                    I, J, or K                             |
|                                                                                         |
-------------------------------------------------------------------------------------------

          Dictionary/3000 DATE-ITEM Table (NUMERIC and ALPHANUMERIC Format) 

-------------------------------------------------------------------------------------------
|                                                                                         |
|    Dictionary/3000       Length Required          Base Type             Example:        |
|       Long Name         (1 wd = 16 bits)                           (Date is 04/28/92)   |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !DATE-DMY             6 Bytes                      X or 9         280492                |
|                                                                                         |
| !DATE-DMYY            8 Bytes                      X or 9         28041992              |
|                                                                                         |
| !DATE-MDY             6 Bytes                      X or 9         042892                |
|                                                                                         |
| !DATE-MDYY            8 Bytes                      X or 9         04281992              |
|                                                                                         |
| !DATE-YMD             6 Bytes                      X or 9         920428                |
|                                                                                         |
| !DATE-YYMD            8 Bytes                      X or 9         19920428              |
|                                                                                         |
| !DATE-DDY             5 Bytes                      X or 9         11892                 |
|                                                                                         |
| !DATE-DDYY            7 Bytes                      X or 9         1181992               |
|                                                                                         |
| !DATE-YDD             5 Bytes                      X or 9         92118                 |
|                                                                                         |
| !DATE-YYDD            7 Bytes                      X or 9         1992118               |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !DATE-DM              4 Bytes                      X or 9         2804                  |
|                                                                                         |
| !DATE-MD              4 Bytes                      X or 9         0428                  |
|                                                                                         |
| !DATE-DD              3 Bytes                      X or 9         118                   |
|                                                                                         |
| !DATE-MY              4 Bytes                      X or 9         0492                  |
|                                                                                         |
| !DATE-MYY             6 Bytes                      X or 9         041992                |
|                                                                                         |
| !DATE-YM              4 Bytes                      X or 9         9204                  |
|                                                                                         |
| !DATE-YYM             6 Bytes                      X or 9         199204                |
|                                                                                         |
-------------------------------------------------------------------------------------------

          Dictionary/3000 TIME-ITEM Table (All Formats) 

-------------------------------------------------------------------------------------------
|                                                                                         |
|    Dictionary/3000       Length Required          Base Type             Example:        |
|       Long Name                                                    (Time is 15:43:24)   |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !TIME-HM24            4 Bytes                      X or 9         1543                  |
|                                                                                         |

| !TIME-HMS24           6 Bytes                      X or 9         154324                |
|                                                                                         |
| !TIME-HM12            5 Bytes                         X           0343P                 |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !TIME-HM24-D          5 Bytes                         X           15:43                 |
|                                                                                         |
| !TIME-HMS24-D         8 Bytes                         X           15:43:24              |
|                                                                                         |
| !TIME-HM12-D          6 Bytes                         X           03:43P                |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !TIME-HM24            2 Words                    I, J, or K                             |
|                                                                                         |
| !TIME-HMS24           2 Words                    I, J, or K                             |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| !TIME-CLOCK           4 Bytes                    I, J, or K                             |
|                                                                                         |
-------------------------------------------------------------------------------------------


Notes: * The EXAMPLE column shows how the date and time are held. There is no EXAMPLE for integers because they are held as 16-bit words. * When held as integers, date or time item types have the same Long Names as when held in numeric or alphanumeric form (X or 9). However, the base type must be an integer (I, J, or K). * Where no year is held, (for example, in date item !DATE-DM), the year is assumed to be the current year. HP ALLBASE/BRW adds the current year when the date is accessed. * Where only the last two digits of the year are held (for example, in date item !DATE-DMY), the century is assumed to be 1900. This is also the case for item !DATE-CALENDAR. * Where no day is held (for example, in date item !DATE-MY), the day is assumed to be the first of the month. * Where the day is held as DD (for example, in date item !DATE-DDY), the date is held as the number of days from the start of the year (January 1st). The example date is 04/28/87, that is the 118th day of 1987. * You must define every item whose length is expressed in WORDS as an array of 2-byte integers. For example, to enter a 3-word integer Date Item (such as !DATE-YYMD), run DICTDBM and enter: STORAGE LENGTH = 2 COUNT = 3. The STORAGE LENGTH is always 2 and the COUNT is 1, 2, or 3 depending on the number of words. (The above item is actually held as 3 * 16-bit integers). * !DATE-JULIAN date is a 4-byte integer. The Julian date is calculated using the CACM Algorithm 199. * !DATE-CALENDAR and !TIME-CLOCK are in the format returned by the corresponding HP 3000 Intrinsics. They must be defined as 2- and 4-byte integers respectively.
Datasets Datasets are defined as files of type DETL, MAST or AUTO. When specifying a file name, follow these rules: * The file name must be the real name of the IMAGE dataset. * Do not include spaces, points, commas and parentheses in the file name. File/element relations describe which elements are in the dataset. Those elements which are search elements can also be defined. If a search element consists of several components, it is called a composite search element. To define a composite search element you must first define an element with the name of the search element. Then use element/element relations to describe the components of the composite search element. The composite search element becomes a parent element, and the components become its child elements. If several composite search elements have the same child element, HP ALLBASE/BRW treats all occurrences of that child element as synonyms, in other words, as the same element. If you use parent elements as keys, you must define relations for either: * all the child elements associated with the parent element, or, * if you have included parent elements in the BRWDIC, you need only define a relation for the parent element. If no long name is supplied, HP ALLBASE/BRW assumes that a real number contained in an IMAGE dataset is in HP 3000 format. Databases Databases are defined as files of type BASE, where the file name must be the name of the database with out group and account. File/file relations describe which datasets are in the database. MPE Files MPE files are defined as files of type MPEF or MPER, where the file name must be the file format name in the data dictionary without group and account. File/element relations describe which elements are in the MPE file. HP ALLBASE/BRW only supports MPE files with fixed length records. If no long name is supplied, HP ALLBASE/BRW assumes that a real number contained in an MPE file is in IEEE format. KSAM Files KSAM files are defined as files of type KSAM, where the file name must be the file format name in the data dictionary without group and account. File/element relations describe which elements are in the KSAM file. HP ALLBASE/BRW only supports KSAM files with fixed length records. If no long name is supplied, HP ALLBASE/BRW assumes that a real number contained in a KSAM file is in IEEE format. Locations Locations are defined as groups in the account of the data dictionary and are optional. File/location relations describe groups for databases, MPE files and KSAM files. HP ALLBASE/BRW does not support accounts as locations, although HP Dictionary/3000 allows this. A database or a file in another account must also have a data dictionary in that account. Preparing a BRWDIC Dictionary File With HP Dictionary/3000 BRWD3000 prepares a BRWDIC dictionary file from an HP Dictionary/3000-type data dictionary file. To create BRWDIC with BRWD3000 1. Run the program. :RUN BRWD3000.PUB.SYS 2. Type the dictionary password. Dictionary Password: not displayed If there is no password, type a colon (;) at the prompt. If you do not enter a password and just press Return at the prompt, the program will terminate. 3. Respond YES (Y) or NO (N) to the following prompts: Include Parent Elements (N/Y)? Use Names up to 20 Characters (Y/N)? If you do not include parent elements in the BRWDIC, you can subsequently only use a parent element in a relation by specifying a separate relation for each of its child elements. The default is N, to NOT include parent elements. The BRWDIC can support names up to 20 characters long. The default is Y, for names up to 20 characters long. If you do not want to use names that long, you can answer N to the prompt and use only names with a maximum length of 16 characters. In this case, names longer than 16 characters are truncated and checked to ensure that the truncated names are still unique. HP BRW/V only supports names up to 16 characters long. If you want reports to run with BRW/V, answer N. The default is to support names up to 20 characters. BRWD3000 opens the HP Dictionary/3000 dictionary with the logical name DICT.PUB, and creates the BRWDIC file with the logical name BRWDIC.PUB. If you want to use file equations on either of these files, remember to use the logical names. If the program encounters an end of file in the dictionary file, you can increase the file size of the dictionary file by entering a FILE command, as shown here: :FILE BRWDIC.PUB; DISC=5000 Then, run the BRWD3000 program again. Warning Messages The program sends a warning message if one of these invalid definitions for HP ALLBASE/BRW occurs: * invalid element type * invalid syntax in the format name * more than 18 decimals * format without elements The BRWDIC is built anyway, even though these warnings may occur.


MPE/iX 5.0 Documentation