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

USING PROCEDURES IN A PROC-FILE

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

A single QUERY command can be stored as a named procedure for repeated use without re-entering the command. The commands which can be used in a procedure are listed in Table 2-2 “Procedure Commands”.

You execute a procedure by referencing it with a form of the command used in the procedure. Refer to Table 2-2 “Procedure Commands” for the commands that are used to execute procedures. For example, if a procedure named FINDNAME contains the FIND command, you would execute the procedure by typing:

      >FIND FINDNAME

You store one or more procedures in an MPE file called a Proc-file. Only one Proc-file is "active" at any time. The active Proc-file is called the current Proc-file. When you execute a procedure, QUERY searches the current Proc-file for the specified procedure. Therefore, before executing a procedure, you must specify the current Proc-file with the PROC-ENTITY = command or in response to the prompt issued by the DEFINE command. To access a Proc-file, you must have read and lock access to the group and account in which the Proc-file resides.

Table 2-2 Procedure Commands

USED IN A PROCEDUREEXECUTES A PROCEDURE

FIND

FIND ALL

FIND CHAIN

FIND procedure
JOIN JOIN procedure

MULTIFIND

MULTIFIND ALL

MULTIFIND procedure

REPORT

REPORT ALL

REPORT procedure
SUBSET SUBSET procedure

UPDATE ADD [1]

UPDATE DELETE [1]

UPDATE REPLACE [1]

UPDATE procedure
 [1]

[1] * In a procedure, the updating commands must include the UPDATE keyword or its abbreviation.

 

A procedure can be created within QUERY or copied from an MPE ASCII file. The QUERY commands that operate on procedures are discussed in Table 2-3 “Commands Used to Define Procedures”.

Table 2-3 Commands Used to Define Procedures

COMMANDSFUNCTION
CREATECreates a procedure or copies it from an MPE ASCII file and stores it in the current Proc-file. The CREATE SPACE option shows the number of unused records in the current Proc-file.
DISPLAYLists the names of the procedures in the current Proc-file or lists individual procedures with line numbers for use in editing.
ALTEREdits a procedure stored in the current Proc-file. This command is used to insert, replace, and delete lines.
DESTROYDeletes a procedure from the current Proc-file.
RENAMEChanges the name of a procedure in the current Proc-file.

 

Feedback to webmaster