HPlogo QUERY/V Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 QUERY/V COMMANDS

UPDATE procedure

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

Executes an UPDATE command stored as a procedure in the current Proc-file.

Syntax

   U[PDATE] procedure name [,character]

For example:

   >UPDATE UPDNAMES

Where procedure name = UPDNAMES

   >U CHANGE,%

Where procedure name = CHANGE and character = %

Parameters

procedure name

is the name of an UPDATE ADD, UPDATE REPLACE, or UPDATE DELETE command procedure in the current Proc-file.

character

is any printable ASCII character.

Discussion

You can use the CREATE command to store any of the three forms of the UPDATE command. Once the procedure is stored in the Proc-file, you use this form of the UPDATE command to execute it. Refer to the CREATE command for information on creating a procedure.

When you execute the UPDATE procedure, QUERY first checks each line of the procedure. If an error occurs, a message is sent and the incorrect statement in the line is ignored. All other correct statements in the procedure are executed. If the character is included in the command, the procedure is listed before the execution begins.

Example

   

      >>F LAST-NAME IS MAYFIELD

      USING SERIAL READ

      1 ENTRIES QUALIFIED

      >PROC-FILE  =PROCX

      >UPDATE CHANGE

      WHAT IS THE VALUE OF THE CITY

      »PETALUMA

      WHAT IS THE VALUE OF THE STREET-ADDRESS

      »37 41ST AVE.

      WHAT IS THE VALUE OF THE CREDIT RATING

      »8.5

In this example, the FIND command is used to locate the entry to be updated. The procedure named CHANGE (located in Proc-file PROCX) contains the following:

   

      U REPLACE,

      CITY="";

      STREET-ADDRESS="";

      CREDIT-RATING="";

      END

When using null values, QUERY prompts for values when the procedure is executed.

Feedback to webmaster