HP 3000 Manuals

HP Information Access Data Dictionary [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

HP Information Access Data Dictionary 

HP Information Access Server is the HP 3000 side of HP Information
Access, a data-retrieval system that gives users access to PC databases
and HP 3000 data on the host HP 3000.

If you have Access Server on your system already, you can use the
Information Access data dictionary to create the HP ALLBASE/BRW
dictionary file, BRWDIC.

This data dictionary is on the HP 3000 host system and consists of two
databases:

   *   HDPDIC

       This database contains all the information needed to allow access
       to data.

   *   HDPENV

       This database contains information about users.

The HP ALLBASE/BRW program BRWACCSD extracts this information from the
data dictionary and loads it into the BRWDIC file.

The combination HP ALLBASE/BRW and HP Information Access gives you a
powerful reporting system.

       HP ALLBASE/BRW is the MIS tool for creating operational data on a
       production basis.

       HP Information Access gives PC-user's a tool for accessing data on
       the HP 3000 through their PC--on demand.

These tools can share the same dictionary, the HP Information Access
dictionary.  However, as HP ALLBASE/BRW supports several different
dictionaries, you must also construct a BRWDIC file.

There are three possible scenarios when setting up such a reporting
system:

   a.  You have HP ALLBASE/BRW and are now adding HP Information Access. 

       In this case, you have already defined the BRWDIC file and you
       need to set up the HP Information Access Data Dictionary.  Please
       refer to the HP NewWave Office:  Information Access Server 
       Database Administration manual for instructions.

   b.  You have HP Information Access and are now adding HP ALLBASE/BRW. 

       You can use the HP Information Access Data Dictionary as a source
       for constructing the BRWDIC file.  However, to take advantage of
       HP ALLBASE/BRW features for Date- and Time- items, as well as
       sub-items, you must define some extra information in an MPE file
       called ACCSDEF before building the BRWDIC file.  These steps are
       described in the next section.

   c.  You purchase HP ALLBASE/BRW and HP Information Access together. 

       You should first set up the HP Information Access data dictionary
       as described in the HP NewWave Office:  Information Access Server 
       Database Administration manual, and then construct the BRWDIC file
       as descibed in the next section.

Terminology 

You should note that not all terms used in the HP Information Access data
dictionary mean the same thing in HP ALLBASE/BRW. Here is a list of the
terms used and their different meanings:

-------------------------------------------------------------------------------------------
|                                                                                         |
|            HP Information Access                          HP ALLBASE/BRW                |
|               Data Dictionary                                                           |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| table                                       format                                      |
|                                                                                         |
| data source                                 location                                    |
|                                                                                         |
-------------------------------------------------------------------------------------------

Note also that the following list of HP Access Server features is not
supported by HP ALLBASE/BRW:

   *   Environment information - access groups, users, security
       information and so on.

   *   Information contained in View Tables, except that for:

          *   Using IMAGE compound-items (you do not have to break down
              the compound item into single items).

          *   Defining parent/child relations in the ACCSDEF file with
              the SUB function.

   *   Controlling the form in which IMAGE-zoned and -packed item types
       are displayed by HP ALLBASE/BRW.

The following table lists the HP Information Access Data Dictionary
element-types and describes how they are handled by HP ALLBASE/BRW.

-----------------------------------------------------------------------------
|                                                                           |
|    HP Information     Length    BRW Type              Remarks             |
|        Access        (1 word                                              |
|         Type            =                                                 |
|                      16 bits)                                             |
|                                                                           |
-----------------------------------------------------------------------------
|                                                                           |
| L (logical)          1 word   I (integer)  logical                        |
|                                                                           |
| I (integer)          1 word   I (integer)                                 |
|                                                                           |
| I (integer)          2 words  I (integer)                                 |
|                                                                           |
| I (integer)          4 words  N (numeric)  only 13 digits supported       |
|                                                                           |
| R (real)             2 words  R (real)                                    |
|                                                                           |
| R (real)             4 words  R (real)                                    |
|                                                                           |
| C (character)                 S (string)   maximum length 255 bytes       |
|                                                                           |
| P (packed)                    N (numeric)  packed                         |
|                                                                           |
| Z (zoned)                     N (numeric)  zoned                          |
|                                                                           |
| L, I, C                       D (date)     date specified in ACCSDEF      |
|                                                                           |
| L, I, C                       T (time)     time specified in ACCSDEF      |
|                                                                           |
-----------------------------------------------------------------------------

Supported Features 

The following HP ALLBASE/BRW item types are not supported by HP
Information Access Server:

   *   The element types DATE and TIME.

   *   The definition of the sub-items of some types, used to describe
       parent/child relations.

Defining Date and Time Using an ACCSDEF File 

In order to describe the items Date and Time to HP ALLBASE/BRW, you must
define an additional MPE file which lists these items.  This file must be
called ACCSDEF and can be defined with a conventional text editor.  If
ACCSDEF is in the group in which you are creating the BRWDIC, the
BRWACCSD program automatically loads it.

Define the Date and Time items in the ACCSDEF file as shown in the
following example:
___________________________________________________________
|                                                         |
|     Example:                                            |
|     --------                                            |
|     : Comment   :                                      ;|
|     : The entries of the example are taken from TOYDB  ;|
|                                                         |
|     SUBBEGIN                                            |
|                                                         |
|        TABLE order-details                              |
|        sh-date-year  = SUB (shipment-date,1,C2)         |
|        sh-date-month = SUB (shipment-date,3,C2)         |
|        sh-date-day   = SUB (shipment-date,5,C2)         |
|                                                         |
|        TABLE orders                                     |
|                                                         |
|        order-date-year  = SUB (order-date,1,2)          |
|        order-date-month = SUB (order-date,3,5)          |
|        order-date-day   = SUB (order-date,5,2)          |
|                                                         |
|     SUBEND                                              |
|                                                         |
|     EDITBEGIN                                           |
|                                                         |
|        TABLE orders                                     |
|                                                         |
|          ITEM order-date                                |
|            HEADING "string converted to date-ymd"       |
|            DATE DATE-YMD                                |
|          ITEM order-date-year                           |
|            HEADING "year component"                     |
|          ITEM order-date-month                          |
|            HEADING "month component"                    |
|          ITEM order-date-day                            |
|            HEADING "day component"                      |
|                                                         |
|        TABLE order-details                              |
|                                                         |
|          ITEM shipment-date                             |
|            HEADING "string converted to date-ymd"       |
|            DATE DATE-YMD                                |
|          ITEM sh-date-year                              |
|            HEADING "year component"                     |
|          ITEM sh-date-month                             |
|            HEADING "month component"                    |
|          ITEM sh-date-day                               |
|            HEADING "day component"                      |
|                                                         |
|        EDITEND                                          |
|                                                         |
___________________________________________________________

            

Summary of example 

This example illustrates how the characteristics of the following items
are changed:

       SHIPMENT-DATE

in the dataset ORDER-DETAILS, and

       ORDER-DATE

in the dataset ORDERS

Here is an outline of the steps used to change the items:

   a.  Create three sub-items (children), each with a two-digit value for
       year, month and day.

   b.  Change the type of the parent item (currently C for character) to
       date.

   c.  A short one-line explanation of what has been changed in the item
       appears below the name of that item.

Syntax for ACCSDEF file 

The figure on the next page illustrates the syntax for the ACCSDEF file.

[]
ACCSDEF syntax The figure on the previous page shows the syntax for ACCSDEF. The rules below and also the following sections describe this syntax in greater detail. Comments You must enclose any comments in semicolons (;) ;COMMENT; and you may not type a comment within a comment. Sub-item Part The Sub-item part implements the SUB function used in the View Tables in the HP Information Access data dictionary. Type in the following: sub-item-name = SUB (parent-item-name; position, which must be positive; dtype; decimals; convtype) An Identifier must: * Be 1 to 16 characters in length. * Begin with an alphabetic character (A through Z) followed by: * any characters from A to Z (lower or upper case) * digits from 0 to 9 * any one of these special characters: + - * / ? ' # % & @ Example: Assume you have an item defined in the HDPDIC as: SHIPMENT-DATE X6 The value of the item represents a three-part date composed of year, month, day, with two digits for each of the three parts; each part can have a value of more than two digits if required. Now you define the sub-item by splitting the date into its individual components: Note that one of the ITEMs must begin with 1, the smallest positon. A valid shipment date could be: "880309" SHIP-DATE-YEAR = SUB (SHIPMENT-DATE,1,C2) SHIP-DATE-MONTH = SUB (SHIPMENT-DATE,3,C2) SHIP-DATE-DAY = SUB (SHIPMENT-DATE,5,C2) This is then converted to: SHIP-DATE-YEAR = "88" SHIP-DATE-MONTH = "03" SHIP-DATE-DAY = "09" You can now access these subitems with HP ALLBASE/BRW. Edit Part In the Edit part of the definition process you can add the following attributes to an item: * heading text and edit mask These are both strings of a maximum length of 30 characters. * Date type and Time type You can change any item's type to a Date- or Time type with HP ALLBASE/BRW. The original type of the item must, however, be equal to the length of the new type you wish to assign to the item. (This is not supported by HP Access Server.) ACCSDEF Date and Time-Item Tables You can use the following tables for reference purposes. They list the various Date- and Time-types you can specify in the supporting file ACCSDEF, together with the required type and length of the corresponding element-entries in the HP Access Server Data Dictionary. 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 C 28/04/92 | | | | DATE-DMYY-D 10 Bytes C 28/04/1992 | | | | DATE-MDY-D 8 Bytes C 04/28/92 | | | | DATE-MDYY-D 10 Bytes C 04/28/1992 | | | | DATE-YMD-D 8 Bytes C 92/04/28 | | | | DATE-YYMD-D 10 Bytes C 1992/04/28 | | | | DATE-DDY-D 6 Bytes C 118/92 | | | | DATE-DDYY-D 8 Bytes C 118/1992 | | | | DATE-YDD-D 6 Bytes C 92/118 | | | | DATE-YYDD-D 8 Bytes C 1992/118 | | | ------------------------------------------------------------------------------------------- | | | DATE-DM-D 5 Bytes C 28/04 | | | | DATE-MD-D 5 Bytes C 04/28 | | | | DATE-MY-D 5 Bytes C 04/92 | | | | DATE-MYY-D 7 Bytes C 04/1992 | | | | DATE-YM-D 5 Bytes C 92/04 | | | | DATE-YYM-D 7 Bytes C 1992/04 | | | ------------------------------------------------------------------------------------------- | | | DATE-DMY-I 3 Words I, L | | | | DATE-DMYY-I 3 Words I, L | | | | DATE-MDY-I 3 Words I, L | | | | DATE-MDYY-I 3 Words I, L | | | | DATE-YMD-I 3 Words I, L | | | | DATE-YYMD-I 3 Words I, L | | | | DATE-DDY-I 2 Words I, L | | | | DATE-DDYY-I 2 Words I, L | | | | DATE-YDD-I 2 Words I, L | | | | DATE-YYDD-I 2 Words I, L | | | ------------------------------------------------------------------------------------------- Table 18-0. DATE-ITEM Table (DISPLAY and INTEGER Format) (cont.) ------------------------------------------------------------------------------------------- | | | Dictionary/3000 Length Required Base Type Example: | | Long Name (1 wd = 16 bits) (Date is 04/28/92) | | | ------------------------------------------------------------------------------------------- | | | DATE-DM-I 2 Words I, L | | | | DATE-MD-I 2 Words I, L | | | | DATE-DD-I 1 Word I, L | | | | DATE-MY-I 2 Words I, L | | | | DATE-MYY-I 2 Words I, L | | | | DATE-YM-I 2 Words I, L | | | | DATE-YYM-I 2 Words I, L | | | ------------------------------------------------------------------------------------------- | | | DATE-CALENDAR 2 Bytes I, L | | | | DATE-JULIAN 4 Bytes I, L | | | ------------------------------------------------------------------------------------------- DATE-ITEM Table (NUMERIC and ALPHANUMERIC Format) ------------------------------------------------------------------------------------------- | | | Date/Time Length Required HDPDIC Type Required Example: | | Keyword (1 word = 16 bits) (Date is 04/28/92) | | | ------------------------------------------------------------------------------------------- | | | DATE-DMY 6 Bytes C 280492 | | | | DATE-DMYY 8 Bytes C 28041992 | | | | DATE-MDY 6 Bytes C 042892 | | | | DATE-MDYY 8 Bytes C 04281992 | | | | DATE-YMD 6 Bytes C 920428 | | | | DATE-YYMD 8 Bytes C 19920428 | | | | DATE-DDY 5 Bytes C 11892 | | | | DATE-DDYY 7 Bytes C 1181992 | | | | DATE-YDD 5 Bytes C 92118 | | | | DATE-YYDD 7 Bytes C 1992118 | | | ------------------------------------------------------------------------------------------- | | | DATE-DM 4 Bytes C 2804 | | | | DATE-MD 4 Bytes C 0428 | | | | DATE-DD 3 Bytes C 118 | | | | DATE-MY 4 Bytes C 0492 | | | | DATE-MYY 6 Bytes C 041992 | | | | DATE-YM 4 Bytes C 9204 | | | | DATE-YYM 6 Bytes C 199204 | | | ------------------------------------------------------------------------------------------- TIME-ITEM Table (All Formats) ------------------------------------------------------------------------------------------- | | | Date/Time Length Required HDPDIC Type Required Example: | | Keyword (Time is 15:43:24) | | | ------------------------------------------------------------------------------------------- | | | TIME-HM24-I 4 Bytes C 1543 | | | | TIME-HMS24-I 6 Bytes C 154324 | | | | TIME-HM12-I 5 Bytes C 0343P | | | ------------------------------------------------------------------------------------------- | | | TIME-HM24-D 5 Bytes C 15:43 | | | | TIME-HMS24-D 8 Bytes C 15:43:24 | | | | TIME-HM12-D 6 Bytes C 03:43P | | | ------------------------------------------------------------------------------------------- | | | TIME-HM24-I 2 Words I, L | | | | TIME-HMS24-I 2 Words I, L | | | ------------------------------------------------------------------------------------------- | | | TIME-CLOCK 4 Bytes I, L | | | ------------------------------------------------------------------------------------------- Preparing a BRWDIC with HP Information Access Data Dictionary After you have specified which information from the HP Information Access data dictionary you require for use with HP ALLBASE/BRW, you must create the BRWDIC using the BRWACCSD program. The BRWACCSD program extracts the information from the data dictionary's database, HDPDIC, and creates a dictionary file, BRWDIC. Before you can run the BRWACCSD program, you must use a file equation to ensure that BRWACCSD can open the database root-file HDPDIC and the ACCSDEF file even when they are not in the same group where you create the dictionary file, BRWDIC. Typically, HDPDIC resides in the group PPCDICT of the account HPOFFICE, and ACCSDEF resides in the group where you normally work. In our example, ACCSDEF resides in yourgroup on youraccount. To create the BRWDIC with BRWACCSD 1. Type the following file equations: FILE HDPDIC=HDPDIC.ppcdict.hpoffice FILE ACCSDEF=ACCSDEF.yourgroup.youraccount Use the groups and accounts appropriate for your data. 2. Run BRWACCSD: :RUN BRWACCSD.PUB.SYS This prompt appears: Dictionary Password : 3. Type the dictionary password and press Return. If you press Return without typing in anything, the BRWACCSD program terminates. The password does not appear on the screen when you type it. 4. Respond to the next prompt: Dictionary Password : not displayed Use Parent Items (N/Y): _ a. Type Y (yes) if you wish to include (use) the parent items in the dictionary file, BRWDIC. b. Type N (no) or press Return if you do not wish to include them. If ACCSDEF is in the group where you are working, the following appears: *** Supporting File opened is ACCSDEF Print to File (N/Y) : a. Type in Y (yes) if you want the list of error messages from the analysis of ACCSDEF to be written to the ACCSPRNT file. b. Type N (no) or press Return if you want the list of error messages to be written to the $STDLIST file. The BRWACCSD program now begins analyzing the ACCSDEF supporting file. * * * Start analysing ACCSDEF * * * ERRORS 0 Warnings 0 * * * Start analysing HPDIC END OF PROGRAM After analyzing ACCSDEF, the total number of errors and warnings is displayed on the screen. If the error total is 0, the BRWACCSD program begins analyzing the HDPDIC. (The total number of warnings is irrelevant.) Once the analysis is complete and there were no errors, BRWACCSD creates the HP ALLBASE/BRW dictionary file, BRWDIC. [REV BEG] (If there are warnings, the BRWDIC file will still be created.) [REV END]


MPE/iX 5.0 Documentation