HP 3000 Manuals

Exercise 3:Defining Relation Conditions [ HP ALLBASE/BRW Tutorial ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Tutorial

Exercise 3:Defining Relation Conditions 

Because you have defined the relation on order number, the table
ORDER-TABLE will contain those record where ORDER-NO in ORDERS in equal
to ORDER-NO in ORDER-DETAILS. But this will include all orders placed in
any month--not just those placed in June.  You need to further restrict
the records by using a relation condition.

The condition formula is expressed in terms of a calculation language 
that is fully described in the HP ALLBASE/BRW Reference Manual.

Define the relation condition 

   1.  Choose  Relation Condit'n.

       The Relation Condition screen appears.  Other than the screen
       heading and the row of function labels at the bottom, this screen
       is blank.

[]
2. Type the following formula: MONTH_OF (ORDER-DATE) = 6 MONTH_OF if a standard, or pre-defined, function supplied with BRW. The 6 refers to the 6th month (June). 3. Use Tab to move to the next line. 4. Type the following comment on the line following the formula: << Selects only those orders placed in June. >> All text between the delimiters << and >> is a comment and is ignored. 5. Press Enter.
NOTE MONTH_OF extracts the month from any type of date item as long as the item is described in the BRWDIC (the BRW dictionary).
The relation condition you just added affects the table ORDER-TABLE only. Error Checking BRW checks for syntax errors in the formula immediately. Any errors messages generated are displayed on the screen at the time you enter the formula. You don't have to wait until the report is compiled. Checking to see the items You can make sure that the report will contain the data items you want by looking at the Project Items screen to see if the correct items are marked to be projected to the final report. Check the items projected 1. Choose Project Items 2. Look at the list of Items and see if there is an X by all the items you want to be used in the ORDER-TABLE. 3. Also, look to see which item you want to use from this new table as a common item when you join it to the PRODUCTS data set. Specifically, notice PRODUCT-NO. Make sure it is marked to be projected.
[]
4. Choose Exit to return to the Define Table screen.


MPE/iX 5.0 Documentation