HP 3000 Manuals

QUERY COMMANDS [ QUERY/V Reference Manual ] MPE/iX 5.0 Documentation


QUERY/V Reference Manual

QUERY COMMANDS 

QUERY commands are divided into seven categories according to their
function.  The categories can be summarized as follows:

--------------------------------------------------------------------------------------------
|                            |                                                             |
|          CATEGORY          |                          FUNCTION                           |
|                            |                                                             |
--------------------------------------------------------------------------------------------
|                            |                                                             |
|      Environment           | Defines data base(s) and conditions for QUERY execution.    |
|                            |                                                             |
|      Retrieval             | Locates information to be used by other commands.           |
|                            |                                                             |
|      Reporting             | Prints specified information.                               |
|                            |                                                             |
|      Updating              | Modifies the data base(s).                                  |
|                            |                                                             |
|      Procedure             | Operates on procedures in the current Proc-file.            |
|                            |                                                             |
|      Operation             | Operates on XEQ files.                                      |
|                            |                                                             |
|      Utility               | See below.                                                  |
|                            |                                                             |
--------------------------------------------------------------------------------------------

Utility commands are used for a variety of tasks.  The FORM, SHOW, and
VERSION commands show the current state of QUERY. The REDO and LISTREDO
commands allow you to list, edit, and re-execute a previous command.  The
ASSIGN, RELEASE, and SETLOCKS commands operate on the data set or data
base locking option.  The TRANSBEGIN, TRANSEND, and TRANSMEMO commands
operate on the transaction logging facility.  SAVE and UNDO operate on
the internal select file used by QUERY during execution.  The HELP
command is an interactive facility used to display the syntax and
function of QUERY commands.  EXIT is used to terminate QUERY execution.

Table 2-1 lists all the QUERY commands and their functions by category.
The commands are discussed in detail in Section 3.

          Table 2-1.  Command Categories and Functions 

------------------------------------------------------------------------------------------------
|                     |                     |                                                  |
|      CATEGORY       |       COMMAND       |                     FUNCTION                     |
|                     |                     |                                                  |
------------------------------------------------------------------------------------------------
|                     |                     |                                                  |
| Environment         | CLOSE               | Closes a data base opened with the MULTIDB       |
|                     |                     | command.                                         |
|                     |                     |                                                  |
|                     | DATA-BASE=          | Specifies the primary data base, password, and   |
|                     |                     | access mode.                                     |
|                     |                     |                                                  |
|                     | DATA-SETS=          | Specifies the data set list for the primary data |
|                     |                     | base.                                            |
|                     |                     |                                                  |
|                     | DBLIST=             | Informs QUERY which data bases to access for     |
|                     |                     | multiple data set retrieval and reporting.       |
|                     |                     |                                                  |
|                     | DEFINE              | Specifies or shows the current QUERY environment |
|                     |                     | for the primary data base.                       |
|                     |                     |                                                  |
|                     | JOIN                | Defines the compound data set used for multiple  |
|                     |                     | data set retrieval.                              |
|                     |                     |                                                  |
|                     | JOIN PROCEDURE      | Executes a JOIN procedure stored in the current  |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
|                     | LANGUAGE=           | Shows the user language.                         |
|                     |                     |                                                  |
|                     | MODE=               | Specifies mode of access to the primary data     |
|                     |                     | base.                                            |
|                     |                     |                                                  |
|                     | MULTIDB             | Used to open additional data bases and define or |
|                     |                     | show their environment specifications.           |
|                     |                     |                                                  |
|                     | OUTPUT=             | Specifies the output device.                     |
|                     |                     |                                                  |
|                     | PASSWORD=           | Specifies the password to access the primary     |
|                     |                     | data base.                                       |
|                     |                     |                                                  |
|                     | PROC-FILE=          | Specifies the name of the current Proc-file.     |
|                     |                     |                                                  |
| Retrieval           | FIND                | Locates data entries in the data base.           |
|                     |                     |                                                  |
|                     | FIND ALL            | Locates all entries in the data set regardless   |
|                     |                     | of the data item value specified.                |
|                     |                     |                                                  |
|                     | FIND CHAIN          | Locates data entries from a detail data set and  |
|                     |                     | one of more of its corresponding master data     |
|                     |                     | sets.                                            |
|                     |                     |                                                  |
|                     | FIND PROCEDURE      | Executes a FIND procedure stored in the current  |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
|                     | MULTIFIND           | Retrieves compound data entries from a compound  |
|                     |                     | data set specified by the most recent JOIN       |
|                     |                     | command.                                         |
|                     |                     |                                                  |
------------------------------------------------------------------------------------------------

          Table 2-1.  Command Categories and Functions (Continued) 

