HP 3000 Manuals

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


HP ALLBASE/BRW Reference Manual

HP Application Dictionary 

HP Application Dictionary is the data dictionary used with
HP-customizable applications, including HP Financial Accounting,
HP Financial Budgeting, Materials Management/3000, Production
Management/3000, and Maintenance Management/3000.  Refer to the
appropriate application reference manual for more details about
customizable applications.

Using HP Application Dictionary With HP ALLBASE/BRW 

If you have an HP-customizable application on your system, the HP
Application Dictionary is automatically included.  Therefore no
information on constructing the data dictionary is required here.
[REV BEG]


CAUTION However, if the files ARRAYDEF and SYNDEF do not exist on your system, you need to build them (even if they would be empty). If you have a customized application, you must build these files carefully. The next sections describe these files for you. Therefore, please read this entire section even if you already have an HP Application Dictionary data dictionary on your system.
[REV END] Terminology Terminology in HP Application Dictionary and HP ALLBASE/BRW is not always the same. The table below shows the difference in terminology: ------------------------------------------------------------------------------------------- | | | HP ALLBASE/BRW HP Application Dictionary | | | ------------------------------------------------------------------------------------------- | | | Item Field | | | | Format Format | | | | File File | | | | Dataset Dataset | | | | Database Database | | | | Location Database or File | | | ------------------------------------------------------------------------------------------- In this section the terminology used is that of HP Application Dictionary. For example, the term field is used instead of item. However, although HP Application Dictionary refers to fields, it also uses the term Group Item. Therefore you will also find the term Group Item in this section.
NOTE Avoid name changes in the HP Application Dictionary. HP ALLBASE/BRW assumes that a field with a changed name is a new field. For example, if you change the name of field CUSTOMER-NO to KUNDEN-NUMMER, (to assist your German branch), HP Application Dictionary recognizes that the two fields are identical. However, HP ALLBASE/BRW loads the field into the BRWDIC as the new field name, KUNDEN-NUMMER. This causes problems if you subsequently try to access the field using an HP ALLBASE/BRW standard report that still refers to the field as CUSTOMER-NO!
Single Fields and Group Items Group items can contain single fields. You can include either just the single fields in HP ALLBASE/BRW, or both the single fields and their associated group items. If you use group items as keys, you must define relations for either: * all the single fields associated with the group item, or, * if you have included group items in the BRWDIC, you need only define a relation for the group item. Formats The BRWDIC file will include the following format types: detail-dataset manual-master automatic-master data exchange You can also include screen formats. If you do include the screen formats, each screen format is defined in the BRWDIC as a file, and each field of the screen is defined as a field in that file. An additional 16-character field called SCREEN$NAME is the first field in the record structure for the file. The offsets of the other fields of the screen format are updated automatically. Array Fields (ARRAYDEF) Since HP Application Dictionary is not capable of defining arrays, they must be defined as single fields. HP ALLBASE/BRW can convert these single fields into arrays for more efficient use in reports. Array fields are described in a KSAM file called ARRAYDEF, which is read by the BRWAPPD program to identify array fields for use by BRW/XL. An ARRAYDEF file is required, whether or not you have arrays to define. To build the ARRAYDEF file * Create a KSAM file in the PUB group of the account holding the data dictionary. In the KSAM file, array fields look like this: ------------------------------------------------------------------------------------------- | | | DEBIT01 12 DEBIT | | | | DEBIT02 0 DEBIT | | | | DEBIT03 0 DEBIT | | | | ... 0 DEBIT | | | | DEBIT12 0 DEBIT | | | ------------------------------------------------------------------------------------------- | | | CREDIT01 12 CREDIT | | | | CREDIT02 0 CREDIT | | | | CREDIT03 0 CREDIT | | | | ... 0 CREDIT | | | | CREDIT12 0 CREDIT | | | ------------------------------------------------------------------------------------------- When BRWDIC is created from the APPDIC, the file ARRAYDEF.PUB.application_account is checked to see which array fields are available and what their definitions are. If you define arrays, you must put them in the ARRAYDEF file. If you do not define arrays, you must create an empty ARRAYDEF file (see step 2 in the following procedure). Building theARRAYDEF File To build the ARRAYDEF file (if necessary) 1. If you have arrays to define, create an editor file (ARRAYTMP) with the following format: a. Field Name: 16 characters These first 16 characters form a KSAM key. b. 2 blank spaces c. Number of elements in array: unsigned number d. 2 blank spaces These 2 blank spaces are required to separater the number of elements from the array name. e. Array name: 16 characters The number of elements in an array is specified in the record containing the first array component and is zero for each subsequent array component. _____________________________________ | | | CY-PER1-BUDGET 13 CY-BUD | | CY-PER1-CREDIT 14 CY-CRED | | CY-PER1-DEBIT 14 CY-DEB | | CY-PER1-RATE 14 CY-RATE | | CY-PER10-BUDGET 0 CY-BUD | | CY-PER10-CREDIT 0 CY-CRED | | CY-PER10-DEBIT 0 CY-DEB | | CY-PER10-RATE 0 CY-RATE | | CY-PER11-BUDGET 0 CY-BUD | | CY-PER11-CREDIT 0 CY-CRED | | CY-PER11-DEBIT 0 CY-DEB | | CY-PER11-RATE 0 CY-RATE | | CY-PER12-BUDGET 0 CY-BUD | | CY-PER12-CREDIT 0 CY-CRED | | NY-PER2-RATE 0 NY-RATE | _____________________________________ 2. Run the KSAM utility. :RUN KSAMUTIL.PUB.SYS 3. Create the ARRAYDEF file: > BUILD ARRAYDEF.PUB; REC=-80,2,F,ASCII;& KEY=B,1,16,,RDUP;KEYFILE-ARRAYDEK The & indicates that the command is continued on the next line. > EXIT 4. Copy the editor file into the KSAM file: :FCOPY FROM=ARRAYTMP;TO=ARRAYDEF.PUB
NOTE If you don't have arrays to define, you only need to build the empty files using step 3.
Synonyms (SYNDEF) Synonyms are fields which appear more than once in a dataset because they are components of more than one composite search field. The HP Application Dictionary requires that all fields in a format, including components of group fields, have unique names. This means that each appearance of a synonym field must have a different name. HP Application Dictionary does not allow two fields in the same dataset to have the same name. If two fields with the same meaning exist, they are given different names. HP ALLBASE/BRW allows the definition of fields with different names as synonyms, and treats the synonyms as one field. In a KSAM file called SYNDEF, which is read by the BRWAPPD program, synonyms look like this: COMPANY COMPANY COMPANY2 COMPANY COMPANY4 COMPANY COST-CENTER1 COST-CENTER COST-CENTER2 COST-CENTER
NOTE A SYNDEF file is REQUIRED whether or not synonyms appear in the dictionary. The SYNDEF file must be kept in the PUB group of the account holding the data dictionary.
Building the SYNDEF File A file called SYNDEF.PUB.application account keeps track of these synonyms. This file is checked when BRWDIC is created and only the synonym (or primary field) is used. SYNDEF can be built in the same way as described previously for ARRAYDEF except that the format is: * Synonym name: 16 characters * 2 blanks * Primary name: 16 characters The following shows a partial listing of SYNDEF: _____________________________________ | | | ACCOUNT ACCOUNT | | ACCOUNT1 ACCOUNT | | ACCOUNT2 ACCOUNT | | ACCOUNT3 ACCOUNT | | COMPANY COMPANY | | COMPANY2 COMPANY | | COMPANY4 COMPANY | | COSTCENTER COSTCENTER | | COSTCENTER1 COSTCENTER | | COSTCENTER2 COSTCENTER | | COSTCENTER4 COSTCENTER | | LEDGER2 LEDGER | | LEDGER3 LEDGER | | LEDGER4 LEDGER | | LEDGER5 LEDGER | _____________________________________ Preparing a BRWDIC Dictionary File With HP Application Dictionary BRWAPPD prepares a BRWDIC dictionary file from an HP Application Dictionary data dictionary. To create the BRWDIC with BRWAPPD 1. Run BRWAPPD: :RUN BRWAPPD.PUB.SYS 2. Respond to the following prompts: APPDIC Password: not displayed Include Group Items (N/Y) ? Include Screen Formats (N/Y) ? If you press Return for the password prompt, the program will terminate. If you want to include Group Items in the BRWDIC, answer Y to the prompt Include Group Items (N/Y)?. If you choose to include Group Items, they appear with their associated Single Fields on the Project Items screen and can be used in relations. If you do not include Group Items, you can subsequently only use a Group Item in a relation by specifying a separate relation for each of its Single Fields. The default is to NOT include Group Items. If you want to include the screen format, answer Y to the prompt Include Screen Formats (N/ Y) ? If you do include the screen formats, each screen format is defined in the BRWDIC like a file, with each field of the screen defined as an element in the file. An additional 16-character element called SCREEN$NAME is the first element in the record structure for the file. The default is to NOT include screen formats. BRWAPPD opens the HP Application Dictionary dictionary with the logical name APPDIC.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 FILE command, as shown here: :FILE BRWDIC.PUB; DISC=5000 Then, run the BRWAPPD program again.


MPE/iX 5.0 Documentation