HPlogo QUERY/iX Reference Manual > Chapter 3 QUERY/iX COMMANDS

DEFINE

MPE documents

Complete PDF
Table of Contents

E0300 Edition 7 ♥
E1098 Edition 6

Lists the status of all of the environment commands for the primary data base and enables you to change the environment specifications.

Syntax



  DEF[INE]

Discussion


When you enter the DEFINE command for the primary data base in either session or job mode, QUERY lists the state of each of the environment commands and prompts you for changes. The primary data base is the data base opened by the DEFINE or DATA-BASE= command. After the prompt, you can enter a new parameter for the command, or press RETURN to maintain the current value.

When DEFINE is entered in job mode, you must anticipate the order of QUERY prompts and enter the new values in the proper order on the records immediately following the DEFINE command. A blank record indicates no change in value and is treated like RETURN in session mode.

The DEFINE command prompts are shown below:

  DATA-BASE = >>
  PASSWORD = >>
  MODE = >>
  DATA-SETS = >>
  PROC-FILE  = >>
  OUTPUT = TERM
  OUTPUT = >>

When you first use the DEFINE command after initializing QUERY execution, none of the command settings will be listed except OUTPUT=TERM. If you do not want to define a particular environment parameter, respond with RETURN. If you are only doing procedure maintenance, you need not specify a data base. On the other hand, if you are not using procedures you do not have to define a Proc-file.

If you are signed on as the creator and enter a semicolon in place of the data base password, you will be given read and write access to all data items and data sets in the specified data base. This is true even if no passwords are defined for the data base.

If you enter an invalid password, you will be assigned a user class of zero, which allows you read and/or write access to some or all of the data sets and data items in the specified data base. When this happens, the following message is returned:

  PASSWORD DOES NOT MATCH ANY DEFINED FOR THE SPECIFIED DATA BASE;
  USER CLASS ZERO (0) WAS ASSIGNED

If user class zero does not allow you access to any data sets and/or data items in the data base, the following message is returned:

  BAD PASSWORD

If you are not sure that you will have access to the data items you need, you can change the password with the DEFINE, DATA-BASE=, or PASSWORD= command.

Refer to the command description of each prompt for more information about the purpose of each environment specification.

Examples


Example 1

  >DEFINE
  DATA-BASE = >>ORDERS
  PASSWORD = >>CLERK
  MODE = >>5
  DATA-SETS = >>Return
  PROC-FILE  = >>MANPROC
  OUTPUT = TERM
  OUTPUT = >>Return
  >

The DEFINE command can be used to set up the environment of the primary data base for your QUERY session. QUERY prompts for the data base name, password, mode, data set list, and procedure file name. The current output device is the terminal because RETURN is pressed in response to the prompt.

Example 2



  >DEFINE
  DATA-BASE = ORDERS
  DATA-BASE = >>Return
  PASSWORD = **********
  PASSWORD = >>Return
  MODE = 5
  MODE = >>Return
  DATA-SETS = >>Return
  PROC-FILE  = MANPROC
  PROC-FILE  = >>CANNED
  OUTPUT = TERM
  OUTPUT = >>Return
  >

The DEFINE command is also useful for listing the current environment of the primary data base and changing it. Once the environment for the primary data base has been defined, QUERY prints the current setting for each environment command and allows you to change it or press RETURN to leave it as is. In the example above, the Proc-file is changed from MANPROC to CANNED.




DBLIST=


DESTROY