------------------------------------------------------------------------------------------------
|                     |                     |                                                  |
|      CATEGORY       |       COMMAND       |                     FUNCTION                     |
|                     |                     |                                                  |
------------------------------------------------------------------------------------------------
|                     |                     |                                                  |
|                     | MULTIFIND ALL       | Retrieves all compound entries from a compound   |
|                     |                     | data set specified by the most recent JOIN       |
|                     |                     | command.                                         |
|                     |                     |                                                  |
|                     | MULTIFIND PROCEDURE | Executes a MULTIFIND procedure stored in the     |
|                     |                     | current Proc-file.                               |
|                     |                     |                                                  |
|                     | SUBSET              | Retrieves data entries from a FIND or MULTIFIND. |
|                     |                     |                                                  |
|                     | SUBSET PROCEDURE    | Executes a SUBSET procedure stored in the        |
|                     |                     | current Proc-file.                               |
|                     |                     |                                                  |
| Updating            | UPDATE ADD          | Adds data entries to the data base.              |
|                     |                     |                                                  |
|                     | UPDATE DELETE       | Deletes data entries from the data base.         |
|                     |                     |                                                  |
|                     | UPDATE REPLACE      | Modifies the values of data items.               |
|                     |                     |                                                  |
|                     | UPDATE PROCEDURE    | Executes an UPDATE ADD, UPDATE DELETE or UPDATE  |
|                     |                     | REPLACE procedure stored in the current          |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
| Reporting           | LIST                | Prints data entries with automatic formatting.   |
|                     |                     |                                                  |
|                     | REPORT              | Reports the data entries located in the previous |
|                     |                     | retrieval.                                       |
|                     |                     |                                                  |
|                     | REPORT ALL          | Prints data item values of entries located by    |
|                     |                     | the last retrieval command without formatting.   |
|                     |                     |                                                  |
|                     | REPORT PROCEDURE    | Executes a REPORT procedure stored in the        |
|                     |                     | current Proc-file.                               |
|                     |                     |                                                  |
| Operation           | COMMENT             | Allows comments to be added to an XEQ file.      |
|                     |                     |                                                  |
|                     | XEQ                 | Executes QUERY commands from an XEQ file.        |
|                     |                     |                                                  |
| Procedure           | ALTER               | Modifies a procedure stored in the current       |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
|                     | CREATE              | Stores a command as a procedure in the current   |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
|                     | CREATE SPACE        | Reports the number of unused records in the      |
|                     |                     | current Proc-file.                               |
|                     |                     |                                                  |
------------------------------------------------------------------------------------------------

          Table 2-1.  Command Categories and Functions (Continued) 

------------------------------------------------------------------------------------------------
|                     |                     |                                                  |
|      CATEGORY       |       COMMAND       |                     FUNCTION                     |
|                     |                     |                                                  |
------------------------------------------------------------------------------------------------
|                     |                     |                                                  |
|                     | DESTROY             | Deletes a procedure from the current Proc-file.  |
|                     |                     |                                                  |
|                     | DISPLAY             | Lists a procedure stored in the current          |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
|                     | DISPLAY LIST        | Lists the names of the procedures in the current |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
|                     | RENAME              | Changes the name of a procedure in the current   |
|                     |                     | Proc-file.                                       |
|                     |                     |                                                  |
| Utility             | ASSIGN              | Allows a user to enable or disable the locking   |
|                     |                     | option.                                          |
|                     |                     |                                                  |
|                     | EXIT                | Terminates QUERY execution.                      |
|                     |                     |                                                  |
|                     | FORM                | Lists information about the data bases currently |
|                     |                     | being accessed.                                  |
|                     |                     |                                                  |
|                     | HELP                | Lists information about the function, format,    |
|                     |                     | and parameters of QUERY commands.                |
|                     |                     |                                                  |
|                     | LISTREDO            | Displays up to the last 20 commands issued.      |
|                     |                     |                                                  |
|                     | REDO                | Displays the specified command for editing and   |
|                     |                     | executes the edited command.                     |
|                     |                     |                                                  |
|                     | RELEASE             | Removes all locks set by the SETLOCKS command.   |
|                     |                     |                                                  |
|                     | SAVE                | Saves the retrieved data entries in a            |
|                     |                     | self-describing file.                            |
|                     |                     |                                                  |
|                     | SETLOCKS            | Prevents automatic unlocking of a data set.      |
|                     |                     |                                                  |
|                     | SHOW                | Displays the current data base list, JOIN,       |
|                     |                     | LOCKOPTION, and user language.                   |
|                     |                     |                                                  |
|                     | TRANSBEGIN          | Marks the beginning of a logical logging         |
|                     |                     | transaction.                                     |
|                     |                     |                                                  |
|                     | TRANSEND            | Marks the end of a logical logging transaction.  |
|                     |                     |                                                  |
|                     | TRANSMEMO           | Allows a message to be written to the log file.  |
|                     |                     |                                                  |
|                     | UNDO                | Restores the entries retrieved from the previous |
|                     |                     | FIND, MULTIFIND or SUBSET.                       |
|                     |                     |                                                  |
|                     | VERSION             | Displays the current version of QUERY and lists  |
|                     |                     | the IMAGE procedures and program files.          |
|                     |                     |                                                  |
------------------------------------------------------------------------------------------------



MPE/iX 5.0 Documentation