HPlogo Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00): HP 3000 MPE/iX Computer Systems > Chapter 10 Technical Articles

QUERY/iX Enhancements

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

by James Overman SSG Group R&D

Overview

The following topics in this article review the new enhancements for QUERY/iX and some limitations on their use:

  • B-Tree Enhancement

  • Dynamic Dataset Capacities

  • Wildcard Retrievals

  • Wildcard Character Limitations

  • B-Tree Limitations

  • "NO MATCH" Enhancement

B-Tree Enhancement

The latest B-Tree enhancement to TurboImage/XL has required some enhancements to the QUERY product to utilize the new features. With the HP32216D.03.11 and N.03.11 releases of QUERY, the new B-Tree access capabilities will be supported within QUERY on systems with the B-Tree software release. QUERY is fully backward compatible with the prior releases of TurboIMAGE/XL and QUERY.

New messages will be seen when B-trees are utilized by a database and the FORM command is entered. The number of indexed sets, the wildcard character, the status of the BTREEMODE1 flag when OFF, and the individual sets and items that have been indexed will be reported as shown in the following example:

Figure 10-1 FORM Example

>FORM                                   

DATA BASE: TOYDB MON, MAY 30, 1997, 10:48 AM
DATA BASE LANGUAGE ATTRIBUTE: NATIVE-3000
DATA BASE HAS 2 INDEXED SETS WITH WILDCARD CHARACTER= "~" NEW
WARNING! DATA BASE BTREEMODE1 IS OFF. WILDCARD DISABLED. NEW

SET NAME:
CUSTOMERS,MANUAL/INDEXED NEW

ITEMS:
CUSTOMER-NO, X6 <<KEY,INDEX ITEM>> NEW
CUSTOMER-NAME, X30

CAPACITY: 50 ENTRIES: 8

SET NAME:
ORDER-MASTER,AUTOMATIC/INDEXED NEW

ITEMS:
ORDER-NO, X8 <<KEY,INDEX ITEM>> NEW

CAPACITY: 503 ENTRIES: 16

SET NAME:
INVOICES,DETAIL

ITEMS:
INVOICE-NO, X6
CUSTOMER-NO, X6 <<SEARCH,INDEX ITEM>> NEW
ORDER-NO, X8 <<SEARCH,INDEX ITEM>> NEW
AMOUNT, P12

CAPACITY: 5016 ENTRIES: 5000
MAXIMUM CAPACITY: 5016 INITIAL CAP.: 38 INCREMENT: 38 NEW

Dynamic Dataset Capacities

The last line above shows another enhancement to QUERY that reflects the Dynamic Dataset Capacity Expansion capability. When a dataset has utilized the Dynamic Expansion feature, QUERY will display the CURRENT, MAXIMUM, and INITIAL capacities and the INCREMENT amount. The FORM SETS output has been slightly modified such that the heading reflects that the Current capacity is being reported rather than the Maximum capacity.

Wildcard Retrievals

QUERY will automatically invoke the B-Tree retrieval feature for the FIND, LIST, SUBSET, and MULTIFIND commands when a wildcard character is used in the search value. As QUERY may have up to ten databases open and each could have a different wildcard, the wildcard for the DEFINED database will be used when specified, else the first wildcard specified by an open database will be used. QUERY uses modes 21 or 24 for B-Tree DBFIND for best performance.

Wildcard Character Limitations

Certain possible wildcard characters are used by QUERY for syntax scanning and are limited in their usage. These special characters may be utilized when the data values are delimited by double quotes (for example, tilde, carat, comma, and parenthesis).

Figure 10-2 Title not available (Wildcard Character Limitations )

>FIND CUSTOMERS.CUSTOMER-NO=01540~      
Tilde is a limited wildcard


EXPECTED A CONNECTOR OR 'END'

INVALID CONNECTOR OR TERMINATOR!



>FIND CUSTOMERS.CUSTOMER-NO="01540~"
Tilde enclosed in quotes works


8 ENTRIES QUALIFIED

>FIND CUSTOMERS.CUSTOMER-NO=01540"
Double-quote will not work
EXPECTED A CONNECTOR OR 'END'



INVALID CONNECTOR OR TERMINATOR



>FIND CUSTOMERS.CUSTOMER-NO="01540"""
unless doubled in quotes and double-quote is wildcard
8 ENTRIES QUALIFIED



>FIND CUSTOMERS.CUSTOMER-NO=01540*
If asterisk is NOT the wildcard for this database, then no match unless the value 01540* is in dataset.
0 ENTRIES QUALIFIED

B-Tree Limitations

QUERY will utilize the B-Tree functionality when possible for both character and binary data types. The wildcard feature is only implemented by TurboIMAGE/XL for character data types (X and U) and not for binary data types. Neither has the Not Equal operator been implemented for B-trees and so QUERY will continue to use the older access methods (normally serial reads) for Not Equal retrievals. Note that the LIST command always uses a serial read but will apply the wildcard search character for relations.

When a database has the BTREEMODE1 flag set to OFF, QUERY will not attempt to use the B-Tree functionality for Wildcard retrievals. This condition is reported by all forms of the FORM command.

"NO MATCH" Enhancement

The FIND, MULTIFIND, and SUBSET commands have been enhanced to accept a NO MATCH alternative such that all data records NOT MATCHING the pattern provided are returned by the commands. The new form of the FIND command is:

FIND [#LIMIT=I;] RELATION/ITEM IDENTIFIER [NO] M[ATCHING] "PATTERN"
[AND/OR RELATION/ITEM IDENTIFIER [NO] M[ATCHING] "PATTERN"]... [END]

The MULTIFIND and SUBSET command syntax are similarly enhanced.

The NO may be followed by additional characters such that all of the following examples are accepted:

FIND PRODUCTS.NAME NO MATCH "ABC?*"
FIND PRODUCTS.NAME NOT MATCHING "ABC?*"
FIND PRODUCTS.NAME NONE M "ABC?*"

This NO Matching enhancement is NOT related to the B-Tree functionality and does not utilize the B-Tree retrieval mechanisms.

Feedback to webmaster