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

DATA-BASE=

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

Specifies the primary data base to be accessed by QUERY.

Syntax

   [DATA-]B[ASE]= data base name

For example:

   >DATA-BASE=ORDERS.PUB.SYS



   >B=DBAFILE

Parameter

data base name

is the name of an IMAGE data base.

The data base may reside in any group or account on the local HP 3000 or a remote HP 3000 as long as you are allowed access to it through the MPE file security. To specify a data base that does not reside in your group and account, you must use a fully-qualified name in the form: data base name.group.account. For example, ORDERS.PUB.SYS is a data base named ORDERS in the PUB group of the SYS account.

Note: If you are accessing a remote data base using QUERY, refer to Appendix C.

Discussion

This command is used to specify the primary data base. You must use either this command or the DEFINE command to identify the primary data base before you can use QUERY commands which access a data base. You can specify a new primary data base at any time, and you can open additional data bases with the MULTIDB command.

When you enter the DATA-BASE= command, QUERY prompts you for a password and an access mode.

   PASSWORD = >>

   MODE = >>

When you enter this command, QUERY first closes the current primary data base before attempting to open the requested data base. If QUERY is unable to open the requested data base, you can:

  • Specify a different data base with the DATA-BASE= or DEFINE command.

  • Use the data base(s) opened with the MULTIDB command.

  • Use commands which do not require an open data base (e.g., HELP).

Passwords and Access Modes

Passwords are created by the data base administrator or designer who will tell you which one you may use. The password determines which data sets and/or data items in the data base you are allowed to read and/or write. A password must be entered exactly as it was created, with including upper and lowercase characters.

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 there are no passwords specified for the data base.

If you enter an invalid password, you are assigned a user class of zero which will allow 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 SPECIFIED DATA BASE;

   USER CLASS ZERO (0) WAS ASSIGNED

If there are no data sets and/or data items which you can access, the following message will be returned:

   BAD PASSWORD

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

After you enter a password, QUERY prompts you for the access mode. You must enter a valid access mode represented by a number between 1 and 8. The description of modes in Section 1 will help you determine which mode to use.

Job Mode

If the DATA-BASE= command is entered in job mode, the password and the mode number must follow the command in the next two records, respectively.

Example

User 1

   >DATA-BASE=ORDERS

   PASSWORD = >>BUYER

   MODE = >>1

User 2

   >B=ORDERS

   PASSWORD = >>CLERK

   MODE = >>6

   DATA BASE OPEN IN ANOTHER MODE



   >B=ORDERS

   PASSWORD = >>CLERK

   MODE = >>5

   >

This example shows two users for the ORDERS data base. User 2 must open the data base with mode 5 because mode 6 is incompatible with the access mode of user 1. User 1 has requested mode 1 (exclusive read and write access).

Feedback to webmaster