HPlogo QUERY/V Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 USING QUERY/V

LOCATING DATA

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

The retrieval commands, FIND, MULTIFIND, and SUBSET, locate entries in the data base(s) according to data item values in the entries. You can use retrieval commands to:

  • Locate entries in a single data set.

  • Locate entries in multiple data sets.

  • Locate all entries in one data set or multiple data sets regardless of the value of the data item specified.

  • Locate entries in multiple data bases.

Entries must be located before they can be reported, replaced, or deleted. The located entries remain available for use until QUERY execution is terminated, the entries are deleted, or until another FIND, MULTIFIND or JOIN command is entered. This means that located entries can be listed using one report format and then again using another format without using the retrieval command again.

A retrieval command consists of one or more relations, each containing a data item name, relational operator, and one or more values separated by commas. For example:

      >FIND LAST-NAME IS MARTENSEN

      USING SERIAL READ

      1  ENTRIES QUALIFIED

      >

In this example, L-NAME is the item name, IS is the relational operator, and MARTENSEN is the value. QUERY prints the number of qualifying entries.

When a retrieval command is executed, QUERY searches the appropriate data set(s) for the data entries which satisfy the relation(s). QUERY then stores the record addresses of these entries in a select file. When a REPORT, REPORT ALL, UPDATE DELETE or UPDATE REPLACE command is executed, the select file is used to locate the data entries.

A retrieval command can be stored as a procedure in a Proc-file for repeated use without re-entering the command. Retrieval procedures can be created which prompt you for the desired search values when the procedure is executed. This allows you to search for different values of the same data item each time the procedure is executed.

Feedback to webmaster