Query Management Services

Query Management Services are designed to support the creation and execution of ad hoc query programs in a production application. You can create ad hoc queries using a standard text editor and have each query stored in a disk file to be recalled and executed on request. You can also use these services to store and recall query programs during development. Query Management Services can be used with either a full Zim system or a Query Runtime system.

An ad hoc query program, as far as the Query Management Services are concerned, is a program that is executed interpretatively (i.e., not compiled). Typically, ad hoc query programs are macro programs that query some portion of the database. In general, the query management system supports any interpretative program.

The Query Management Services are designed for use in a production application where the user does not usually have the option of creating new document objects for each ad hoc query program. Instead, these programs are stored in separate disk files and copied into a pre-defined document for execution.

The Query Management Services are

To create a new query, execute the command DPSMakeQuery followed by the name of the query you wish to create. The name of the query can be up to thirty characters in length. If the name contains blanks, the name must be in quotation marks, for example.

DPSMakeQuery Find_Past_Due_Orders

To enter the query, edit the query program by executing

DPSEditQuery Find_Past_Due_Orders

When you want to perform the query, execute

DPSExecQuery Find_Past_Due_Orders

The query program is executed and any results displayed on the current output (usually the terminal). The query program can be recalled for editing or executing as many times as you wish. If you have no further use for a query, remove it by executing:

DPSDeleteQuery Find_Past_Due_Orders

The Query Management Services cannot be used in conjunction with a Zim Runtime System since the ad hoc query programs it supports cannot be compiled.