The user may further limit the data to be output in a report by specifying that only certain values from MultiValued attributes be listed. Such specifications are called print limiters. For example, the ORDERS file contains a MultiValued attribute called TITLE, since many orders are for more than one title. A print limiter may be used to print only the titles the user specifies.
A print limiter expression consists of a relational operator and a constant or attribute name. If no operator is included, = (equal to) is assumed. Print limiter expressions are appended to one of the attributes in the output specification.
The next example shows a SORT statement that includes the print limiter expression TITLE = “OPERATING SYSTEM CONCEPTS”:
>SORT ORDERS BY DATE DATE CUST.ID TITLE = "OPERATING SYSTEM CONCEPTS" |
|||
|
|
|
|
PAGE 1 |
|
|
11:42:02 DD MMM YYYY |
|
|
|
|
ORDERS |
Date of Order |
Customer ID |
Title...................... |
|
|
|
|
10101 |
09/06/94 |
AJOHN5396 |
|
10102 |
09/06/94 |
BLEAR6803 |
OPERATING SYSTEM CONCEPTS |
10103 |
09/06/94 |
AJOHN5396 |
|
10104 |
09/06/94 |
MASHX5777 |
OPERATING SYSTEM CONCEPTS |
10105 |
09/07/94 |
DEDGE6635 |
|
10106 |
09/07/94 |
AORLA6098 |
OPERATING SYSTEM CONCEPTS |
10107 |
09/07/94 |
HJOHN7265 |
OPERATING SYSTEM CONCEPTS |
10108 |
09/08/94 |
BLEAR6803 |
OPERATING SYSTEM CONCEPTS |
10109 |
09/08/94 |
MASHX5777 |
|
10110 |
09/09/94 |
JBOHA5422 |
OPERATING SYSTEM CONCEPTS |
10111 |
09/12/94 |
AJOHN5396 |
OPERATING SYSTEM CONCEPTS |
10112 |
09/12/94 |
BLEAR6803 |
OPERATING SYSTEM CONCEPTS |
10113 |
09/13/94 |
HJENK7129 |
OPERATING SYSTEM CONCEPTS |
10114 |
09/13/94 |
BLEAR6803 |
|
10115 |
09/13/94 |
DEDGE6635 |
OPERATING SYSTEM CONCEPTS |
10116 |
09/14/94 |
JBUCK6488 |
|
10117 |
09/14/94 |
JSWEN5398 |
|
Print limiters are similar to selection expressions. The difference is that:
Selection expressions select items and print limiters specify which values from MultiValued attributes are to be output, and
Selection expressions generally begin with the WITH connective.
Print limiters may also be used with Controlling and Dependent attributes to display only data from Dependent attributes that corresponds to the selected Controlling attributes. More information about Controlling and Dependent attributes is located in the Database Architecture topic in mvBase Operation and Administration Guide.
The following query lists all orders, but displays the code and number for only those orders with a code of N01.
>LIST ORDERS BOOKCODE = "N01" QTY |
||
|
|
|
PAGE 1 |
12:08:39 DD MMM YYYY |
|
|
|
|
Book Code |
Qty |
|
|
|
|
10101 |
N01 |
2 |
10107 |
N01 |
9 |
10113 |
|
|
10116 |
|
|
10122 |
|
|
10110 |
N01 |
12 |
10104 |
N01 |
3 |
10119 |
|
|
10102 |
N01 |
1 |
10105 |
N01 |
1 |
10108 |
|
|
10111 |
|
|
10114 |
N01 |
5 |
10117 |
|
|
10120 |
|
|
10126 |
|
|
10103 |
N01 |
2 |
10106 |
|
|
BOOKCODE is the Controlling attribute and QTY is the Dependent attribute.
See Also
Producing Reports with LIST and SORT
Using the LIST and SORT Commands