HP 3000 Manuals

Getting to Know the DBChange Plus Command Interface [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation


DBChange Plus User's Guide

Getting to Know the DBChange Plus Command Interface 

This section describes the features and operation of the DBChange Plus
command interface.

Command Format 

DBChange Plus commands consist of a command, a keyword, and parameters.
For a complete list of commands, keywords, and acceptable abbreviations,
refer to Table 10-1.

Figure 1-1 illustrates the various parts of a typical DBChange Plus
command.

[]
Figure 1-1. Typical DBChange Plus Command Format For more information about DBChange Plus command formats, refer to the "Command Formats" section in chapter 10, "DBChange Plus Commands." Difference Between Deferred and Immediate Commands DBChange Plus has two types of commands: immediate and deferred. Immediate commands are those commands that do not affect the database structure, but instead give information about or help with the operation of the DBCPLUS program. They are executed immediately when they are entered. The following are immediate commands: * BASE * CANCEL * CONTROL * EXIT * HELP * OUTPUT * PERFORM COMMANDS * PRINT * RECOVER * REDO * REVIEW * XEQ Deferred commands are those commands that are stored in the change file and take effect upon execution of the DBAPLUS program. The following are deferred commands: * ADD * CHANGE * CHECK * DELETE * ERASE * FIX * RENAME * REORDER * REPACK Command Sequence The DBAPLUS program executes deferred commands in the order that most effectively protects your data and most efficiently handles your data throughput. For example, if the current change file contains a CHECK command, some ADD and DELETE commands, a FIX command, and a CHANGE command, DBAPLUS executes the commands in the following order: 1. CHECK 2. FIX 3. Other commands Terminating a Command You can cause the DBCPLUS program to ignore the command you are currently entering by typing two slashes (//) and pressing the carriage return key. This returns you to the DBChange prompt (>). You might use this feature, for example, if you decide not to execute the current command or if you make an error and want to start over. For example: >change it// > This feature is only available in interactive mode. Executing Commands from a File You can execute DBChange Plus commands from a file in the following two ways: * Use a command file to make database changes interactively or in batch mode. This is useful if you frequently use the same sequence of commands. To use a command file in batch mode, it must be executed from a job file. * Use a job file to run DBChange Plus in batch mode. This is useful if you want to make changes to the database at a later time. You can include command files in a job file. Including Comments in a File. In a command file or job file, if you want to include DBChange comments, enclose them in double angle brackets, for example, << comment>>. In the MPE command portion of a job file, the word comment at the beginning of a line indicates that the text on that line constitutes a comment. Using a Command File. A command file is a series of DBChange Plus commands and parameters. When the XEQ command is entered, DBChange Plus reads the specified command file and executes the commands until it reaches the end of the file. After DBChange Plus reads the last line in the command file, control is returned to the original command input device (the user terminal interactively or the the job input device in batch mode). If the command file contains the EXIT command, DBChange Plus terminates and the system prompt appears on your screen. The following command file CMDFILE deletes the data item DATE, changes the capacity of the manual master data set CUSTOMER to 450, and exits the DBCPLUS program. The XEQ command executes the command file CMDFILE as follows: >xeq cmdfile ><<This command file creates a new change file for the>> ><<ORDERS database, deletes the data item DATE, and>> ><<changes the capacity of the manual master data set>> ><<CUSTOMER to 450.>> >base orders new <---- DBChange command Change file already exist for ORDERS, do you want to purge it [y/N] ? y Change file ORDERSCF has been purged. Creating new change file: Creating new change file: item information records Creating new change file: set information records Creating new change file: security table Creating new change file: control record >delete item date <---- DBChange command Deletion of data item accepted. >change capacity customer 450 <---- DBChange command Change of set capacity, block factor, and/or device class accepted. >exit <---- DBChange command Please wait ... change file is being verified. HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985 ******************* DBCHANGE STATISTICS*************************** Number of databases prepared for rename: 0 Number of databases prepared for restructure: 1 Number of databases prepared for erase : 0 Number of databases prepared for repack: 0 Number of databases prepared for check : 0 Number of databases prepared for fix : 0 : Using a Job File. A job file is a text file that contains DBChange Plus and MPE XL commands. A job file is used in batch mode. Command files can be included in a job file. In the following example, the job DBCJOB executes some MPE XL commands, some DBChange commands, and the command file CMDFILE, which was explained in the previous example. Note that the command file CMDFILE contains the EXIT command. !job dbcjob,kelly/user.finance/mgr.database/all comment** Show time and date dbcjob begins !showtime !run dbcplus.pub.sys base orders new change password CLERK AGENT xeq cmdfile comment** Show time and date dbcjob ends !showtime !tell kelly.finance.database dbcjob is done !eoj For more information about job files and streaming jobs, refer to "Creating a DBAPLUS Job File from within the DBChange Program" in chapter 9, "Applying Changes to the Database Structure." Issuing MPE XL Commands from within the DBCPLUS Program Many MPE XL commands, including RUN commands, can be entered interactively. You can issue MPE XL commands from within the DBCPLUS program either by entering a colon (:) after the DBCPLUS prompt and then typing the command, or by using Break and RESUME. In the following example, at the DBCPLUS prompt (>) a colon is entered and the MPE XL LISTF command is issued: >:listf FILENAME ORDERS ORDERS01 ORDERS02 ORDERS03 ORDERS04 ORDERS05 ORDERS06 ORDERSCF ORDERSJJ PCHGFMT TESTDB TESTDB01 TESTDB02 TESTDB03 TESTDB04 TESTDB05 TESTDBCF TESTDBCO HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985 > If you press Break to access MPE XL, type the MPE XL command RESUME when you are ready to return to the DBCPLUS program. When READ PENDING is displayed, press Return and the DBChange prompt reappears. For example: Break :listf FILENAME ORDERS ORDERS01 ORDERS02 ORDERS03 ORDERS04 ORDERS05 ORDERS06 ORDERSCF ORDERSJJ PCHGFMT TESTDB TESTDB01 TESTDB02 TESTDB03 TESTDB04 TESTDB05 TESTDBCF TESTDBCO :resume READ pending Return >
CAUTION Using Break while running the DBAPLUS program or after issuing a PERFORM COMMANDS can result in a damaged database.


MPE/iX 5.0 Documentation