Hewlett-Packard DBChange Plus XL Database Management System User's Guide
PDF
Dokument
Reklama
Reklama
TurboIMAGE/XL Database Management System
DBChange Plus User's Guide
ABCDE
HP Part No. 36386-90001
Printed in U.S.A.
19900101
First Edition
E1290
DRAFT
11/6/97
20:05
The information contained in this document is subject to change
without notice.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY
KIND WITH REGARD TO THIS MATERIAL, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. Hewlett-Packard shall not be liable for errors
contained herein or use of this material.
Hewlett-Packard assumes no responsibility for the use or
reliability of its software on equipment that is not furnished by
Hewlett-Packard.
This document contains proprietary information which is
protected by copyright. All rights are reserved. No part of
this document may be photocopied, reproduced, or translated
to another language without the prior written consent of
Hewlett-Packard Company.
Copyright c 1987, 1988, 1989, 1990 by Hewlett-Packard Company
Print History
DRAFT
11/6/97
The following table lists the printings of this document, together
with the respective release dates for each edition. The software
version indicates the version of the software product at the time
this document was issued. Many product releases do not require
changes to the document. Therefore, do not expect a one-to-one
correspondence between product releases and document editions.
Edition
Date
Software
Version
First Edition
December 1990
36386A.00.00
iii
20:05
Preface
How to Use This
Guide . . .
Because DBChange Plus is designed to be used primarily by database
creators, this guide is written for a user with both a thorough
knowledge of the HP 3000 and the TurboIMAGE/XL database
management system.
This guide has two purposes:
If you are a new DBChange Plus user, this guide is designed to
acquaint you with DBChange Plus and to help you learn to use
DBChange Plus successfully.
Once you are an experienced DBChange Plus user, this guide
provides quick access to information about DBChange Plus
commands.
The format of this guide reects this dual purpose. Whether you are
a new or experienced DBChange Plus user, you need to understand
this two-part format to make eective use of the guide. The guide
contains the following information:
Task Reference|For new users, chapters 1 through 9 explain how
to perform database restructuring tasks. Each chapter begins
with an overview of the commands used for each task, followed by
step-by-step instructions for each task. Each chapter uses examples
to enhance the discussion of each task.
Command Reference|For experienced users, chapter 10 provides
quick access to the DBChange Plus commands.
You can use either the table of contents or the index to locate
information.
Here's what you'll nd in this guide:
Chapter 1. Introduction to DBChange Plus
This chapter introduces you to DBChange Plus. Here you'll
become familiar with some of the basic features of DBChange Plus,
and you'll learn to do a few simple tasks.
Chapter 2. Copying a Database
This chapter describes how to copy a database.
Chapter 3. Displaying Information about a Database
This chapter describes how to print the schema for a
TurboIMAGE/XL database. It also explains how to display
information about the database structure.
Chapter 4. Changing Data Items
This chapter describes how to change data items in a
TurboIMAGE/XL database.
DRAFT
11/6/97
v
20:05
Chapter 5. Changing Data Sets
This chapter describes how to change data sets in a
TurboIMAGE/XL database. It describes the steps involved in
changing data set elds and data set characteristics, such as
capacity and blocking factor. This chapter also explains how to
recover a data set.
vi
DRAFT
11/6/97
20:05
Chapter 6. Changing Paths in a Database
This chapter describes how to make changes to paths in a
TurboIMAGE/XL database.
Chapter 7. Changing Database Security
This chapter describes how to change user access to a
TurboIMAGE/XL database.
Chapter 8. Maintaining the Database
This chapter describes how to maintain a TurboIMAGE/XL
database. Checking for structural integrity, xing structural
problems, improving database performance, and managing
database capacity are discussed.
Chapter 9. Applying Changes to the Database Structure
This chapter describes how to use the DBAPLUS program to
actually restructure the database. Note that this chapter signals
the end of the task reference portion of this guide.
Chapter 10. DBChange Plus Commands
This chapter is a quick reference for experienced DBChange Plus
users. All the DBChange Plus commands are presented here in
alphabetical order. The syntax and parameters are dened for each
command, followed by a description and examples.
Appendix A. DBChange Plus Messages
This appendix lists the messages you may receive when using
DBChange Plus. The meaning of each error and the action to take
to correct problem are provided.
Appendix B. ORDERS Schema
This appendix shows the ORDERS database schema listing. The
ORDERS database is the sample database used for examples
throughout this guide.
Index
DRAFT
11/6/97
vii
20:05
Other Information
Sources
Manuals
In addition to this guide, you may need to consult the following
manuals:
Title
Part Number
MPE XL Intrinsics Reference Manual
32650-90028
TurboIMAGE/XL Database Management System Reference Manual
30391-90001
Training
The following training courses are available:
Title
Course Number
TurboIMAGE DBMS/3000
35053B
Advanced TurboIMAGE
51480A
viii
DRAFT
11/6/97
20:05
Conventions
UPPERCASE
In a syntax statement, commands and
keywords are shown in uppercase characters.
The characters must be entered in the
order shown; however, you can enter the
characters in either uppercase or lowercase.
For example:
COMMAND
can be entered as any of the following:
command
italics
Command
COMMAND
In a syntax statement or an example, a word
in italics represents a parameter or argument
that you must replace with the actual value.
In the following example, you must replace
FileName with the name of the le:
COMMAND FileName
punctuation
In a syntax statement, punctuation characters
(other than brackets, braces, vertical bars,
and ellipses) must be entered exactly as
shown. In the following example, the
parentheses and colon must be entered:
( FileName):( FileName)
underlining
Within an example that contains interactive
dialog, user input and user responses to
prompts are indicated by underlining. In the
following example, yes is the user's response
to the prompt:
Do you want to continue? >> yes
{
}
In a syntax statement, braces enclose required
elements. When several elements are stacked
within braces, you must select one. In the
following example, you must select either ON
or OFF:
COMMAND
[
]
ON
OFF
In a syntax statement, brackets enclose
optional elements. In the following example,
OPTION can be omitted:
COMMAND FileName [OPTION]
When several elements are stacked within
brackets, you can select one or none of the
elements. In the following example, you can
x
DRAFT
11/6/97
20:05
select OPTION or Parameter or neither. The
elements cannot be repeated.
COMMAND FileName
DRAFT
11/6/97
OPTION
Parameter
xi
20:05
Conventions
[ . .. ]
(continued)
In a syntax statement, horizontal ellipses
enclosed in brackets indicate that you can
repeatedly select the element(s) that appear
within the immediately preceding pair of
brackets or braces. In the example below, you
can select Parameter zero or more times.
Each instance of Parameter must be preceded
by a comma:
[, Parameter][...]
In the example below, you only use the
comma as a delimiter if Parameter is
repeated; no comma is used before the rst
occurrence of Parameter :
[ Parameter][,...]
| . .. |
In a syntax statement, horizontal ellipses
enclosed in vertical bars indicate that you
can select more than one element within the
immediately preceding pair of brackets or
braces. However, each particular element
can only be selected once. In the following
example, you must select A, AB, BA, or B.
The elements cannot be repeated.
...
A
| ... |
B
In an example, horizontal or vertical ellipses
indicate where portions of an example have
been omitted.
In a syntax statement, the space symbol
shows a required blank. In the following
example, Parameter and Parameter must be
separated with a blank:
( Parameter)( Parameter)
4
5
4CTRL5
character
The symbol 4
5 indicates a key on the
keyboard. For example, 4RETURN5 represents
the carriage return key.
4CTRL5 character indicates a control character.
For example, 4CTRL5Y means that you press
the control key and the Y key simultaneously.
xii
DRAFT
11/6/97
20:05
Contents
1. Introduction to DBChange Plus
What Is DBChange Plus? . . . . . . . . . . . .
DBChange Plus Operation . . . . . . . . . . .
Getting Started . . . . . . . . . . . . . . . .
Running the DBCPLUS Program . . . . . . . .
Getting Help . . . . . . . . . . . . . . . . .
Specifying the Database to be Restructured . . .
How the Change File Works . . . . . . . . . .
Creating a New Change File . . . . . . . . .
Updating an Existing Change File . . . . . .
Purging an Existing Change File . . . . . . .
Using Some DBChange Plus Commands . . . . .
Adding a Data Item . . . . . . . . . . . .
Changing a Password . . . . . . . . . . . .
Deleting a Field . . . . . . . . . . . . . .
Leaving the DBChange Program . . . . . . . .
Getting to Know the DBChange Plus Command
Interface . . . . . . . . . . . . . . . . . .
Command Format . . . . . . . . . . . . . .
Dierence Between Deferred and Immediate
Commands . . . . . . . . . . . . . . . .
Command Sequence . . . . . . . . . . . . .
Terminating a Command . . . . . . . . . . .
Executing Commands from a File . . . . . . .
Including Comments in a File . . . . . . . .
Using a Command File . . . . . . . . . . .
Using a Job File . . . . . . . . . . . . . .
Issuing MPE XL Commands from within the
DBCPLUS Program . . . . . . . . . . . .
Redirecting Input, Output, and the Schema Listing .
Printing the Schema to an MPE XL File . . . .
Printing the Schema to an MPE XL File in
Interactive Mode . . . . . . . . . . . .
Printing the Schema to an MPE XL File in Batch
Mode . . . . . . . . . . . . . . . . .
How DBChange Plus Handles Errors . . . . . . .
How DBChange Plus Helps You Avoid and Recover
from Errors . . . . . . . . . . . . . . . . .
Using Job Control Words to Check the Status of
DBChange Plus . . . . . . . . . . . . . .
1-1
1-2
1-2
1-2
1-3
1-4
1-4
1-4
1-4
1-5
1-5
1-5
1-5
1-6
1-7
1-7
1-7
1-8
1-8
1-9
1-9
1-9
1-9
1-11
1-12
1-13
1-13
1-14
1-14
1-14
1-15
1-15
Contents-1
Contents-2
3. Displaying Information about the Database
Summary of Commands to Display Information about
the Database . . . . . . . . . . . . . . . .
Printing the Schema . . . . . . . . . . . . . .
Aborting the PRINT SCHEMA Command . . .
Using REVIEW Commands to Display Information
about the Database . . . . . . . . . . . . .
Displaying User Classes and Passwords . . . . .
Displaying Data Items . . . . . . . . . . . .
Displaying Information about Data Sets . . . . .
Displaying Data Sets . . . . . . . . . . . .
Displaying Fields . . . . . . . . . . . . . .
Displaying Paths . . . . . . . . . . . . . .
3-5
3-5
3-6
3-7
3-7
3-9
3-10
4. Changing Data Items
Summary of Commands to Change Data Items
Helpful TurboIMAGE/XL Information . . .
Item Type Conversions . . . . . . . . . .
Adding a Data Item . . . . . . . . . . .
Deleting a Data Item . . . . . . . . . . .
Recovering a Data Item . . . . . . . . . .
Reordering a Data Item . . . . . . . . . .
Renaming a Data Item . . . . . . . . . .
Changing a Data Item . . . . . . . . . .
Changing Data Item Attributes . . . . . .
.
.
.
.
.
.
.
.
.
.
4-1
4-2
4-3
4-4
4-6
4-9
4-12
4-14
4-15
4-18
5. Changing Data Sets
Summary of Commands to Change Data Sets . . .
Helpful TurboIMAGE Information . . . . . . . .
Adding a Master Data Set . . . . . . . . . . . .
Adding a Detail Data Set . . . . . . . . . . . .
Deleting a Data Set . . . . . . . . . . . . . . .
Recovering a Data Set . . . . . . . . . . . . .
Reordering a Data Set . . . . . . . . . . . . .
Renaming a Data Set . . . . . . . . . . . . . .
Changing the Capacity of a Data Set . . . . . . .
Changing the Blocking Factor of a Data Set . . . .
Changing the Maximum Block Length of a Data Set
Changing the Device Class of a Data Set . . . . .
Adding a Field to a Data Set . . . . . . . . . .
Deleting a Field from a Data Set . . . . . . . . .
Reordering a Field in a Data Set . . . . . . . . .
Adding a Sort Item to a Detail Data Set . . . . .
Deleting a Sort Item from a Detail Data Set . . . .
5-1
5-3
5-4
5-5
5-6
5-7
5-9
5-12
5-13
5-15
5-17
5-20
5-21
5-22
5-24
5-25
5-27
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3-1
3-2
3-4
6. Changing Paths in a Database
Summary of Commands to Change Paths . . . .
Helpful TurboIMAGE/XL Information . . . . .
Adding a Path to a Detail Data Set . . . . . . .
Redening the Primary Path in a Detail Data Set
Deleting a Path from a Detail Data Set . . . . .
.
.
.
.
.
6-1
6-2
6-2
6-4
6-5
7. Changing Database Security
Summary of Commands to Change Database Security
Helpful TurboIMAGE/XL Information . . . . . .
Adding a Password to the Database . . . . . . .
Changing a Password in the Database . . . . . . .
Deleting a Password from the Database . . . . . .
Changing Data Item Security . . . . . . . . . .
Deleting Data Item Security . . . . . . . . . . .
Changing Data Set Security . . . . . . . . . . .
Deleting Data Set Security . . . . . . . . . . . .
7-1
7-3
7-3
7-4
7-6
7-8
7-9
7-10
7-11
8. Maintaining the Database
Summary of Commands to Maintain the Database .
Guidelines for Maintaining the Database . . . . .
How the FIX Commands Operate . . . . . . .
Repacking Data Sets . . . . . . . . . . . . . .
Checking and Fixing Paths . . . . . . . . . . .
Checking Paths . . . . . . . . . . . . . . .
Analyzing the CHECK PATH Statistics . . . .
Fixing Paths . . . . . . . . . . . . . . . . .
Checking and Fixing Data Sets . . . . . . . . . .
Checking a Master Data Set . . . . . . . . . .
Analyzing the CHECK SET Statistics for a Master
Data Set . . . . . . . . . . . . . . . .
Fixing a Master Data Set . . . . . . . . . . .
Checking a Detail Data Set . . . . . . . . . .
Analyzing the CHECK SET Statistics for a Detail
Data Set . . . . . . . . . . . . . . . .
Fixing a Detail Data Set . . . . . . . . . . .
Checking and Fixing the Entire Database . . . . .
Using the QUICK Option with CHECK Commands
9. Applying Changes to the Database Structure
What is DBAPLUS? . . . . . . . . . . . . .
Before Restructuring the Database . . . . . . .
Saving the New Schema . . . . . . . . . . . .
Saving the Schema Processor Output . . . . .
Methods of Using the DBAPLUS Program . . . .
Initiating the DBAPLUS Program Interactively
Creating a DBAPLUS Job File from within the
DBChange Program . . . . . . . . . . .
Modifying the Job File . . . . . . . . . .
Running the DBAPLUS Program Independently
Using PARM Values . . . . . . . . . . . . .
8-2
8-3
8-3
8-4
8-6
8-6
8-7
8-8
8-10
8-10
8-11
8-12
8-13
8-14
8-15
8-16
8-17
.
.
.
.
.
.
9-1
9-1
9-3
9-3
9-3
9-4
.
.
.
.
9-5
9-7
9-9
9-9
Contents-3
How DBAPLUS Restructures a Database . . . . .
Possible Restructuring Problems . . . . . . . .
Restructuring the ORDERS Database . . . . . . .
10. DBChange Plus Commands
DBChange Plus Command Formats . . .
Summary of DBChange Plus Commands
ADD FIELD . . . . . . . . . . . .
ADD ITEM . . . . . . . . . . . .
ADD PASSWORD . . . . . . . . .
ADD PATH . . . . . . . . . . . .
ADD SET . . . . . . . . . . . . .
ADD SORT . . . . . . . . . . . .
BASE . . . . . . . . . . . . . . .
CANCEL COMMANDS . . . . . . .
CANCEL ERASE . . . . . . . . .
CANCEL REPACK . . . . . . . .
CHANGE ATTRIBUTES . . . . . .
CHANGE BLOCKFACTOR . . . . .
CHANGE BLOCKMAX . . . . . .
CHANGE CAPACITY . . . . . . .
CHANGE DEVICECLASS . . . . .
CHANGE ITEM . . . . . . . . . .
CHANGE ITEMSECURITY . . . . .
CHANGE PASSWORD . . . . . . .
CHANGE PRIMARYPATH . . . . .
CHANGE SETSECURITY . . . . .
CHECK BASE . . . . . . . . . . .
CHECK PATH . . . . . . . . . . .
CHECK SET . . . . . . . . . . .
CONTROL . . . . . . . . . . . .
COPY . . . . . . . . . . . . . .
DELETE FIELD . . . . . . . . . .
DELETE ITEM . . . . . . . . . .
DELETE ITEMSECURITY . . . . .
DELETE PASSWORD . . . . . . .
DELETE PATH . . . . . . . . . .
DELETE SET . . . . . . . . . . .
DELETE SETSECURITY . . . . . .
DELETE SORT . . . . . . . . . .
ERASE SET . . . . . . . . . . . .
EXIT . . . . . . . . . . . . . . .
FIX BASE . . . . . . . . . . . .
FIX PATH . . . . . . . . . . . .
FIX SET . . . . . . . . . . . . .
HELP . . . . . . . . . . . . . . .
OUTPUT . . . . . . . . . . . . .
PERFORM COMMANDS . . . . . .
PRINT SCHEMA . . . . . . . . .
RECOVER ITEM . . . . . . . . .
RECOVER SET . . . . . . . . . .
Contents-4
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9-10
9-11
9-12
10-1
10-2
10-6
10-8
10-12
10-14
10-16
10-23
10-25
10-27
10-31
10-32
10-33
10-36
10-39
10-41
10-43
10-44
10-49
10-51
10-52
10-53
10-55
10-63
10-69
10-73
10-76
10-78
10-79
10-82
10-83
10-84
10-86
10-89
10-90
10-91
10-93
10-94
10-97
10-100
10-103
10-105
10-106
10-109
10-111
10-112
REDO . . . . . . . .
RENAME BASE . . . .
RENAME ITEM . . . .
RENAME SET . . . .
REORDER FIELD . . .
REORDER ITEM . . .
REORDER SET . . . .
REPACK SET . . . . .
REVIEW BLOCKS . . .
REVIEW FIELDS . . .
REVIEW ITEMS . . .
REVIEW PASSWORDS
REVIEW PATHS . . .
REVIEW SETS . . . .
XEQ . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
10-113
10-115
10-116
10-118
10-119
10-120
10-122
10-126
10-132
10-134
10-136
10-137
10-138
10-141
10-143
A. DBChange Plus Messages
DBChange Plus Messages (continued) . . . . . . .
DBChange Plus Messages (continued) . . . . . . .
DBChange Plus Messages (continued) . . . . . . .
A-19
A-35
A-57
B. ORDERS Schema
Index
Contents-5
Figures
1-1. Typical DBChange Plus Command Format . . .
1-7
Tables
1-1. DBChange Plus Functions . . . . . . . . . . .
1-1
3-1. Summary of Commands to Display Information
about the Database . . . . . . . . . . . .
3-2
4-1. Summary of Commands to Change Data Items . .
4-2
4-2. DBChange Plus Supported Item Type Conversions
4-3
5-1. Summary of Commands to Change Data Sets . .
5-2
6-1. Summary of Commands to Change Paths . . . .
6-1
7-1. Summary of Commands to Change Database Security 7-2
8-1. Summary of Commands to Maintain the Database
8-2
9-1. DBAPLUS Parameters . . . . . . . . . . . .
9-10
10-1. Summary of DBChange Plus Commands . . . .
10-3
10-2. DBChange Plus Supported Item Type Conversions
10-46
10-3. Required MPE XL Security Capabilities . . . . .
10-76
10-4. DBAPLUS Parameters . . . . . . . . . . . . 10-107
Contents-6
1
Introduction to DBChange Plus
This chapter introduces DBChange Plus by explaining how it
operates, by demonstrating a few tasks to get you started, and by
discussing the features of the command interface. If you are a new
DBChange Plus user, you should read this chapter before moving on
to subsequent chapters. To learn about more DBChange Plus tasks,
refer to chapters 2 through 9.
If you understand DBChange Plus tasks and only want to see the
command syntax information, refer to chapter 10, \DBChange Plus
Commands."
What Is DBChange
Plus?
DBChange Plus is a command-driven utility that allows you to
perform many necessary TurboIMAGE/XL database management
system tasks. DBChange Plus does a variety of changes and
maintenance functions while preserving user data. DBChange Plus
does not have to unload and reload the data.
Table 1-1 describes some functions of DBChange Plus.
Table 1-1. DBChange Plus Functions
Function
Description
Restructuring
Adding, deleting, reordering, renaming, and general
management of data items, data sets, elds, sort
items, and paths. Redening primary paths.
Copying
Copying a database within a group, across groups,
and across accounts.
Displaying structural Reviewing information about data items, data sets,
information
elds, sort items, and paths. Printing the schema.
Security management Adding, deleting, and changing passwords and user
class access.
Maintenance and
performance tuning
Capacity management. Detail data set repacking to
clean up messy chains. Checking and xing
structural problems. Selective placement of data
sets on specic disk classes. Smart reblocking.
Erasing
Bulk erasing of data set entries.
Introduction to DBChange Plus
1-1
DBChange Plus contains two programs: DBCPLUS and DBAPLUS.
The DBCPLUS program accepts and stores your requests in a change
le. The change le contains information about the database and
also contains requests for changes as specied by the DBChange Plus
commands.
The DBAPLUS program performs the actual restructuring or
maintenance of the database. DBAPLUS can be invoked either
from within the DBCPLUS program by issuing a PERFORM
COMMANDS, or it can be invoked independently.
DBChange Plus
Operation
You can use DBChange Plus either interactively or in batch mode.
When using DBChange Plus interactively, you are prompted for
commands and other input, and you receive error and information
messages on your terminal screen. DBChange Plus is usually
used interactively for non-repetitive tasks that require immediate
attention. To use DBChange Plus in batch mode, you send input
to DBChange Plus from a text le called a job le that contains
DBChange Plus and MPE XL commands. Batch mode is usually
used for repetitive or time-consuming tasks.
You can also execute DBChange Plus commands from a text
le called a command le. Command les can either be used
interactively or in batch mode. Job les and command les are
discussed later in this chapter under, \Executing DBChange Plus
Commands from a File."
This section gets you started with DBChange Plus by explaining the
following procedures:
Logging on to your system.
Running the DBCPLUS program.
Getting help.
Specifying which database you want to restructure.
Trying a few commonly used DBChange commands.
Leaving the DBCPLUS program.
Getting Started
Running the DBCPLUS
Program
Before running DBChange Plus, rst log on to the account and group
where the database you want to restructure resides. You must log on
to the system as the database creator. To log on, type the following:
:hello user.account,group
Once you are logged on, run the DBCPLUS program by typing the
following:
:run dbcplus.pub.sys
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
1-2
Introduction to DBChange Plus
TUE, MAY 22, 1990,
>
8:46 AM
The DBChange prompt (>) appears on your screen.
Getting Help
DBChange Plus has an online help facility, which you can access
anytime you are running the DBCPLUS program in interactive
mode. You can either see the entire list of DBChange Plus
commands, or you can get information about a specic command.
To see a listing of all the DBChange Plus commands, issue the
HELP command at the DBChange prompt as shown in the following
example. After every 20 display lines, you are asked if you want to
continue, that is, if you want more commands listed. Type either
y for yes or n for no; note that the default value is displayed in
uppercase. For more information, refer to \HELP" in chapter 10,
\DBChange Plus Commands."
>help
ADD FIELD
ADD ITEM
ADD PASSWORD
ADD PATH
ADD SET
ADD SORT
BASE
CANCEL COMMANDS
CANCEL ERASE
CANCEL REPACK
CHANGE ATTRIBUTE
CHANGE BLOCKFACTOR
CHANGE BLOCKMAX
CHANGE CAPACITY
CHANGE DEVICECLASS
CHANGE ITEM
CHANGE ITEMSECURITY
CHANGE PASSWORD
CHANGE PRIMARYPATH
CHANGE SETSECURITY
CONTINUE [y/N] ? n
>
Adds a field to a data set.
Adds a data item to a database.
Adds a password to a database.
Adds a path to an existing detail data set.
Adds a set to an existing database.
Adds a new sort item to an existing path.
Specifies the database to be modified.
Cancels all changes since most recent BASE.
Cancels a previous ERASE SET command.
Cancels a previous REPACK SET command.
Changes data item attributes.
Changes the block factor of a data set.
Changes the maximum block length of data set.
Changes the capacity of a data set.
Changes the device class of a data set.
Changes item attributes, order, security.
Changes user class access to a data item.
Changes a password.
Changes primary path of a detail data set.
Changes user class access to a data set.
To get information about a specic command, type the command
name after issuing the HELP command. In the example below, a list
of all the ADD commands is displayed:
>help add
ADD FIELD
ADD ITEM
Adds a field to a data set.
Adds a data item to a database.
Introduction to DBChange Plus
1-3
ADD
ADD
ADD
ADD
>
PASSWORD
PATH
SET
SORT
Adds
Adds
Adds
Adds
a
a
a
a
password to a database.
path to an existing detail data set.
set to an existing database.
new sort item to an existing path.
To get a description of the syntax and parameters and an example of
a command, use the HELP command, the DBChange command, and
the keyword. For example, HELP ADD ITEM produces syntax and
parameter information along with an example.
Specifying the
Database to be
Restructured
Whenever the DBCPLUS program is invoked, you must issue
the BASE command to specify the database that you want to
restructure. In the following example, the ORDERS database is
specied for restructuring. By default, a new change le is created
unless you specify otherwise. A series of change le status messages
appear on your screen.
For example:
>base orders
Creating
Creating
Creating
Creating
Creating
new
new
new
new
new
change
change
change
change
change
file:
file:
file:
file:
file:
item information records
set information records
security table
control record
>
How the Change File
Works
Whenever you issue the BASE command, you can either create a
new change le, update an existing change le, or purge an existing
change le, as described below.
Creating a New Change File
A new change le is created by using the NEW option, which is the
default, with the BASE command. The change le is a privileged le
that is named dbname CF.
Updating an Existing Change File
To update an existing change le, use the OLD option with the
BASE command. The OLD option updates the change le by
adding, deleting, or revising information that already exists in
the change le. The existing change le is copied to a le named
dbname CO. Upon exiting the DBCPLUS program, or when the next
BASE command is issued, dbname CO is purged.
1-4
Introduction to DBChange Plus
Purging an Existing Change File
To purge an existing change le, use the PURGECF option with
the BASE command. The change le can also be purged by using
the CANCEL COMMANDS command. If you use the CANCEL
COMMANDS command after issuing the BASE command with the
OLD option, the current dbname CF is purged, and dbname CO is
renamed dbname CF.
Caution
Neither designate a database name as dbname CF nor save and
reuse an existing dbname CF after the DBAPLUS program is run;
otherwise, the root le and the database structure will not match
the change le information.
Do not restore an old change le after the DBAPLUS program has
completed successfully. Instead, create a new change le or use an
XEQ command le.
For more information about the BASE command options, refer to
chapter 10, \DBChange Plus Commands."
Using Some DBChange
Plus Commands
You are now ready to use some DBChange Plus restructuring
commands. In the following examples, a data set is added, a
password is changed, and a eld is deleted from the ORDERS
database, respectively. For more information about the commands
used in the following examples and other DBChange Plus commands,
refer to the appropriate command heading in chapter 10, \DBChange
Plus Commands."
Adding a Data Item
To add a data item to the database, use the ADD ITEM command.
In the following example, the data item REORDER{QTY is added.
It should appear before the data item STATE in the schema listing.
The item subtype is J and the sublength is 4. User classes 11 and 14
have read access. User classes 12 and 13 have write access.
>add item reorder-qty (state) j 4 (11,14/12,13)
Addition of data item accepted.
Changing a Password
To change a password in the database, use the CHANGE
PASSWORD command. In the following example, the password
BUYER is changed to AGENT. Note that passwords are case
sensitive.
>change password BUYER AGENT
Change of password accepted.
Introduction to DBChange Plus
1-5
Deleting a Field
A eld is a data item that is associated with a data set. To delete
a eld, use the DELETE FIELD command. In the following
example, the eld UNIT{COST is deleted from the detail data set
INVENTORY:
>delete field inventory unit-cost
Deletion of field accepted.
1-6
Introduction to DBChange Plus
Leaving the DBChange
Program
Use the EXIT command to leave the DBCPLUS program. When
you exit, a series of messages summarizing the information stored in
the change le appears on your screen. The MPE XL prompt (:)
displays on your screen once the DBCPLUS program terminates.
Following is an example of the EXIT command:
>exit
Please wait.....change file is being verified.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
******************* DBCHANGE STATISTICS***************************
Number
Number
Number
Number
Number
Number
of
of
of
of
of
of
databases
databases
databases
databases
databases
databases
prepared
prepared
prepared
prepared
prepared
prepared
for
for
for
for
for
for
rename:
restructure:
erase :
repack:
check :
fix :
0
0
0
0
0
0
:
Getting to Know the
DBChange Plus
This section describes the features and operation of the DBChange
Plus command interface.
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."
Introduction to DBChange Plus
1-7
Difference Between
Deferred and
Immediate Commands
DBChange Plus has two types of commands: immediate and
deferred.
Immediate commands are those commands that do not aect 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 le and take eect upon execution of the DBAPLUS program.
The following are deferred commands:
ADD
CHANGE
CHECK
DELETE
ERASE
FIX
RENAME
REORDER
REPACK
Command Sequence
1-8
The DBAPLUS program executes deferred commands in the order
that most eectively protects your data and most eciently handles
your data throughput. For example, if the current change le
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
Introduction to DBChange Plus
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 le in the
following two ways:
Use a command le 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 le in batch mode, it must be
executed from a job le.
Use a job le 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 les in a job le.
Including Comments in a File
In a command le or job le, if you want to include DBChange
comments, enclose them in double angle brackets, for example, <<
comment >>. In the MPE command portion of a job le, 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 le is a series of DBChange Plus commands and
parameters. When the XEQ command is entered, DBChange Plus
reads the specied command le and executes the commands until it
reaches the end of the le. After DBChange Plus reads the last line
in the command le, 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 le contains the EXIT
command, DBChange Plus terminates and the system prompt
appears on your screen.
The following command le 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 le CMDFILE as follows:
Introduction to DBChange Plus
1-9
>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.
1-10
Introduction to DBChange Plus
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
******************* DBCHANGE STATISTICS***************************
Number
Number
Number
Number
Number
Number
of
of
of
of
of
of
databases
databases
databases
databases
databases
databases
prepared
prepared
prepared
prepared
prepared
prepared
for
for
for
for
for
for
rename:
restructure:
erase :
repack:
check :
fix :
0
1
0
0
0
0
:
Using a Job File
A job le is a text le that contains DBChange Plus and MPE XL
commands. A job le is used in batch mode. Command les can be
included in a job le. In the following example, the job DBCJOB
executes some MPE XL commands, some DBChange commands, and
the command le CMDFILE, which was explained in the previous
example. Note that the command le 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 les and streaming jobs, refer
to \Creating a DBAPLUS Job File from within the DBChange
Program" in chapter 9, \Applying Changes to the Database
Structure."
Introduction to DBChange Plus
1-11
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 4Break5
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
ORDERS06
TESTDB02
ORDERS01
ORDERSCF
TESTDB03
ORDERS02
ORDERSJJ
TESTDB04
HP36386 (A.00.00) DBCHANGE
ORDERS03
PCHGFMT
TESTDB05
ORDERS04
TESTDB
TESTDBCF
ORDERS05
TESTDB01
TESTDBCO
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
If you press 4Break5 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 4Return5 and the
DBChange prompt reappears. For example:
4Break5
:listf
FILENAME
ORDERS
ORDERS01
ORDERS06
ORDERSCF
TESTDB02
TESTDB03
:resume
READ pending
ORDERS02
ORDERSJJ
TESTDB04
ORDERS03
PCHGFMT
TESTDB05
ORDERS04
TESTDB
TESTDBCF
ORDERS05
TESTDB01
TESTDBCO
4Return5
>
Caution
1-12
Using 4Break5 while running the DBAPLUS program or after issuing a
PERFORM COMMANDS can result in a damaged database.
Introduction to DBChange Plus
Redirecting Input,
Output, and the
Schema Listing
By default, command input comes from $STDIN (the user terminal
interactively; the job le in batch mode). By default, output is
directed to $STDLIST (the user terminal interactively or the job's
$STDLIST spool le in batch mode).
You can redirect input, output, and the schema listing by issuing the
following formal le designators either before or during DBChange
Plus operation. (To issue them during DBChange Plus operation, be
sure to enter a colon (:) after the DBCPLUS prompt (>).)
DBCIN|the formal le designator for command input. If you set
a le equation for DBCIN before running the DBCPLUS program,
commands are read from the named le.
To read input from a le, use the following le equation:
:file dbcin= InFileName
DBCOUT|the formal le designator for command output. This
le can be a temporary le or a permanent le large enough to
hold the contents of the output. The DBCOUT le equation must
be used with the OUTPUT LP command.
To send output to a new permanent le, use the following le
equation:
:file dbcout= FileName;dev=disc;rec=-80,16,f,ascii;disc= n;save;nocctl
where FileName is the name of the new permanent le, and n is
the approximate number of lines in the output le.
Printing the Schema to
an MPE XL File
Caution
To print the schema to a new permanent MPE XL le, use the
PRINT SCHEMA command specifying a FileName . The FileName
must adhere to the MPE XL le naming conventions. (Refer
to the MPE XL General Users Reference Manual .) DBChange
automatically builds a xed ASCII disk le which can accommodate
a le size up to 60000 lines. If the le does not use all the allotted
disk space, any unused disk space is returned back to the system.
When redirecting output to a disk le, be sure the le is large enough
to accommodate all output. If the le is not large enough, the
DBCPLUS or DBAPLUS programs can abort causing the database
to be in an inconsistent state.
Introduction to DBChange Plus
1-13
Printing the Schema to an MPE XL File in Interactive Mode
When you issue the PRINT SCHEMA FileName command in
interactive mode, the new le is opened and the DBCPLUS program
veries if a le with the same name already exists. If one does, you
are prompted and must conrm if you want the existing le purged.
If a le with the same name does not exist, the new le is built and
the schema is printed to the new le.
In the following example, the schema for the ORDERS database is
interactively printed to a le named ORDERSZ, which already exists:
>print schema ordersz
Old schema file ORDERSZ exists.
Schema is printed.
Purge and create a new file [y/N]? y
>
Printing the Schema to an MPE XL File in Batch Mode
When you issue the PRINT SCHEMA FileName command in batch
mode and a le with the same name already exists, the new le is not
created and the following message appears in your output:
Duplicate schema file. Cannot process PRINT SCHEMA.
If a le with the same name does not exist, the new le is built and
the schema is printed to the new le.
Refer to PRINT SCHEMA in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
How DBChange Plus
Handles Errors
When you enter a DBChange Plus command, the DBCPLUS
program checks the syntax of the command and, if the command is
incorrect or invalid, issues an error message to $STDLIST.
If you receive an error message while using the DBCPLUS program
interactively, reenter the command and continue processing. In
batch mode, the DBCPLUS program reports the error and continues
reading commands until the EXIT command is reached.
DBChange Plus usually prints an error message immediately after
the command that caused it. However, because of the deferred
nature of the restructuring commands, some errors are not reported
at the time they are detected. Instead, they are reported when
the next BASE, EXIT, or PERFORM COMMANDS command is
entered.
For example, a blocking factor change could potentially be
recommended after each command that changes the media record
1-14
Introduction to DBChange Plus
size. If you enter several of these commands, you should review the
error messages before deciding which corrective action to take.
For a complete description of errors, their cause, and corrective
action, refer to appendix A, \DBChange Plus Messages."
How DBChange Plus
Helps You Avoid and
Recover from Errors
Every attempt is made to prevent you from inadvertently damaging
the database. When you are using the DBCPLUS program
interactively, commands that could result in the loss of data, such as
COPY, DELETE and ERASE, require your conrmation before they
are accepted into the change le.
When you are prompted for conrmation, the default value is always
an uppercase letter. For example, if your choice is yes or no, and no
is the default, the prompt looks like this:
[y/N]
As an added safety feature, DBChange Plus allows you to cancel the
ERASE and REPACK commands by issuing the CANCEL command.
Deleted items and sets can be recovered by issuing the RECOVER
command.
Caution
You must use CANCEL and RECOVER before executing the
DBAPLUS program; otherwise, you cannot recover changes made to
the database.
You can cancel all commands in the current DBChange session by
issuing the CANCEL COMMANDS command.
Using Job Control
Words to Check the
Status of DBChange
Plus
DBChange Plus contains two user job control words (JCWs). These
user JCWs can be checked prior to executing the next step in
processing to determine if errors occurred in either the DBCPLUS
program or the DBAPLUS program. For example, the following
job checks to make sure the DBCPLUS program processed without
any errors, and then checks to make sure the DBAPLUS program
processed without any errors:
!job checkjob,kelly/user.finance/mgr,database
!run dbcplus.pub.sys
base orders
change capacity sales 80000
exit
!if dbcplus jcw=0 then
!
file dbchgf=orderscf
!
run dbaplus.pub.sys
!
if dbaplus=0 then
!
run yourjob
!
endif
!endif
Introduction to DBChange Plus
1-15
!eoj
1-16
Introduction to DBChange Plus
The DBCPLUSJCW is set within the DBCPLUS program and
checks for such errors as incorrect command syntax and incorrect
database name. If no errors are encountered, then the JCW is set to
zero and the job is successfully processed. If errors are encountered,
the JCW is set to a number other than zero and the DBAPLUS
program is not run.
The DBAPLUSJCW is set within the DBAPLUS program. If
no errors are encountered, the JCW is set to zero and the job is
successfully processed. If errors are encountered, the JCW is set to a
number other than zero and the DBAPLUS program aborts.
If errors are encountered, the error messages are directed to
$STDLIST.
c
Introduction to DBChange Plus
1-17
3
Displaying Information about the Database
This chapter explains how to display information about the structure
of a TurboIMAGE/XL database. It provides instructions for and
examples of the commands used to display information about the
database. Before reading this chapter, you should be familiar with
the information in chapter 1, \Introduction to DBChange Plus." To
learn how to do more DBChange Plus tasks, refer to chapters 2 and 4
through 9. If you understand DBChange Plus tasks and only want
to see command syntax information, refer to chapter 10, \DBChange
Plus Commands."
Summary of
Commands to
Display Information
about the Database
DBChange Plus provides specic commands for displaying
information about the database. Table 3-1 alphabetically lists
the commands used for printing and reviewing database structure
information and summarizes their functions.
The DBCPLUS program provides two ways to display information
about the database structure, as follows:
Printing the schema to obtain information about the entire
database structure.
Using the various REVIEW commands to display information
about specic parts of the database. For example, if you only want
information about a specic data set, then use the REVIEW SET
command.
In both cases, all changes currently stored in the change le are
displayed. Because information stored in the change le is not
permanently applied until you run the DBAPLUS program, the
PRINT SCHEMA and REVIEW commands are useful when verifying
structural changes before you actually restructure the database or
when viewing the original database structure before making changes.
Note
Before invoking any of the following commands, you must log on to
the system as the database creator, run the DBCPLUS program
and specify the database for which you want to display information.
Refer to chapter 1, \Introduction to DBChange Plus."
Unless redirected, output is printed to $STDLIST. Refer to
\Redirecting Input, Output, and the Schema" in chapter 1,
\Introduction to DBChange Plus."
Displaying Information about the Database
3-1
Table 3-1.
Summary of Commands to Display Information about the
Database
Command
Keyword
Description
PRINT
SCHEMA
Prints the database schema.
REVIEW
BLOCKS
Displays information about the data sets in
the database. Includes data set type, eld
count, path count, entry length, capacity,
blocking factor, and block length.
FIELDS
Displays information about the elds (data
items) of master and detail data sets.
Includes search items, sort items, and linked
data sets.
ITEMS
Displays information about the data items
in the database. Includes attributes and
security.
PASSWORDS Displays information about the user classes
and associated passwords in the database.
Printing the Schema
PATHS
Displays information about the paths in a
data set. Includes key item, linked data set,
and sort item.
SETS
Displays information about the data sets in
the database. Includes data set type,
capacity, blocking factor, block length,
device class, and security.
Use the PRINT SCHEMA command to print the schema. In the
following example, the schema output is directed to the printer. A
message is displayed conrming that the schema output is printed.
>output lp
>print schema
Schema is printed.
>
If you want to print the schema to a disk le, use the lename
parameter as shown in the following example. DBChange Plus
automatically builds a 60000-line, ASCII MPE XL le; however, if
you have a schema le that uses more than 60000 lines of space, you
should use the DBCOUT le equate to build a le large enough to
accommodate your schema le.
>print schema lename
Schema is printed.
3-2
Displaying Information about the Database
Refer to \Redirecting Input, Output, and the Schema Listing" in
chapter 1, \Introduction to DBChange Plus," or refer to \PRINT
SCHEMA" in chapter 10, \DBChange Plus Commands," for a
detailed description of the command.
Displaying Information about the Database
3-3
Aborting the PRINT
SCHEMA Command
To abort the PRINT SCHEMA command anytime during an
interactive session, press 4CONTROL5 Y. The DBCPLUS program prints
<< CONTROL-Y >> and returns the prompt for a new command.
For example:
>print schema
BEGIN DATABASE ORDERS;
PASSWORDS:
11 CREDIT ;
12 BUYER
;
13 SHIP-REC;
14 CLERK
;
18 DO-ALL ;
ITEMS:
ACCOUNT
BINNUM
4CONTROL5
, I4(0,11,12,13,14,18/);
, Z2(/13);
y
<< CONTROL-Y >>
>
3-4
Displaying Information about the Database
Using REVIEW
Commands to
Display Information
about the Database
Displaying User Classes
and Passwords
The DBCPLUS program has several REVIEW commands that
display information about the database structure with the changes
stored in a change le. The remainder of this chapter provides an
example for each REVIEW command.
To display one or more user classes and associated passwords in
the database, use the REVIEW PASSWORDS command. In the
following example, @ is the parameter used to display all user classes
and associated passwords in the ORDERS database:
>review passwords @
REVIEW PASSWORDS:
User Class
Password
----------------------11
12
13
14
18
CREDIT
BUYER
SHIP-REC
CLERK
DO-ALL
>
Refer to \REVIEW PASSWORDS" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command.
Displaying Information about the Database
3-5
Displaying Data Items
To display information about one or more data items in the database,
use the REVIEW ITEMS command. The REVIEW ITEMS
command displays item numbers as they appear in the schema, along
with their item name, attributes, and security information. In the
following example, @ is the parameter used to display all the items in
the ORDERS database. Because the database has more than 20 data
items, the DBCPLUS program asks if you want to continue, that is,
review more data items.
>review items @
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------1
ACCOUNT
2
BINNUM
3
CITY
4
CREDIT-RATING
5
DATE
6
DELIV-DATE
7
DESCRIPTION
8
FIRST-NAME
9
INITIAL
10
LAST-NAME
11
LASTSHIPDATE
12
ONHANDQTY
13
PRICE
14
PURCH-DATE
15
QUANTITY
16
STATE
17
STOCK#
18
STREET-ADD
19
SUPPLIER
20
TAX
CONTINUE [y/N] ? 4Return5
I4
Z2
X12
R2
X6
X6
X20
X10
U2
X16
X6
J2
J2
X6
I1
X2
U8
X26
X16
J2
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(11,12,13,14,18/)
(14/11)
(14/11)
(14/11)
(12/)
(14/12)
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(14/)
>
Refer to \REVIEW ITEMS" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command.
3-6
Displaying Information about the Database
Displaying Information
about Data Sets
This section describes the REVIEW commands used to display
information about data sets.
Displaying Data Sets
To display information about one or more data sets in the database,
use either the REVIEW SETS or REVIEW BLOCKS command.
Both the REVIEW SETS and REVIEW BLOCKS commands display
the data set name, the data set type, capacity, blocking factor
and maximum block length. The REVIEW SETS command also
displays the data set number as it appears in the schema, the device
class, and the security information; while the REVIEW BLOCKS
command displays eld count, path count, data entry length with
and without chain counters and pointers, media records, and block
length. Note that the information displayed in the REVIEW
BLOCKS command is similar to the data set summary table printed
by the schema processor.
In the following example, REVIEW SETS is used to display
information about the data set PRODUCT in the ORDERS
database:
>review sets product
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------2
PRODUCT
M 307
16
498
(13,14/12,18)
>
In the example below, the REVIEW BLOCKS command is used to
display information about the data set PRODUCT in the ORDERS
database:
>review blocks product
REVIEW BLOCKS:
Fld Pth Entr Med
Blk Blk Blk
Data Set Name
Type Cnt Cnt Len Rec Capacity Fac Len Max
----------------------------------------------------------------PRODUCT
M
2
2
14
31
307
16
498
498
>
Displaying Information about the Database
3-7
Refer to \REVIEW SETS" and \REVIEW BLOCKS" in chapter
10, \DBChange Plus Commands," for a detailed description of the
commands.
3-8
Displaying Information about the Database
Displaying Fields
To display one or more elds in a data set, use the REVIEW
FIELDS command. For both master and detail data sets, the
REVIEW FIELDS command displays the data set number, as it
appears in the schema, and the data set name and type. However,
the master data set output diers from the detail data set output
in that the master data set output displays the detail data set
associated with the master data set and the search item linking that
detail data set to the master data set. In the detail data set output,
the REVIEW FIELDS command ags the primary path, search
items, and sort item; it also displays the names of the master data
set to which the detail data set is linked and the sort item name.
In the following example, the REVIEW FIELDS command is used
to display the elds in the master data set CUSTOMER in the
ORDERS database:
>review fields customer
REVIEW FIELDS (MASTER SET):
Data Set No.: 2
Name: CUSTOMER
Type: M
Fld No. Field Name
Detail Set Name Path's Search Item
--------------------------------------------------------------1
2
3
4
5
6
7
8
9
ACCOUNT
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
ZIP
CREDIT-RATING
SALES
ACCOUNT
>
Displaying Information about the Database
3-9
In the example below, the REVIEW FIELDS command is used to
display the elds in the detail data set SALES:
>review fields sales
REVIEW FIELDS (DETAIL SET):
Data Set No.: 6
Name: SALES
Type: D
Fld No. Field Name
Pr Sr So Master Set Name Sort Item Name
-------------------------------------------------------------------1
2
3
4
5
6
7
8
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
Y
Y
Y
CUSTOMER
PRODUCT
Y Y
Y
DATE-MASTER
DATE-MASTER
PURCH-DATE
>
Refer to \REVIEW FIELDS" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command.
Displaying Paths
To display information about the paths in one or more data sets,
use the REVIEW PATHS command. For both master and detail
data sets, the REVIEW PATHS command displays the data set
number, as it appears in the schema, and the data set name and
type. However, the master data set output diers from the detail
data set output in that the master data set output displays the key
item, the detail data set linked to the master data set, and the sort
item name. In the detail data set output, the REVIEW PATHS
command displays the search item name linking the detail data set to
the master data set, the master data set to which the detail data set
is linked, the sort item name, and the primary path.
3-10
Displaying Information about the Database
In the following example, CUSTOMER is the name of a master data
set in the ORDERS database:
>review paths customer
REVIEW PATHS (MASTER SET):
Data Set No.:
1
Name: CUSTOMER
Type: M
Key(Search) Item Detail Set Name
Sort Item Name
-----------------------------------------------------ACCOUNT
SALES
PURCH-DATE
>
In the example below, SALES is the name of a detail data set in the
ORDERS database:
>review paths sales
REVIEW PATHS (DETAIL SET):
Data Set No.: 3
Name: SALES
Type: D
Search Item Name Master Set Name
Sort Item Name
Primary
---------------------------------------------------------------ACCOUNT
STOCK#
CUSTOMER
PRODUCT
PURCH-DATE
Y
>
Refer to \REVIEW PATHS" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command.
Displaying Information about the Database
3-11
4
Changing Data Items
This chapter explains how to change data items in a
TurboIMAGE/XL database. It provides instructions for and
examples of the various commands used to change data items. Before
reading this chapter, you should be familiar with the information in
chapter 1, \Introduction to DBChange Plus." To learn how to do
more DBChange Plus tasks, refer to chapters 2, 3, and 5 through 9.
If you understand DBChange Plus tasks and only want to see the
command syntax information, refer to chapter 10, \DBChange Plus
Commands."
Summary of
Commands to
Change Data Items
DBChange Plus has several commands for changing data items in
the database. Some deal with several types of data item changes;
others are specic to data item security. For example, the CHANGE
ITEM command deals with changes to the attributes and security of
a data item and the order that the data item appears in the data
item list; while CHANGE ITEMSECURITY only deals with data
item security. If you are making several types of changes to a data
item, such as subitem count, data type, and length, then CHANGE
ITEM is a more ecient command. However, if you are making only
security changes to a data item, then CHANGE ITEMSECURITY is
a better choice. This chapter covers only those commands that deal
with several types of changes to a data item. For more information
about how to use commands that deal specically with security, refer
to chapter 7, \Changing Database Security."
Table 4-1 alphabetically lists all the commands that involve changes
to data items and summarizes their functions.
Note
Before invoking any of the following commands, you must log on to
the system as the database creator, run the DBCPLUS program,
and specify the database that you want to restructure. Refer to
chapter 1, \Introduction to DBChange Plus."
The commands are not actually applied until the DBAPLUS
program is used. Refer to chapter 9, \Applying Changes to the
Database Structure."
Changing Data Items
4-1
Table 4-1. Summary of Commands to Change Data Items
Command
Keyword
Description
ADD
ITEM
Adds a data item to the database.
CHANGE
ATTRIBUTE
Changes the subitem count, type,
and/or length of a data item.
ITEM
Changes the subitem count, type,
length, security, and/or order of a data
item.
ITEMSECURITY Changes user class access to a data item
(security command only).
DELETE
ITEM
Deletes a data item and its elds and
associated paths from the database.
ITEMSECURITY Deletes all security specications from a
data item (security command only).
Helpful
TurboIMAGE/XL
Information
4-2
Changing Data Items
RECOVER
ITEM
Cancels a data item deletion.
RENAME
ITEM
Renames a data item.
REORDER
ITEM
Reorders the sequence in which the data
item resides in the database.
Remember the following TurboIMAGE/XL characteristics when
making changes to data items:
A data item name must be unique within the database. It must
be from 1 to 16 characters long, and the rst character must be
alphabetic.
No more than 1023 data items can exist in a TurboIMAGE/XL
database.
Valid data item types for TurboIMAGE/XL are I, J, K, R, U,
X, Z, or P. For data item type conversion information, refer to
Table 4-2.
The unit of measure for data item length depends upon the type
designator and can be a halfword, a byte, or a nibble. A halfword
is 16 bits, a byte is 8 bits, and a nibble is 4 bits or a half byte.
A data item cannot exceed 2047 halfwords in length and must be
an even number of bytes.
The subitem count must be an integer from 1 to 255. For item
types U, X, or Z, the subitem count multiplied by the item length
must be an even number. For item type P, the subitem count
multiplied by the item length must be evenly divisible by 4.
The subitem length must be from 1 to 255, depending on the type
designator as follows:
Type
Length
U, X, Z Maximum is 255 bytes.
P
Maximum is 255 nibbles.
I, J
Must be 1, 2, or 4 halfwords.
K
Must be 1 or 2 halfwords.
R
Must be 2 or 4 halfwords.
A compound data item is a data item with a subitem count of
more than one. Search and sort items cannot be compound items.
When changing data item length, reevaluate the blocking factor of
the sets containing the items.
For more information about TurboIMAGE/XL data items, refer
to the TurboIMAGE/XL Database Management System Reference
Manual .
DBChange Plus supports type conversion for all data item
types dened in the TurboIMAGE/XL Reference Manual with
the exception of I4 and J4. Table 4-2 shows the data item type
conversions supported by DBChange Plus. An x in the appropriate
box indicates that you can convert the current item type to the new
item type.
Item Type
Conversions
Table 4-2. DBChange Plus Supported Item Type Conversions
New Item Type
I1,I2
J1,J2
K1
P
R2,R4
U
X
Z
I1,I2
x
x
x
x
x
x
x
x
J1,J2
x
x
x
x
x
x
x
x
K1
x
x
x
x
x
x
x
x
P
x
x
x
x
x
x
x
R2,R4
x
x
x
U
x
x
X
x
x
x
x
Current
Item Type
Z
x
x
x
x
x
x
Changing Data Items
4-3
Caution
Adding a Data Item
When converting data item types, overow, underow, and
truncation may occur if you are reducing data item size. Be sure to
verify that data item conversions do not result in loss of data.
To add a data item to the database, use the ADD ITEM command.
In this section, the new data item STORE# is added to the
ORDERS database. Before adding the data item, the REVIEW
ITEMS output looks like this:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
4-4
Changing Data Items
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
I4
Z2
X12
R2
X6
X6
X20
X10
U2
X16
X6
J2
J2
X6
I1
X2
U8
X26
X16
J2
J2
P8
X6
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(11,12,13,14,18/)
(14/11)
(14/11)
(14/11)
(12/)
(14/12)
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(14/)
(11,14/)
(/12)
(12,13,14/11)
In the example below, the data item STORE# is added using the
ADD ITEM command. It should appear before the data item TAX
in the data item list. The sub-count is 8, the type is J, and the
length is 2. User classes 11 and 12 have read access, and user class
14 has write access to the new data item. The DBCPLUS program
displays a message conrming that the new data item is accepted.
>add item store# (tax) 8 j 2 (11,12/14)
Addition of data item accepted.
>
Refer to \ADD ITEM" in chapter 10, \DBChange Plus Commands,"
for a detailed description of the command syntax and parameters.
If you want to verify that the new data item STORE# has been
added to the change le, use the REVIEW ITEMS command. In
the following example, the @ parameter is used to display all the
data items in the ORDERS database. You can see that the data item
STORE# has been added.
>review items @
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
STORE#
TAX
TOTAL
I4
Z2
X12
R2
X6
X6
X20
X10
U2
X16
X6
J2
J2
X6
I1
X2
U8
X26
X16
8J2
J2
J2
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(11,12,13,14,18/)
(14/11)
(14/11)
(14/11)
(12/)
(14/12)
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(11,12/14)
<---- data item added
(14/)
(11,14/)
Changing Data Items
4-5
23
24
UNIT-COST
ZIP
Deleting a Data Item
P8
X6
(/12)
(12,13,14/11)
To delete a data item, use the DELETE ITEM command. In
this section, the data item LASTSHIPDATE is deleted from the
ORDERS database.
When deleting data items, remember the following:
If the data item to be deleted is a eld in one or more data sets,
those elds are also deleted.
If the data item to be deleted is associated with one or more paths,
those paths are also deleted.
If the data item to be deleted is a key item in an automatic master
data set, the automatic master data set is deleted.
If the item to be deleted is a sort item in any data set, you must
rst use the DELETE SORT command.
When deleting a key item in a manual master data set, an error is
not reported until you exit the DBCPLUS program.
If the data item to be deleted is a eld in one or more data sets,
and those elds contain data, the data in those elds will be lost.
If the data item to be deleted is the only key item in a manual
master data set, an error will occur.
Caution
Before deleting a data item, the REVIEW ITEMS output looks like
this:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
4-6
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
Changing Data Items
I4
Z2
X12
R2
X6
X6
X20
X10
U2
X16
X6
J2
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(11,12,13,14,18/)
(14/11)
(14/11)
(14/11)
(12/)
<---- data item to be deleted
(14/12)
13
14
15
16
17
18
19
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
J2
X6
I1
X2
U8
X26
X16
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
Changing Data Items
4-7
20
21
22
23
24
STORE#
TAX
TOTAL
UNIT-COST
ZIP
8J2
J2
J2
P8
X6
(11,12/14)
(14/)
(11,14/)
(/12)
(12,13,14/11)
In the example below, the data item LASTSHIPDATE is deleted
using the DELETE ITEM command. LASTSHIPDATE is also a eld
in the detail data set INVENTORY and will be deleted from the
data set. In the following interactive session, a message is displayed
asking you to conrm the deletion of the data item. In batch mode,
the data item is deleted without conrmation.
>delete item lastshipdate
Deleting this data item will cause loss of data, delete [y/N]? y
Deletion of data item accepted.
>
Refer to \DELETE ITEM" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the data item LASTSHIPDATE has been
deleted from the change le, use the REVIEW ITEMS command.
In the following example, the @ parameter is used to display
all the data items in the ORDERS database. You can see that
LASTSHIPDATE has been deleted.
>review items @
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
13
14
4-8
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
Changing Data Items
I4
Z2
X12
R2
X6
X6
X20
X10
U2
X16
J2
J2
X6
I1
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(11,12,13,14,18/)
(14/11)
(14/11)
(14/11)
(14/12)
<---- LASTSHIPDATE deleted
(14/)
(11/14)
(/14)
15
16
17
18
19
20
21
22
23
STATE
STOCK#
STREET-ADD
SUPPLIER
STORE#
TAX
TOTAL
UNIT-COST
ZIP
X2
U8
X26
X16
8J2
J2
J2
P8
X6
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(11,12/14)
(14/)
(11,14/)
(/12)
(12,13,14/11)
If you want to verify that the eld LASTSHIPDATE is deleted
from the detail data set INVENTORY, use the REVIEW FIELDS
command, as shown in the following example:
>review fields inventory
REVIEW FIELDS (DETAIL SET):
Data Set No.: 5
Name: INVENTORY
Type: D
Fld No. Field Name
Pr Sr So Master Set Name Sort Item Name
-------------------------------------------------------------------1
2
3
4
5
STOCK#
ONHANDQTY
SUPPLIER
UNIT-COST
BINNUM
Recovering a Data
Item
Y
Y Y
PRODUCT
SUP-MASTER
<---- LASTSHIPDATE deleted
In the previous section, you deleted the data item LASTSHIPDATE
from the ORDERS database. Because DBChange Plus stored
this deletion in the change le, you can recover it by using the
RECOVER ITEM command.
When recovering data items, remember the following:
If the deleted data item is recovered and the data set which
contained the data item as a eld was changed between the time
the data item was deleted and then recovered, you must explicitly
replace the eld in the changed data set with the ADD FIELD
command.
If you delete a data item and then add a new data item with the
same name, you cannot recover the original data item.
Once you run the DBAPLUS program, you cannot recover a
deleted data item under any circumstances.
Changing Data Items
4-9
In the following example, the data item LASTSHIPDATE is
recovered. The DBCPLUS program returns a message conrming
recovery of the deleted data item.
>recover item lastshipdate
Recovery of data item accepted.
>
Refer to \RECOVER ITEM" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
4-10
Changing Data Items
If you want to verify that the deleted data item LASTSHIPDATE
is recovered, use the REVIEW ITEMS command. In the following
example, the @ parameter is used to display all the data items
in the ORDERS database. You can see that the data item
LASTSHIPDATE is recovered and inserted in its original place in the
data item list.
>review items @
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
STORE#
TAX
TOTAL
UNIT-COST
ZIP
I4
Z2
X12
R2
X6
X6
X20
X10
U2
X16
X6
J2
J2
X6
I1
X2
U8
X26
X16
8J2
J2
J2
P8
X6
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(11,12,13,14,18/)
(14/11)
(14/11)
(14/11)
(12/)
<---- data item recovered
(14/12)
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(11,12/14)
(14/)
(11,14/)
(/12)
(12,13,14/11)
Changing Data Items
4-11
Before it was deleted, LASTSHIPDATE was also a eld in the
detail data set INVENTORY. The RECOVER ITEM command
put the data item LASTSHIPDATE back into the detail data set
INVENTORY in its original place in the eld list. If you want to
verify this, use the REVIEW FIELDS command, as shown in the
following example:
>review fields inventory
REVIEW FIELDS (DETAIL SET):
Data Set No.: 5
Name: INVENTORY
Type: D
Fld No. Field Name
Pr Sr So Master Set Name Sort Item Name
-------------------------------------------------------------------1
2
3
4
5
6
Reordering a Data
Item
STOCK#
ONHANDQTY
SUPPLIER
UNIT-COST
LASTSHIPDATE
BINNUM
Y
Y
PRODUCT
Y
SUP-MASTER
Y
DATE-MASTER
To reorder the data item sequence in the data item list, use the
REORDER ITEM command. In this section, the data item
UNIT{COST is reordered in the ORDERS database. Before
reordering the data item, the REVIEW ITEMS output looks like
this:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
4-12
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
DESCRIPTION
Changing Data Items
<---- eld recovered
I4
Z2
X12
R2
X6
X6
X10
U2
X16
X6
J2
4U25
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(14/11)
(14/11)
(14/11)
(12/)
(14/12)
(11,14/18)
13
14
15
16
17
18
19
20
21
22
23
24
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
VENDOR
STORE#
TAX
TOTAL
UNIT-COST
ZIP
J2
X6
I1
X2
X10
X26
X16
8J2
J2
J2
P8
X6
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(11,12/14)
(14/)
(11,14/)
(/12)
(12,13,14/11)
<---- data item to be reordered
In the example below, the data item UNIT{COST is reordered to
appear before the data item TAX in the data item list. If TAX
were omitted, the data item UNIT{COST would appear at the end
of the data item list. The DBCPLUS program displays a message
conrming that the data items are reordered.
>reorder item unit-cost (tax)
Reorder of data items accepted.
>
Refer to \REORDER ITEM" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the data item has been reordered in the
data item list, use the REVIEW ITEMS command. In the following
example, the @ parameter is used to display all the data items in the
ORDERS database. You can see that the data item UNIT{COST
now appears before the data item TAX in the data item list.
>review items @
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
FIRST-NAME
INITIAL
LAST-NAME
I4
Z2
X12
R2
X6
X6
X10
U2
X16
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(14/11)
(14/11)
(14/11)
Changing Data Items
4-13
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
LASTSHIPDATE
ONHANDQTY
DESCRIPTION
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
VENDOR
STORE#
UNIT-COST
TAX
TOTAL
ZIP
Renaming a Data
Item
X6
J2
4U25
J2
X6
I1
X2
X10
X26
X16
8J2
P8
J2
J2
X6
(12/)
(14/12)
(11,14/18)
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(11,12/14)
(/12)
(14/)
(11,14/)
(12,13,14/11)
<---- data item reordered
To rename a data item, use the RENAME ITEM command. In
this section, the data item SUPPLIER in the ORDERS database is
renamed. Before renaming the data item, it looks like this:
Itm No. Item Name
Attrib Security
-----------------------------------------19
SUPPLIER
X16
(12,13/)
In the example below, the data item SUPPLIER is renamed
VENDOR. The DBCPLUS program displays a message conrming
that the data item is renamed.
>rename item supplier vendor
Rename of data item accepted.
>
Refer to \RENAME ITEM" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the data item has been renamed, use the
REVIEW ITEMS command. In the following example, VENDOR is
the new name of the data item to be reviewed:
>review items vendor
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------4-14
Changing Data Items
19
Changing a Data
Item
VENDOR
X16
(12,13/)
Use the CHANGE ITEM command to change data item type, length,
subitem count, security, and order in the data item list. In this
section, the data item DESCRIPTION is changed in the ORDERS
database. Before changing a data item, the REVIEW ITEMS output
looks like this:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
STORE#
TAX
TOTAL
UNIT-COST
ZIP
Note
I4
Z2
X12
R2
X6
X6
X20
X10
U2
X16
X6
J2
J2
X6
I1
X2
U8
X26
X16
8J2
J2
J2
P8
X6
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(0,11,12,13,14,18/)<---- data item to be changed
(14/11)
(14/11)
(14/11)
(12/)
(14/12)
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(11,12/14)
(14/)
(11,14/)
(/12)
(12,13,14/11)
Refer to Table 4-2 for information about data item type conversions
supported by DBChange Plus.
In the example below, the CHANGE ITEM command is used to
change the data item DESCRIPTION. It should appear before
PRICE in the data item list. The subcount is changed to 4, the
data type is changed to U, and the sublength is changed to 25. The
Changing Data Items
4-15
security is changed to allow read access for user classes 11 and 14
and write access for user class 18. The DBCPLUS program displays
messages conrming that the changes are accepted.
4-16
Changing Data Items
>change item description (price) 4 u 25 (11,14/18)
Reorder of data items accepted.
Change of item attributes accepted.
Change of item security accepted.
If the data item length is changed to a smaller number than the
original data item length, the data may truncate or overow the new
eld.
Caution
Refer to \CHANGE ITEM" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the data item DESCRIPTION is changed,
use the REVIEW ITEMS command. In the following example, the
@ parameter is used to display all the data items in the ORDERS
database. You can see that the data item DESCRIPTION now
appears before PRICE in the data item list and that the attributes
and security are changed.
>review items @
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
DESCRIPTION
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
STORE#
I4
Z2
X12
R2
X6
X6
X10
U2
X16
X6
J2
4U25
J2
X6
I1
X2
U8
X26
X16
8J2
(11,12,13,14,18/)
(/13)
(12,13,14/11)
(/14)
(11,12,13,14,18/)
(/14)
(14/11)
(14/11)
(14/11)
(12/)
(14/12)
(11,14/18)
<---- data item changed
(14/)
(11/14)
(/14)
(12,13,14/11)
(11,12,14,18/)
(12,13,14/11)
(12,13/)
(11,12/14)
Changing Data Items
4-17
21
22
23
24
TAX
TOTAL
UNIT-COST
ZIP
Changing Data Item
Attributes
J2
J2
P8
X6
(14/)
(11,14/)
(/12)
(12,13,14/11)
To change the subitem count, the type, and the length of a data
item, use the CHANGE ATTRIBUTES command. CHANGE
ATTRIBUTES and CHANGE ITEM are similar in that they both
change data item attributes. However, CHANGE ITEM also changes
the order of a data item in the data item list and the data item
security. If you only want to change data item attributes, use the
CHANGE ATTRIBUTES command. If you want to change the
data item attributes in conjunction with data item sequence and/or
security changes, use the CHANGE ITEM command.
In this section, the attributes of the data item STOCK# are changed
in the ORDERS database. Before changing the data item attributes,
the REVIEW ITEMS output looks like this:
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------17
Note
STOCK#
U8
(11,12,14,18/)
For information about data item type conversions supported by
DBChange Plus, refer to Table 4-2.
In the example below, the data item STOCK# is changed to type X
with a length of 10. The DBCPLUS program displays a message
conrming that the attribute changes are accepted.
>change attributes stock# x 10
Change of item attributes accepted.
>
Refer to \CHANGE ATTRIBUTES" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the data item attributes are changed, use
the REVIEW ITEMS command. In the following example, STOCK#
is the name of the data item to be reviewed. You can see that the
data item STOCK# is now dened as data type X with a length of
10.
>review items stock#
4-18
Changing Data Items
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------17
STOCK#
X10
(11,12,14,18/)
Changing Data Items
4-19
5
Changing Data Sets
This chapter explains how to change data sets in a TurboIMAGE/XL
database. It provides instructions for and examples of the various
commands used to change data sets. Before reading this chapter, you
should be familiar with the information in chapter 1, \Introduction
to DBChange Plus." To learn to do more DBChange Plus tasks,
refer to chapters 2 through 4 and 6 through 9.
If you understand DBChange Plus tasks and only want to see the
command syntax information, refer to chapter 10, \DBChange Plus
Commands."
Summary of
Commands to
Change Data Sets
DBChange Plus has several commands for changing data sets in the
database. Some deal with several types of data set changes, while
others are specic to data set security or paths. For example, the
ADD SET command deals with the data set name, its type, the order
it appears in the data set list, the key and search items, and so on;
while the ADD PATH command deals only with adding a path to a
detail data set. This chapter covers only those commands that deal
with several types of changes to a data set. For information about
paths and sort items, refer to chapter 6, \Changing Paths in a Detail
Data Set." For information about changing data set security, refer
to chapter 7, \Changing Database Security." Note that some data
item commands can aect elds in a data set, for instance, DELETE
ITEM and RECOVER ITEM. These commands are discussed in
chapter 4, \Changing Data Items," and chapter 10, \DBChange Plus
Commands."
Table 5-1 alphabetically lists the commands that change data sets
and summarizes their functions.
Note
Before invoking any of the following commands, you must log on to
the system as the database creator, run the DBCPLUS program,
and specify the database that you want to restructure. Refer to
chapter 1, \Introduction to DBChange Plus."
The DBChange commands are not actually applied until the
DBAPLUS program is used. Refer to chapter 9, \Applying
Changes to the Database Structure."
Changing Data Sets
5-1
Table 5-1. Summary of Commands to Change Data Sets
Command
ADD
Keyword
Description
FIELD
Adds a eld (data item) to a manual master
or detail data set.
PATH
Adds a path from a detail data set to a
master data set (path command only).
SET
Adds a new master or detail set to the
database.
SORT
Adds a new sort item for a search item. If a
sort item already exists in the data set, the
ADD SORT command replaces the existing
sort item.
CHANGE BLOCKFACTOR Changes the blocking factor of a data set.
BLOCKMAX
Changes the maximum physical block
length of one or more data sets.
CAPACITY
Changes the capacity of a data set.
DEVICECLASS
Changes the device (disk) on which a data
set resides.
PRIMARYPATH Changes the primary path for a detail data
set that has at least two paths (path
command only).
SETSECURITY
DELETE FIELD
Changing Data Sets
Deletes a eld from a manual master or
detail data set.
PATH
Deletes the path from a detail data set to a
master data set (path command only).
SET
Deletes a master or detail data set and its
associated paths from the database.
SETSECURITY
Deletes all security specications from a
master or detail data set (security command
only).
SORT
Deletes a sort item from a search item in a
detail data set.
RECOVERSET
Cancels a data set deletion.
RENAME SET
Renames a data set.
REORDERFIELD
Reorders the eld sequence in a manual
master or detail data set.
SET
5-2
Changes user class access to a data set
(security command only).
Reorders the data set sequence in the
schema data set list.
Helpful TurboIMAGE
Information
Remember the following TurboIMAGE characteristics when making
changes to data sets:
A data set name must be unique within the database. It must
be from 1 to 16 characters long, and the rst character must be
alphabetic.
No more than 199 data sets can exist in a TurboIMAGE database.
Data set capacity must be less than 231 01 (2,147,483,647).
The blocking factor is the number of entries in one block. The
default block size is 512 words, but it may have been redened in
the schema.
When changing the size of an entry, you should reevaluate the data
set blocking factor.
The primary path should be the path most frequently accessed in
the data set. A data set can have only one primary path.
Data sets can reside on dierent disks. The disk on which a data
set resides is the MPE XL device identied by the device class.
For heavily accessed databases, master and detail data sets should
reside on dierent devices.
A eld is a data item within a data set. It must be in the data
item list within the database schema.
A search item is a eld in a detail data set that denes a path to a
key item in a master data set. As many as 16 dierent paths can
be dened for each detail data set, but each search item can dene
only one path. A master data set can be related by its key item to
as many as 16 detail data sets. Search items and key items must
be simple items; that is, their subcount must equal 1.
For more information about TurboIMAGE/XL data sets, refer to the
TurboIMAGE/XL Database Management System Reference Manual .
Changing Data Sets
5-3
Adding a Master
Data Set
To add an automatic or manual master data set to the database,
use the ADD SET command. In this section, the new data set
BINNUM{MASTER is added to the ORDERS database. Before
adding a data set, the REVIEW SETS command output looks like
this:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------1
2
3
4
5
6
DATE-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
INVENTORY
SALES
A
M
M
M
D
D
365
201
300
201
450
500
19
10
16
12
15
10
496
640
498
505
481
371
DISK1
DISK1
DISK1
DISK1
DISK2
DISK2
(14/11,18)
(13,14/12,18)
(13/12,18)
(12,14/13,18)
(11/14,18)
In the example below, the master data set BINNUM{MASTER is
added. It will appear before the INVENTORY data set in the data
set list. BINNUM{MASTER is an automatic master data set. The
key item is BINNUM. Note that the key item must already exist in
the data item list of the database. User class 14 has read access;
user classes 11 and 18 have write access. The data set capacity is
220. The blocking factor is 12, and the device class is DISK1. The
DBCPLUS program displays a message conrming the addition of
the new data set.
>add set binnum-master (inventory) a binnum (14/11,18) 220 (12) disk1
Addition of data set accepted.
>
Refer to \ADD SET" in chapter 10, \DBChange Plus Commands,"
for a detailed description of the command syntax and parameters.
Because TurboIMAGE/XL does not allow stand-alone
automatic master data sets, after adding the master data set
BINNUM{MASTER, you must add a path to connect the automatic
master data set to a detail data set. To do this, use the ADD
PATH command. The example below adds a path from the
detail data set INVENTORY. The search item is STOCK#, and
BINNUM{MASTER is specied as the master data set to which the
detail data set is linked. The DBCPLUS program displays a message
conrming the addition of the path.
>add path inventory stock# binnum-master
Addition of path accepted.
>
5-4
Changing Data Sets
After adding a master data set and a path, the new data set contains
only one eld|the key item. To add more elds, use the ADD
FIELD command discussed later in this chapter. To connect the new
key item to other detail data sets, use the ADD PATH command.
Refer to \ADD PATH" in chapter 6, \Changing Paths in a Detail
Data Set," or in chapter 10, \DBChange Plus Commands."
If you want to verify the addition of the new data set, use the
REVIEW SETS command. In the following example, the @
parameter is used to display all the data sets in the ORDERS
database. You can see that the master data set BINNUM{MASTER
is added.
>review sets @
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------1
2
3
4
5
6
7
* data
DATE-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
BINNUM-MASTER
INVENTORY
SALES
365
201
300
201
220
450
500
19
10
16
12
12
15
10
496
640
498
505
0
481
371
DISK1
DISK1
DISK1
DISK1
DISK1
DISK2
DISK2
(14/11,18)
(13,14/12,18)
(13/12,18)
(14/11,18) <---(12,14/13,18)
(11/14,18)
*
set added
Adding a Detail Data
Set
A
M
M
M
A
D
D
Adding a detail data set is the same as adding a master data set
except that the key item parameter is not used for a detail data
set. To add a search item to a detail data set, use the ADD PATH
command, which is discussed in chapter 6, \Changing Paths in a
Detail Data Set."
Changing Data Sets
5-5
Deleting a Data Set
To delete a master or detail data set and its associated paths from
the database, use the DELETE SET command. In this section, the
data set BINNUM{MASTER is deleted from the ORDERS database.
Before deleting the data set, the REVIEW SETS command output
looks like this:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------1
2
3
4
5
6
7
* data
DATE-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
BINNUM-MASTER
INVENTORY
SALES
A
M
M
M
A
D
D
365
201
300
201
220
450
500
19
10
16
12
12
15
10
496
640
498
505
145
640
371
DISK1
DISK1
DISK1
DISK1
DISK1
DISK2
DISK2
(14/11,18)
(13,14/12,18)
(13/12,18)
(14/11,18) <---(12,14/13,18)
(11/14,18)
*
set to be deleted
In the example below, the data set BINNUM{MASTER is deleted.
In an interactive session, a message is displayed asking you to conrm
the deletion of the data set. In batch mode (as shown below), the
data set is deleted without conrmation. The DBCPLUS program
displays a message conrming the deletion of the data set.
>delete set binnum-master
Deletion of data set accepted.
>
Note
If you delete all detail data sets that are connected to an automatic
master data set, the automatic master data set to which they are
connected is also deleted.
Refer to \DELETE SET" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
5-6
Changing Data Sets
If you want to verify the deletion of the data set, use the REVIEW
SETS command. In the following example, the @ parameter is used
to display all the data sets in the ORDERS database. You can see
that the data set BINNUM{MASTER is deleted.
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------1
2
3
4
5
6
* data
DATE-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
INVENTORY
SALES
A
M
M
M
D
D
365
201
300
201
450
500
19
10
16
12
15
10
496
640
498
505
640
371
DISK1
DISK1
DISK1
DISK1
DISK2
DISK2
(14/11,18)
(13,14/12,18)
(13/12,18) <---(12,14/13,18)
(11/14,18)
*
set deleted
Recovering a Data
Set
In the previous example, you deleted the data set BINNUM{
MASTER from the ORDERS database. To recover it, use the
RECOVER SET command.
The position in the data set list where the recovered data set is
placed depends on whether the original data set was actually part of
the database or whether it was only stored in the change le. (A
data set is only stored in the change le when it has been added
by the DBCPLUS program but DBAPLUS has not yet been used
to apply it to the database.) If the DBAPLUS program has not
yet been run, then the recovered data set is inserted at the end of
the data set list. If the original data set was actually part of the
database, then it is reinserted in its original place in the data set list.
(If you need to change the order of the data sets, use the REORDER
SET command. Refer to \Reordering a Data Set" later in this
chapter.)
Note
Once you run the DBAPLUS program, you cannot recover a
deleted data set.
If you delete a data set and then add a new data set with the same
name, you cannot recover the original data set.
In the following example, the data set BINNUM{MASTER is
recovered. The DBCPLUS program returns a message conrming
recovery of the deleted data set.
>recover set binnum-master
Changing Data Sets
5-7
Recovery of data set accepted.
>
Refer to \RECOVER SET" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
5-8
Changing Data Sets
If you want to verify the recovery of the deleted data set, use
the REVIEW SETS command. In the following example, the @
parameter is used to display all the data sets in the ORDERS
database. Because the data set BINNUM{MASTER was in the
change le and the DBAPLUS program had not been run, the data
set is inserted at the end of the data set list. The path connecting
the master data set BINNUM{MASTER to the detail data set
INVENTORY cannot be recovered. You must specically add a path
back in to the data set using the ADD PATH command.
>review sets @
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------1
2
3
4
5
6
7
* data
DATE-MASTER
A 365
19 496 DISK1
CUSTOMER
M 201
10 640 DISK1
PRODUCT
M 300
16 498 DISK1
SUP-MASTER
M 201
12 505 DISK1
INVENTORY
D 450
15 481 DISK2
SALES
D 500
10 371 DISK2
BINNUM-MASTER
A 220
12 0
DISK1
No paths defined for auto master set (DBC 548).
No fields defined for data set (DBC 547).
*
set recovered
Reordering a Data
Set
(14/11,18)
(13,14/12,18)
(13/12,18)
(12,14/13,18)
(11/14,18)
(14/11,18) <----
To reorder the sequence of data sets in the data set list, use
the REORDER SET command. In this section, the data set
BINNUM{MASTER in the ORDERS database is reordered. Before
reordering the data set, the REVIEW SETS command output looks
like this:
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------1
2
3
4
DATE-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
A
M
M
M
365
201
300
201
19
10
16
12
496
640
498
505
DISK1
DISK1
DISK1
DISK1
(14/11,18)
(13,14/12,18)
(13/12,18)
Changing Data Sets
5-9
5
6
7
*
5-10
INVENTORY
SALES
BINNUM-MASTER
data set to be reordered
Changing Data Sets
D
D
A
450
500
220
15
10
12
481
371
0
DISK2
DISK2
DISK1
(12,14/13,18)
(11/14,18)
(14/11,18) <----
*
In the example below, the data set BINNUM{MASTER is reordered
to appear before the data set CUSTOMER in the data set list.
(When the nextset parameter is omitted, the data set appears at the
end of the data set list.) The DBCPLUS program displays a message
conrming that the data sets are reordered.
>reorder set binnum-master customer
Reorder of data set accepted.
>
Refer to \REORDER SET" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
To verify that the data sets are reordered, use the REVIEW SETS
command. In the following example, the @ parameter is used to
display all the data sets in the ORDERS database. You can see that
the data set BINNUM{MASTER now appears before the data set
CUSTOMER in the data set list.
>review sets @
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------1
2
3
4
5
6
7
* data
DATE-MASTER
BINNUM-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
INVENTORY
SALES
A
A
M
M
M
D
D
365
220
201
300
201
450
500
19
12
10
16
12
15
10
496
0
640
498
505
481
371
DISK1
DISK1
DISK1
DISK1
DISK1
DISK2
DISK2
(14/11,18) <---(14/11,18)
(13,14/12,18)
(13/12,18)
(12,14/13,18)
(11/14,18)
*
set reordered
Changing Data Sets
5-11
Renaming a Data
Set
To give a new name to a data set, use the RENAME SET command.
In this section, the detail data set SALES in the ORDERS database
is renamed. Before renaming the data set, the REVIEW SETS
command output looks like this:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------7
* data
SALES
D
500
10
1024 DISK2
(11/14,18) <----
*
set to be renamed
In the following example, the data set SALES is renamed to
LOCAL{SALES. The DBCPLUS program displays a message
conrming that the data set is renamed.
>rename set sales local-sales
Rename of data set accepted.
>
Refer to \RENAME SET" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the SALES data set has been renamed, use
the REVIEW SETS command. You can see that the new data set
name is LOCAL{SALES.
>review sets local-sales
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------7
* data
5-12
LOCAL-SALES
set renamed
Changing Data Sets
D
500
10
1024 DISK2
(11/14,18) <----
*
Changing the
Capacity of a Data
Set
To change the capacity of a data set, use the CHANGE CAPACITY
command.
When you change the capacity of a data set, the DBCPLUS program
checks to see if the new capacity is greater than or less than the
high-water mark. The high-water mark is the greatest number of
entries the data set has ever contained.
If the new capacity is greater than the high-water mark, the
capacity is changed as specied. If the new capacity is less than the
high-water mark, use the REPACK SET command to change the
capacity. To learn more about repacking data sets, refer to chapter
8, \Maintaining the Database," or \REPACK SET" in chapter 10,
\DBChange Plus Commands."
To automatically adjust data set capacities, use the CONTROL
command with the NEWFULL parameter. Refer to \CONTROL" in
chapter 10, \DBChange Plus Commands."
In this section, the capacity of the detail data set INVENTORY
is changed. Before changing the capacity, the REVIEW SETS
command output looks like this:
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------6
INVENTORY
* capacity
D 450
15
640 DISK2
(12,14/13,18)<----
*
to be changed
In the example below, the capacity of the detail data set
INVENTORY is changed from 450 to 510. The DBCPLUS program
displays a message conrming that the change of capacity is
accepted.
>change capacity inventory 510
Change of set capacity, block factor, and/or device class accepted.
>
Refer to \CHANGE CAPACITY" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
Note
The capacity must be a number that can be evenly divided by the
blocking factor. If you change the capacity to a number that cannot
be evenly divided by the blocking factor, DBSCHEMA (called by the
DBAPLUS program) adjusts the specied capacity to the nearest
multiple of the blocking factor. For example, if you specify a capacity
of 503, but the blocking factor is 15, the capacity is automatically
Changing Data Sets
5-13
changed to 510, which can be evenly divided by 15. Note, however,
that if the REVIEW SETS or REVIEW BLOCKS command is used
before invoking the DBAPLUS program, the specied capacity,
rather than the actual adjusted capacity, is displayed.
5-14
Changing Data Sets
If you want to verify that the capacity of the data set INVENTORY
is changed, use the REVIEW SETS command as follows. You can
see that the capacity is now 510.
>review sets inventory
Fld Pth Entr Med
Blk Blk Blk
Data Set Name
Type Cnt Cnt Len Rec Capacity Fac Len Max
----------------------------------------------------------------INVENTORY
* capacity
D
7
4 24
40
510
15
601 640 <----
*
changed
Changing the
Blocking Factor of a
Data Set
To change the blocking factor of a data set, use the CHANGE
BLOCKFACTOR command. In this section, the blocking factor is
changed for the data set INVENTORY. Before changing the blocking
factor, the REVIEW BLOCKS command output looks like this:
Fld Pth Entr Med
Blk Blk Blk
Data Set Name
Type Cnt Cnt Len Rec Capacity Fac Len Max
----------------------------------------------------------------INVENTORY
* blocking
D
7
4 24
40
510
15
481 1024 <----
*
factor to be changed
In the example below, the blocking factor for the detail data set
INVENTORY is changed from 15 to 12. The DBCPLUS program
displays a message conrming that the blocking factor is changed.
>change blockfactor inventory 12
Change of set capacity, block factor, and/or device class accepted.
>
Refer to \CHANGE BLOCKFACTOR" in chapter 10, \DBChange
Plus Commands," for a detailed description of the command syntax
and parameters.
Note
The blocking factor must be a number that can be evenly divided
into the capacity. If you change the blocking factor to a number that
cannot be evenly divided into the capacity, DBChange Plus will
Changing Data Sets
5-15
adjust the capacity to a multiple of the new blocking factor closest to
the current capacity.
5-16
Changing Data Sets
If you want to verify that the blocking factor is changed, use the
REVIEW BLOCKS command as in the following example. You can
see that the blocking factor for the data set INVENTORY is now 12.
>review blocks inventory
REVIEW BLOCKS:
Fld Pth Entr Med
Blk Blk Blk
Data Set Name
Type Cnt Cnt Len Rec Capacity Fac Len Max
----------------------------------------------------------------INVENTORY
* blocking
D
7
4 24
40
510
12
481 481 <----
*
factor changed
Changing the
Maximum Block
Length of a Data Set
To change the maximum physical block length of a data set, use the
CHANGE BLOCKMAX command. The block length is in words. In
this section, the maximum block length of all the data sets in the
ORDERS database is changed. Before changing the maximum block
length, the REVIEW BLOCKS command output looks like this:
Fld Pth Entr Med
Blk Blk Blk
Data Set Name
Type Cnt Cnt Len Rec Capacity Fac Len Max
----------------------------------------------------------------DATE-MASTER
BINNUM-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
INVENTORY
SALES
* maximum
A
A
M
M
M
D
D
1
1
8
2
5
7
8
3
1
1
2
1
4
4
3
1
41
14
31
24
21
26
12
52
31
42
40
37
365
220
201
300
201
510
500
19
12
10
16
12
12
10
496
145
521
498
505
481
371
496<---145
640
498
505
481
371
*
block length for all data sets to be changed
In the example below, the maximum block length for all the data
sets is changed by specifying the rst and last data sets in the range.
DATE{MASTER is the rst data set in the range; SALES is the last
data set in the range. The maximum block length changes for all the
data sets between DATE{MASTER and SALES in the data set list.
The new maximum block length for all the data sets is 1024. The
DBCPLUS program displays a message conrming that the data set
block length has been changed.
Changing Data Sets
5-17
>change blockmax date-master sales 1024
Change of maximum blocksize accepted.
>
5-18
Changing Data Sets
The range specied must reect the current order of the data sets;
that is, if the REORDER SET command was used prior to the
CHANGE BLOCKMAX command, the range of the data sets must
reect the new order. To verify the data set order, use the REVIEW
BLOCKS command.
Note
Refer to \CHANGE BLOCKMAX" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
You can change the maximum block length for a single data set by
using only one data set name in the command syntax. If you want to
change the maximum block length for multiple data sets, but don't
want to specify a range, you must issue the CHANGE BLOCKMAX
command for each data set.
If you want to verify that the maximum block length is changed, use
the REVIEW BLOCKS command as shown below. The @ parameter
is used to display all the data sets in the ORDERS database. You
can see that all the data sets now have a block length of 1024.
>review blocks @
REVIEW BLOCKS:
Fld Pth Entr Med
Blk Blk Blk
Data Set Name
Type Cnt Cnt Len Rec Capacity Fac Len Max
----------------------------------------------------------------DATE-MASTER
BINNUM-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
INVENTORY
SALES
* maximum
A
A
M
M
M
D
D
1
1
8
2
5
7
8
3
1
1
2
1
4
4
3
1
41
14
31
24
21
26
12
52
31
42
40
37
365
220
201
300
201
510
500
19
12
10
16
12
12
10
496
145
521
498
505
481
371
1024 <---1024
1024
1024
1024
1024
1024
*
block length for all data sets changed
Changing Data Sets
5-19
Changing the Device
Class of a Data Set
To change the device on which a data set resides, use the CHANGE
DEVICECLASS command. The CHANGE DEVICECLASS
command actually moves the data set. In this section, a dierent
device class is specied for the data set SUP{MASTER in the
ORDERS database. Before changing the device class, the REVIEW
SETS command output looks like this:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------5
* device
SUP-MASTER
M
201
12
1024 DISK1
(13/12,18) <----
*
class to be changed
In the example below, the device class is changed from DISK1 to
DISK2. The DBCPLUS program displays a message conrming that
the device class has been changed.
>change deviceclass sup-master disk2
Change of set capacity, block factor, and/or device class accepted.
>
Refer to \CHANGE DEVICECLASS" in chapter 10, \DBChange
Plus Commands," for a detailed description of the command syntax
and parameters.
If you want to verify that the device class for the SUP{MASTER
data set is changed, use the REVIEW SETS command as follows.
You can see that the device class is now DISC2.
>review sets sup-master
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------5
* device
5-20
SUP-MASTER
class changed
Changing Data Sets
M
201
12
1024 DISK2
(13/12,18) <----
*
Adding a Field to a
Data Set
To add a eld to a manual master or detail data set, use the ADD
FIELD command. In this section, the eld STORE# is added to the
INVENTORY data set in the ORDERS database. Before adding the
eld, the REVIEW FIELDS output like this:
Data Set No.:
6
Name: INVENTORY
Type: D
Fld No. Field Name
Pr Sr So Master Set Name Sort Item Name
-------------------------------------------------------------------1
2
3
4
5
6
STOCK#
ONHANDQTY
SUPPLIER
UNIT-COST
LASTSHIPDATE
BINNUM
Y
Y
PRODUCT
Y
SUP-MASTER <---- eld to be added here
Y
Y
DATE-MASTER
BINNUM-MASTER
In the example below, the eld STORE# is added to the
INVENTORY data set. It should appear before the eld SUPPLIER
in the eld list of the data set. When adding a eld to a data set,
the new eld must already exist as a data item in either the current
change le or in the database. The DBCPLUS program displays a
message conrming the addition of the new eld.
>add field inventory store# supplier
Addition of field accepted.
>
Refer to \ADD FIELD" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax.
To add a search item to a detail data set, use the ADD PATH
command, which is discussed in chapter 6, \Changing Paths in a
Detail Data Set," and chapter 10, \DBChange Plus Commands."
If you want to verify the addition of the new eld, use the REVIEW
FIELDS command. In the following example, you can see that the
eld STORE# is added to the data set INVENTORY:
>review fields inventory
REVIEW FIELDS (DETAIL SET):
Data Set No.: 6
Name: INVENTORY
Type: D
Fld No. Field Name
Pr Sr So Master Set Name Sort Item Name
-------------------------------------------------------------------1
STOCK#
Y
PRODUCT
Changing Data Sets
5-21
2
3
4
5
6
7
ONHANDQTY
STORE#
SUPPLIER
UNIT-COST
LASTSHIPDATE
BINNUM
Y
Y
SUP-MASTER
Y
Y
DATE-MASTER
BINNUM-MASTER
<---- eld added
To delete a eld from a manual master or detail data set,
use the DELETE FIELD command. In this section, the eld
CREDIT{RATING is deleted from the master data set CUSTOMER
in the ORDERS database. Before deleting the eld, the REVIEW
FIELDS output looks like this:
Deleting a Field
from a Data Set
Data Set No.:
3
Name: CUSTOMER
Type: M
Fld No. Field Name
Detail Set Name Path's Search Item
--------------------------------------------------------------1
2
3
4
5
6
7
8
9
ACCOUNT
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
ZIP
CREDIT-RATING
SALES
ACCOUNT
<---- eld to be deleted
In the example below, the eld CREDIT{RATING is deleted from
the data set CUSTOMER. In an interactive session, a message is
displayed asking you to conrm the deletion of the eld. In batch
mode, the data set is deleted without conrmation. If you attempt
to delete a eld that is also a search item, you must rst delete
the path. If you attempt to delete a eld that is a sort item in any
data set, you must rst delete the sort item. Refer to chapter 6,
\Changing Paths in a Detail Data Set," for more information. The
DBCPLUS program displays a message conrming that the eld is
deleted.
>delete field customer credit-rating
Deletion of field accepted.
>
Refer to \DELETE FIELD" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
5-22
Changing Data Sets
Caution
Once you have deleted a eld, it cannot be recovered from the change
le; you must use the ADD FIELD command to add it back in to the
data set. However, if the eld contained data before it was deleted,
the data cannot be recovered.
Changing Data Sets
5-23
If you want to verify the deletion of the eld, use the REVIEW
FIELDS command. In the following example, you can see that
the eld CREDIT{RATING no longer appears in the data set
CUSTOMER eld list:
>review fields customer
REVIEW FIELDS (MASTER SET):
Data Set No.:
3
Name: CUSTOMER
Type: M
Fld No. Field Name
Detail Set Name Path's Search Item
--------------------------------------------------------------1
2
3
4
5
6
7
8
Reordering a Field
in a Data Set
Data Set No.:
ACCOUNT
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
ZIP
SALES
ACCOUNT
<---- eld deleted
To reorder the eld list sequence in a manual master or detail data
set, use the REORDER FIELD command. In this section, the
elds in the data set INVENTORY in the ORDERS database are
reordered. Before reordering, the REVIEW FIELDS output looks
like this:
6
Name: INVENTORY
Type:
D
Fld No. Field Name
Pr Sr So Master Set Name Sort Item Name
-------------------------------------------------------------------1
2
3
4
5
6
7
5-24
STOCK#
ONHANDQTY
STORE#
SUPPLIER
UNIT-COST
LASTSHIPDATE
BINNUM
Changing Data Sets
Y
Y
PRODUCT
Y
SUP-MASTER
Y
Y
DATE-MASTER
BINNUM-MASTER
<---- eld to be reordered
In the example below, the eld BINNUM is reordered to appear
before the eld ONHANDQTY in the eld list. The DBCPLUS
program displays a message conrming that the elds are reordered.
>reorder field inventory binnum onhandqty
Reorder of fields accepted.
>
To verify that the elds in the INVENTORY data set are reordered,
use the REVIEW FIELDS command as shown below. You can see
that the eld BINNUM now appears before the eld ONHANDQTY
in the eld list.
>review fields inventory
REVIEW FIELDS (DETAIL SET):
Data Set No.: 6
Name: INVENTORY
Type: D
Fld No. Field Name
Pr Sr So Master Set Name Sort Item Name
-------------------------------------------------------------------1
2
3
4
5
6
7
STOCK#
BINNUM
ONHANDQTY
STORE#
SUPPLIER
UNIT-COST
LASTSHIPDATE
Adding a Sort Item
to a Detail Data Set
Y
Y
Y Y
Y
PRODUCT
BINNUM-MASTER
<---- eld reordered
SUP-MASTER
DATE-MASTER
To add a sort item to a search item in a detail data set, use the ADD
SORT command. The sort item must already be a eld in the data
set. In this section, a new sort item is added to the INVENTORY
detail data set of the ORDERS database. Before adding a sort item,
the REVIEW PATHS command output looks like this:
DATA SET NO: 6
NAME: INVENTORY
SEARCH ITEM NAME
================
MASTER SET NAME
================
STOCK#
SUPPLIER
LASTSHIPDATE
PRODUCT
SUP-MASTER
DATE-MASTER
TYPE: D
SORT ITEM NAME
================
PRIMARY
=======
Y
>
Changing Data Sets
5-25
In the example below, INVENTORY is the name of the detail data
set that will contain the sort item. SUPPLIER is the name of the
search item whose like values will be sorted based on the new sort
item values. LASTSHIPDATE is the name of the new sort item. The
DBCPLUS program displays a message conrming the addition of
the new sort item.
>add sort inventory supplier lastshipdate
New sort item added.
>
Refer to \ADD SORT" in chapter 10, \DBChange Plus Commands,"
for a detailed description of the command syntax and parameters.
If you want to verify the addition of the sort item, use the
REVIEW PATHS command. In the following example, you can
see that LASTSHIPDATE is now the sort item for the search item
SUPPLIER:
>review paths inventory
DATABASE NAME: ORDERS
REVIEW PATHS (FOR DETAIL DATA SET):
DATA SET NO: 6
TYPE: D
SEARCH ITEM NAME
================
MASTER SET NAME
================
SORT ITEM NAME
================
STOCK#
SUPPLIER
LASTSHIPDATE
PRODUCT
SUP-MASTER
DATE-MASTER
LASTSHIPDATE
* LASTSHIPDATE
>
5-26
NAME: INVENTORY
Changing Data Sets
PRIMARY
=======
is now the sort item for the search item SUPPLIER.
Y <----
*
Deleting a Sort Item
from a Detail Data
Set
To remove a sort item from a search item in a detail data set,
use the DELETE SORT command. In this section, a sort item is
removed from the search item SUPPLIER in the detail data set
INVENTORY. Before deleting the sort item, the REVIEW PATHS
command output looks like this:
DATA SET NO: 6
NAME: INVENTORY
TYPE: D
SEARCH ITEM NAME
================
MASTER SET NAME
================
SORT ITEM NAME
================
STOCK#
SUPPLIER
LASTSHIPDATE
PRODUCT
SUP-MASTER
DATE-MASTER
LASTSHIPDATE
PRIMARY
=======
Y
>
In the example below, INVENTORY is the name of the data set
containing the sort item to be deleted. SUPPLIER is the name of the
search item containing the sort item to be deleted. This command
does not delete the LASTSHIPDATE eld from the data set; it only
removes its role as a sort item. The DBCPLUS program displays a
message conrming the deletion of the sort item.
>delete sort inventory supplier
Deletion of sort item accepted.
>
Refer to \DELETE SORT" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify the deletion of the sort item, use the REVIEW
PATHS command. In the following example, you can see that
LASTSHIPDATE sort item is deleted:
>review paths inventory
DATABASE NAME: ORDERS
REVIEW PATHS (FOR DETAIL DATA SET):
DATA SET NO: 6
NAME:
INVENTORY
SEARCH ITEM NAME
================
MASTER SET NAME
================
STOCK#
SUPPLIER
PRODUCT
SUP-MASTER
TYPE: D
SORT ITEM NAME
================
PRIMARY
=======
Y
<----
Changing Data Sets
*
5-27
LASTSHIPDATE
* The
sort item LASTSHIPDATE has been deleted from the data set.
>
5-28
DATE-MASTER
Changing Data Sets
6
Changing Paths in a Database
This chapter explains how to change paths in a TurboIMAGE/XL
database. It provides instructions for and examples of the commands
used to change paths. Before reading this chapter, you should
be familiar with the information in chapter 1, \Introduction to
DBChange Plus." To learn how to do more DBChange Plus tasks,
refer to chapters 2 through 5 and 7 through 9. If you understand
DBChange Plus tasks and only want to see command syntax
information, refer to chapter 10, \DBChange Plus Commands."
DBChange Plus provides specic commands to change paths in a
database. Table 6-1 alphabetically lists the commands that change
paths and summarizes their functions:
Summary of
Commands to
Change Paths
Table 6-1. Summary of Commands to Change Paths
Command
Keyword
Description
ADD
PATH
Adds a path from a detail data set to a master data
set.
CHANGE
PRIMARYPATH
Redenes the primary path of a detail data set with
at least two paths.
DELETE
PATH
Deletes a path from a detail data set.
Note
Before invoking any of the following commands, you must log on to
the system as the database creator, run the DBCPLUS program,
and specify the database for which you want to change paths.
Refer to chapter 1, \Introduction to DBChange Plus."
The commands are not actually applied until the DBAPLUS
program is used. Refer to chapter 9, \Applying Changes to the
Database Structure."
Paths can only be added, redened, or deleted from a detail data
set. For example, paths to a manual master data set must be
added through the related detail data set.
Changing Paths in a Database
6-1
Remember the following TurboIMAGE/XL characteristics when
changing paths:
A search item is a data item in a detail data set that denes a path
to a related master data set. As many as 16 dierent paths can be
dened for each detail data set, but each search item can dene
only one path. A master data set can be related to as many as 16
detail data sets. A search item must be a simple item (subitem
count equals 1).
A sort item must be a data item of type U, K, or X. The same
item cannot be both a search item and a sort item for the same
path.
The primary path should be the most frequently accessed path in
the data set. A data set can have only one primary path.
Master key items and detail search items must be the same
subtype and sublength.
Only one key item is allowed for each master data set.
Helpful
TurboIMAGE/XL
Information
For more information, refer to the TurboIMAGE/XL Database
Management System Reference Manual.
Adding a Path to a
Detail Data Set
To add a path linking a detail data set to a master data set, use the
ADD PATH command. In this section, a new path is added to the
SALES detail data set of the ORDERS database. Before adding a
path, the REVIEW PATHS command ouput looks like this:
DATA SET NO: 4
NAME: SALES
TYPE: D
SEARCH ITEM NAME
================
MASTER SET NAME
================
SORT ITEM NAME
================
ACCOUNT
STOCK#
PURCH-DATE
DELIV-DATE
CUSTOMER
PRODUCT
DATE-MASTER
DATE-MASTER
PURCH-DATE
PRIMARY
=======
Y
>
Note
6-2
When adding a path, remember that the master data set must
appear before the detail data set in the data set list in the schema.
To do this, use the REORDER SET command. Refer to chapter 10,
\DBChange Plus Commands," for information about the REORDER
SET command.
Changing Paths in a Database
In the example below, SALES is the name of the detail data set that
will contain the new search item. FILL{DATE is the name of the
search item for the new path. The exclamation point (!) indicates
that the new path is to be the primary path. DATE{MASTER is the
name of the master data set containing the key item to be related to
the search item. STOCK# is the name of the sort item for the new
path. DBChange returns a message conrming the addition of the
new path.
>add path sales fill-date !date-master stock#
Addition of path accepted.
>
Refer to \ADD PATH" in chapter 10, \DBChange Plus Commands"
for a detailed description of the command syntax and parameters.
If you want to verify the addition of the path, use the REVIEW
PATHS command. In the following example, you can see that
FILL{DATE is now the search item for the new primary path to the
data set DATE{MASTER:
>review paths sales
DATABASE NAME: ORDERS
REVIEW PATHS (FOR DETAIL DATA SET):
DATA SET NO: 4
NAME: SALES
TYPE: D
SEARCH ITEM NAME
================
MASTER SET NAME
================
SORT ITEM NAME
================
ACCOUNT
STOCK#
PURCH-DATE
DELIV-DATE
FILL-DATE
CUSTOMER
PRODUCT
DATE-MASTER
DATE-MASTER
DATE-MASTER
PURCH-DATE
*
STOCK#
PRIMARY
=======
Y <----
*
FILL-DATE is now the search item for the primary path to the
DATE{MASTER data set. STOCK# is the sort item.
Changing Paths in a Database
6-3
Redefining the
Primary Path in a
Detail Data Set
To redene the primary path in a detail data set containing two or
more paths, use the CHANGE PRIMARYPATH command. In this
section, a new primary path is redened in the INVENTORY detail
data set of the ORDERS database. Before redening a primary path,
the REVIEW PATHS command output looks like this:
DATA SET NO:
6
NAME: INVENTORY
TYPE: D
SEARCH ITEM NAME
================
MASTER SET NAME
================
SORT ITEM NAME
================
STOCK#
SUPPLIER
LASTSHIPDATE
PRODUCT
SUP-MASTER
DATE-MASTER
LASTSHIPDATE
PRIMARY
=======
Y <----
*
>
* Supplier
is currently the search item for the primary path.
In the example below, INVENTORY is the name of the detail
data set containing the primary path to be redened. STOCK#
is the search item for the new primary path. Note that the search
item must already be an existing data item in the data set. The
DBCPLUS program displays a message conrming redenition of the
primary path.
>change primarypath inventory stock#
Redefinition of primary path accepted.
>
Refer to \CHANGE PRIMARYPATH" in chapter 10, \DBChange
Plus Commands," for a detailed description of the command syntax
and parameters.
If you want to verify that the primary path is changed, use the
REVIEW PATHS command. In the following example, you can see
that the primary path is changed to the path whose search item is
STOCK#:
6-4
Changing Paths in a Database
>review paths inventory
DATABASE NAME: ORDERS
REVIEW PATHS (FOR DETAIL DATA SET):
DATA SET NO: 6
NAME:
INVENTORY
SEARCH ITEM NAME
================
MASTER SET NAME
================
STOCK#
SUPPLIER
LASTSHIPDATE
PRODUCT
SUP-MASTER
DATE-MASTER
* STOCK#
TYPE: D
SORT ITEM NAME
================
LASTSHIPDATE
PRIMARY
=======
Y <----
*
is now the search item for the primary path.
>
Deleting a Path from
a Detail Data Set
To delete a path from a detail data set, use the DELETE PATH
command. In this section, the path associated with the FILL{DATE
search item is deleted from the SALES detail data set in the
ORDERS database. Note that the search item is not actually deleted
from the data set; however, it is no longer a search item. Before
deleting the path, the REVIEW PATHS command output looks like
this:
DATA SET NO: 4
NAME: SALES
TYPE: D
SEARCH ITEM NAME
================
MASTER SET NAME
================
SORT ITEM NAME
================
ACCOUNT
STOCK#
PURCH-DATE
DELIV-DATE
FILL-DATE
CUSTOMER
PRODUCT
DATE-MASTER
DATE-MASTER
DATE-MASTER
PURCH-DATE
* The
STOCK#
PRIMARY
=======
Y <----
*
path associated with the search item FILL{DATE will be deleted.
>
In the example below, SALES is the name of the data set containing
the path to be deleted. FILL{DATE is the search item associated
with the path to be deleted. DBChange displays a message
conrming the deletion of the path.
Changing Paths in a Database
6-5
>delete path sales fill-date
Deletion of path accepted.
>
Refer to \DELETE PATH" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify the deletion of a path, use the REVIEW
PATHS command. In the following example, you can see that the
path associated with the FILL{DATE search item is deleted:
>review paths sales
DATABASE NAME: ORDERS
REVIEW PATHS (FOR DETAIL DATA SET):
DATA SET NO: 4
NAME: SALES
TYPE: D
SEARCH ITEM NAME
================
MASTER SET NAME
================
SORT ITEM NAME
================
ACCOUNT
STOCK#
PURCH-DATE
DELIV-DATE
CUSTOMER
PRODUCT
DATE-MASTER
DATE-MASTER
PURCH-DATE
*
PRIMARY
=======
Y
<----
*
The path associated with the search item FILL{DATE has been
deleted from the data set.
>
Note
6-6
After deleting a primary path, DBChange Plus automatically
designates the path associated with the rst search key in the detail
data set as the new primary path. To change this, use the CHANGE
PRIMARYPATH command discussed earlier in this chapter.
Changing Paths in a Database
7
Changing Database Security
This chapter explains how to change user access to a
TurboIMAGE/XL database. It provides instructions for and
examples of the commands used to change user access. Before
reading this chapter, you should be familiar with the information
in the chapter 1, \Introduction to DBChange Plus." To learn how
to do more DBChange Plus tasks, refer to chapters 2 through 6, 8,
and 9. If you understand DBChange Plus tasks and only want to see
command syntax information, refer to chapter 10, \DBChange Plus
Commands."
Summary of
Commands to
Change Database
Security
DBChange Plus provides specic commands to change and review
database security. Some deal only with database security, while
others are multipurpose commands. For example, CHANGE
ITEMSECURITY only makes changes to data item security; while
CHANGE ITEM includes other data item changes in addition to
data item security. If you are making several changes to a data
item, then CHANGE ITEM is a more ecient command than
CHANGE ITEMSECURITY. However, if you are making only
data item security changes, then CHANGE ITEMSECURITY is a
better choice. This chapter discusses only those commands that deal
specically with security. For more information about how to use
multipurpose commands, refer to chapter 4, \Changing Data Items,"
or chapter 5,\Changing Data Sets."
Table 7-1 alphabetically lists all DBChange commands that involve
database security and summarizes their functions.
Note
Before invoking any of the following commands, you must log on to
the system as the database creator, run the DBCPLUS program,
and specify the database for which you want to change security.
Refer to chapter 1, \Introduction to DBChange Plus."
The commands are not actually applied until the DBAPLUS
program is used. Refer to chapter 9, \Applying Changes to the
Database Structure."
Changing Database Security
7-1
Table 7-1. Summary of Commands to Change Database Security
Command
ADD
CHANGE
DELETE
PRINT
Keyword
ITEM
Adds a data item to the database. (Multipurpose
command.)
PASSWORD
Adds a password and user class number to the
database.
SET
Adds a new master or detail data set to the
database. (Multipurpose command.)
ITEM
Changes the type, length, subcount, security, and/or
order of a data item. (Multipurpose command.)
ITEMSECURITY
Changes user class access to a data item.
PASSWORD
Changes a password.
SETSECURITY
Changes user class access to a data set.
ITEM
Deletes a data item and all associated elds and
paths from the database.
ITEMSECURITY
Deletes all security specications from a data item.
PASSWORD
Deletes a password and its associated user class from
the database.
SET
Deletes a data set and all associated paths from the
database. (Multipurpose command.)
SETSECURITY
Deletes all security specications from a data set.
SCHEMA
Prints the database schema including changes.
(Multipurpose command.)
RECOVER ITEM
SET
7-2
Description
Changing Database Security
Cancels a data item deletion. (Multipurpose
command.)
Cancels a data set deletion. (Multipurpose
command.)
Helpful
TurboIMAGE/XL
Information
Remember the following TurboIMAGE/XL characteristics when
making changes to the database security:
A password is associated with a user class number from 1 to 63 in
the schema. This number is used in the schema read/write lists to
dene data item and data set access for the password.
A password must be from 1 to 8 ASCII characters, excluding
carriage returns, slashes, semicolons, and blanks. Passwords,
unlike other TurboIMAGE/XL elements, are case sensitive. This
means that the password ship-rec is not the same as the password
SHIP{REC.
The user class number and the password must be unique for the
database.
If a user does not enter a password or enters an invalid password,
TurboIMAGE/XL assigns user class 0. By default, user class 0 is
assigned read-only access to any data items or data sets that do
not have specic read/write lists.
If write access is assigned, read access is assumed. This is true for
both data items and data sets.
If write access is assigned to a data set, read and write access is
given to all items in the set. Data item security is not checked.
If read access is assigned to a data set, data item security is
checked to determine access to items in the set. If write access is
assigned at the item level, updates are allowed to the data item.
Otherwise, read access is granted.
If the user class is omitted at the item level, no access is allowed.
For more information about database security, refer to the
TurboIMAGE/XL Database Management System Reference Manual .
Adding a Password
to the Database
To add a password and its associated user class to the database, use
the ADD PASSWORD command. In this section, a new password
is added to the ORDERS database. Before adding a password, the
REVIEW PASSWORDS command output looks like this:
User Class
Password
----------------------11
12
13
14
18
CREDIT
BUYER
SHIP-REC
CLERK
DO-ALL
>
Changing Database Security
7-3
In the example below, the password MANAGER and its associated
user class 15 are added to the ORDERS database. (Remember that
passwords are case sensitive.) The DBCPLUS program returns a
message conrming the addition of the user class and password.
>add password MANAGER 15
Addition of user class and password accepted.
>
Refer to \ADD PASSWORD" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the password and user class are entered
correctly, use the REVIEW PASSWORDS command. In the
following example, you can see that user class 15 and its associated
password MANAGER are added to the ORDERS database:
>review passwords
REVIEW PASSWORDS:
User Class
Password
----------------------11
12
13
14
15
18
*
Changing a
Password in the
Database
CREDIT
BUYER
SHIP-REC
CLERK
MANAGER
DO-ALL
*
The new password MANAGER and its associated user class 15 have
been added and are automatically inserted in numerial order by user
class in the password list.
To change a password, use the CHANGE PASSWORD command. In
this section, a password is changed in the ORDERS database. Before
changing a password, the REVIEW PASSWORDS command output
looks like this:
User Class
Password
----------------------11
12
13
14
15
18
7-4
<----
Changing Database Security
CREDIT
BUYER
SHIP-REC
CLERK
MANAGER
DO-ALL
>
Changing Database Security
7-5
In the example below, the password CLERK is changed to the
password SALESREP. The DBCPLUS program returns a message
conrming the change of the password.
>change password CLERK SALESREP
Change of password accepted.
>
Refer to \CHANGE PASSWORD" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify the password change, use the REVIEW
PASSWORDS command. In the following example, you can see that
the password is changed:
>review passwords @
REVIEW PASSWORDS:
User Class
Password
----------------------11
12
13
14
15
18
* The
Deleting a Password
from the Database
CREDIT
BUYER
SHIP-REC
SALESREP
MANAGER
DO-ALL
*
password CLERK is changed to the password SALESREP.
To delete a password and its associated user class from the database,
use the DELETE PASSWORD command. In this section, a password
and its associated user class are deleted from the ORDERS database.
Before deleting a password, the REVIEW PASSWORDS command
output looks like this:
User Class
Password
----------------------11
12
13
14
15
18
7-6
<----
Changing Database Security
CREDIT
BUYER
SHIP-REC
SALESREP
MANAGER
DO-ALL
>
In the example below, the password SHIP{REC and its associated
user class 13 are deleted from the ORDERS database. The
DBCPLUS program asks if you want the associated user class
deleted. In this example, Y is entered for yes. The DBCPLUS
program then returns a message conrming the deletion of the user
class and password.
>delete password SHIP-REC 13
Delete password user class [y/N] ? y
Deletion of user class and password accepted.
>
Refer to \DELETE PASSWORD" in chapter 10, \DBChange Plus
Commands," for a detailed description of the command syntax and
parameters.
If you want to verify that the password and user class are deleted,
use the REVIEW PASSWORDS command. In the following
example, you can see that the password SHIP{REC and its
associated user class are deleted from the ORDERS database:
>review passwords
REVIEW PASSWORDS:
User Class
Password
----------------------11
12
14
15
18
CREDIT
BUYER
SALESREP
MANAGER
DO-ALL
<----
*
>
* The
password SHIP{REC and its associated user class 13 have been deleted.
Changing Database Security
7-7
Changing Data Item
Security
To change data item security, use the CHANGE ITEMSECURITY
command. CHANGE ITEMSECURITY changes only one user class
access at a time. If you want to change more than one user class at
a time, use the CHANGE ITEM command. Refer to \CHANGE
ITEM" in chapter 10, \DBChange Plus Commands."
In this section, the security of the data item QUANTITY is changed
in the ORDERS database. Before making changes, the REVIEW
ITEMS command output looks like this:
Itm No. Item Name
Attrib Security
-----------------------------------------15
>
7-8
Changing Database Security
QUANTITY
I1
(/14)
In the example below, the security of the data item QUANTITY
is changed to add user class 18 to the write access class list. The
DBCPLUS program returns a message conrming the change of
security.
>change itemsecurity quantity 18 w
Change of item security accepted.
>
Refer to \CHANGE ITEMSECURITY" in chapter 10, \DBChange
Plus Commands," for a detailed description of the command syntax
and parameters.
If you want to verify that the item security is changed, use the
REVIEW ITEMS command. In the following example, you can see
that the security for the data item QUANTITY is changed:
>review items quantity
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------15
QUANTITY
I1
(/14,18)
<----
*
>
*
Deleting Data Item
Security
The security of the data item QUANTITY has been changed to put
user class 18 in the write access class list.
To delete all security specications from a data item, use the
DELETE ITEMSECURITY command. This results in an absent
list. In this section, the security of the data item STATE is changed
in the ORDERS database. Before making changes, the REVIEW
ITEMS command output looks like this:
Itm No. Item Name
Attrib Security
-----------------------------------------16
STATE
X2
(12,13,14/11)
>
In the example below, all security specications are deleted from
the data item STATE. The DBCPLUS program returns a message
conrming deletion of the security specications.
>delete itemsecurity state
Change of item security accepted.
Changing Database Security
7-9
>
Refer to \DELETE ITEMSECURITY" in chapter 10, \DBChange
Plus Commands," for a detailed description of the command syntax
and parameters.
If you want to verify that the data item security is deleted, use the
REVIEW ITEMS command. In the following example, you can see
that all security specications are deleted from the data item STATE,
resulting in an absent list.
>review items STATE
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------16
STATE
X2
<----
*
>
* All
security specications have been deleted from the data item STATE.
Deleting all security specications from a data item means that all
users can read the data item. This is the default security assigned
by DBSCHEMA when processing a data item without security
specications.
Note
Changing Data Set
Security
To change data set security, use the CHANGE SETSECURITY
command. In this section, the security of the data set INVENTORY
is changed in the ORDERS database. Before making changes, the
REVIEW SETS command output looks like this:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------6
INVENTORY
D
450
15
481
(12,14/13,18)
>
In the example below, the security of the data set INVENTORY is
changed to give user class 14 write access in the user class list. The
DBCPLUS program returns a message conrming the change of
security.
7-10
Changing Database Security
>change setsecurity inventory 14 w
Change of set security accepted.
>
Refer to \CHANGE SETSECURITY" in chapter 10, \DBChange
Plus Commands," for a detailed description of the command syntax
and parameters.
If you want to verify that the data set security is changed, use the
REVIEW SETS command. In the following example, you can see
that the security of the data set INVENTORY is changed:
>review sets inventory
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------6
INVENTORY
D
450
15
481
(12/13,14,18)
<----
*
>
*
The security of the data set INVENTORY has been changed to give
user class 14 write access to the data set.
To delete all security specications from a data set, use the DELETE
SETSECURITY command. This results in an absent list. In this
section, the security of the data set CUSTOMER is changed in the
ORDERS database. Before making changes to the data set security,
the REVIEW SETS command output looks like this:
Deleting Data Set
Security
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------1
CUSTOMER
M
221
10
640
(14/11,18)
>
In the example below, all security specications are deleted from the
data set CUSTOMER. The DBCPLUS program returns a message
conrming deletion of the security specications.
>delete setsecurity customer
Change of set security accepted.
>
Changing Database Security
7-11
Refer to \DELETE SETSECURITY" in chapter 10, \DBChange
Plus Commands," for a detailed description of the command syntax
and parameters.
If you want to verify that the data set security is deleted, use the
REVIEW SETS command. In the following example, you can
see that all security specications are deleted from the data set
CUSTOMER resulting in an absent list:
7-12
Changing Database Security
>review sets CUSTOMER
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity
Fac Max Class
Security
-------------------------------------------------------------1
CUSTOMER
M 221
10
640
<----
*
>
* All
security specications have been deleted from the data set CUSTOMER.
Note
Deleting all security specications from a data set means that all
users can read the data set. This is the default security assigned
by DBSCHEMA when processing a data set without security
specications.
Changing Database Security
7-13
8
Maintaining the Database
This chapter explains how to use DBChange Plus to do the following
maintenance and performance tuning tasks on a TurboIMAGE/XL
database:
Checking for structural integrity.
Fixing structural problems.
Improving database performance.
Managing database capacity.
In this chapter, the section \Guidelines for Maintaining the
Database" discusses when to use DBChange Plus to optimize
the performance and integrity of the database. The remainder of
this chapter combines the CHECK and FIX commands in several
sections. For example, checking and xing data sets are in the same
section, and so on. However, your database maintenance tasks may
be implemented dierently than the method and order presented in
this chapter, depending on your maintenance schedule and the size
and activity of your database. For example, you may nd it more
ecient to create a job to be run on a regular basis to repack or
check your database.
Before reading this chapter, you should be familiar with the
information in chapter 1, \Introduction to DBChange Plus." To
learn how to do more DBChange Plus tasks, refer to chapters 2
through 7 and 9. If you understand DBChange Plus tasks and
only want to see command syntax information, refer to chapter 10,
\DBChange Plus Commands."
Maintaining the Database
8-1
DBChange Plus provides specic commands that generate statistics
about the database structure to help you determine if there are any
structural problems, such as broken chains, incorrect pointer linkages,
and inconsistent pointers. Several of the commands correct known
problems. The commands used for database maintenance are listed
alphabetically in Table 8-1 along with a summary of their functions.
Summary of
Commands to
Maintain the
Database
Before invoking any of the following commands, you must log
on to the system as the database creator, run the DBCPLUS
program, and specify the database to be used. Refer to chapter 1,
\Introduction to DBChange Plus."
The commands are not actually applied until the DBAPLUS
program has been used. Refer to chapter 9, \Applying Changes to
the Database Structure."
Note
Table 8-1. Summary of Commands to Maintain the Database
Command
CHECK
FIX
REPACK
8-2
Maintaining the Database
Keyword
Description
BASE
Checks the root le, all data sets, and all paths in
the database for structural integrity and reports any
problems.
PATH
Checks paths for broken chains and incorrect pointer
linkages and reports any problems.
SET
Checks data sets for internal or pointer inconsistency
and reports any problems.
BASE
Examines all sets and paths in the database and
attempts to correct known problems. Does not x
root problems.
PATH
Examines paths for broken chains and incorrect
pointer linkages and attempts to correct known
problems.
SET
Examines data sets for internal pointer or structural
inconsistency and attempts to correct known
problems.
SET
Rebuilds a detail data set by eliminating deleted
entry gaps and by adjusting pointers.
Guidelines for
Maintaining the
Database
To optimize the performance and integrity of the database, you can
implement a regular maintenance schedule. For example:
1. Establish baseline statistics for your database against which future
statistics can be compared. To do this, use the CHECK BASE
command with the QUICK parameter and archive the resulting
output. Note that your database should be performing optimally
and should not contain structural problems when you establish
your baseline.
2. Periodically check the database and compare the output to the
original baseline statistics. To do this, use the CHECK BASE
command with the QUICK parameter.
3. Correct problems that are detected. To do this, use the FIX
command to correct structural problems in both master and detail
data sets. Use the REPACK command with the new blocking
factor, if necessary, to correct disk space utilization of detail data
sets.
Regularly checking and xing the database can prevent the following
problems:
Large clusters in master data sets.
Poor packing on heavily used chains.
Large gaps caused by deleted records in detail data sets.
Optionally, you can use the FIX PATH or FIX BASE commands
only. The FIX commands invoke the checking process as explained in
the following section.
How the FIX Commands
Operate
The FIX PATH and FIX BASE commands operate as follows:
1. A CHECK BASE QUICK (serial read only) is performed. If no
problems are found, the FIX command stops processing and a
message is returned informing you that no problems are detected.
If problems are found, then the next step occurs.
2. To further isolate any problems located by CHECK BASE
QUICK, a standard CHECK PATH (serial read followed by a
chained read) is performed for each path that has a consistency
problem. Corrections are applied to the problems, and messages
are returned informing you where the corrections occurred.
The REPACK, CHECK, and FIX commands, along with the QUICK
option, are discussed in detail later in this chapter.
Note
If a correct backup of the root le does not exist, you must manually
correct root le and le structure errors.
Maintaining the Database
8-3
Repacking Data
Sets
To repack a detail data set, use the REPACK SET command.
Repacking a detail data set can improve database performance
by eliminating long delete chain counts (deleted entry gaps) and
optimizing chains by adjusting pointers. Repacking a detail data
set physically regroups the records on disk to improve storage
eciency. To further improve performance, you can also change the
capacity, blocking factor, and device class of a detail data set with
the REPACK SET command.
You can repack a detail data set in one of two ways:
Serial repack.
Chained repack.
A serial repack moves up the records to ll deleted entry gaps. A
serial repack is faster than a chained repack. A serial repack is useful
when you're not sure by which path to organize your repack, or when
you've just reduced capacity below the high-water mark.
A chained repack eliminates deleted entry gaps and then places the
records sequentially in the data set according to the chosen path.
Although slower than a serial repack, the data can be more quickly
accessed. When performing a chained repack, select the path that
is most frequently accessed. Make sure you select a valid path and
that you specify the correct search item. Do not select a path that
is either being deleted or added (DELETE PATH or ADD PATH
commands are in the current change le) or has no key item data.
In the following example, the detail data set SALES is repacked
serially. The capacity of the data set is changed to 1500, the blocking
factor is changed to 16, and the device class is changed to DISK3.
>repack set sales serial 1501 (16) disk3
REPACK SET pending for data set.
8-4
Maintaining the Database
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
PAGE 1
HEWLETT-PACKARD 30391C.02.00 TurboIMAGE/3000: DBSCHEMA
FRI, APR 27, 1990, 10:40 AM (C) HEWLETT-PACKARD CO. 1987
BEGIN DATABASE ORDERS;
PASSWORDS:
11 CREDIT ;
12 AGENT
;
..
.
NAME:
SALES
,D(11/14,18), DISK3;
ENTRY:
ACCOUNT ( CUSTOMER
(PURCH-DATE)),
STOCK#
(!PRODUCT
),
QUANTITY
,
PRICE
,
TAX
,
TOTAL
,
PURCH-DATE
,
DELIV-DATE
;
CAPACITY: 1501(16);
<---- device class changed
<---- capacity and blocking
factor changed
..
.
NUMBER OF ERROR MESSAGES: 0
ITEM NAME COUNT: 23 DATA SET COUNT: 5
ROOT LENGTH: 1044
BUFFER LENGTH: 541 TRAILER LENGTH: 256
ROOT FILE ORDERS CREATED.
New database schema is saved as temporary file ORDERSSC
Temporary file created for set SALES.
<---- data set being repacked
Data set CUSTOMER
: No conversion necessary.
Data set PRODUCT
: No conversion necessary.
Data set SUP-MASTER : No conversion necessary.
Data set SALES
: 17 entries expected.
Data set SALES
: 17 entries repacked successfully.
Data set INVENTORY
: No conversion necessary.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
Maintaining the Database
8-5
Checking and Fixing
Paths
Checking Paths
This section explains how to check a data set path for inconsistencies
and how to x a path that contains inconsistencies. To check a path
for broken chains and incorrect pointer linkages, use the CHECK
PATH command. To correct problems found after using CHECK
PATH, use the FIX PATH command. You can use CHECK PATH
and FIX PATH for either master or detail data sets.
When used on a master data set, CHECK PATH checks the synonym
chain pointers in the master set. When used on a detail data set,
CHECK PATH checks the chain pointers in both the detail data set
and associated master data sets. The output for both master data
sets and detail data sets is the same. In the following example, the
master data set CUSTOMER is checked:
>check path customer
Check Set issued for 1 set(s).
>
If you want to verify that the CHECK PATH command is pending,
use the REVIEW PATHS command. Refer to \REVIEW PATHS" in
chapter 10, \DBChange Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
Tabulating statistics.
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------CUSTOMER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
Starting data set chained reads.
8-6
Maintaining the Database
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match bitmap entry count (CHK 560).
Record 6 is not linked into the proper synonym chain (CHK 360).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
Analyzing the CHECK PATH Statistics
CHECK PATH performs a serial read followed by a chained read on
the data set specied. If you use the QUICK parameter, only a serial
read is performed. The output is in two sections: CHECK PATH
and CHECK INFORMATION.
When reviewing the CHECK PATH statistics, rst examine the
Packing Ratio and Avg Chain statistics to help you determine which
problems may exist.
Under the CHECK PATH section of the output, the following
information is displayed for the above example:
The data set name. CUSTOMER is the name of the master data
set.
The search item name. Because no search item exists in a master
data set, the text SYNONYM CHAINS appears in the eld. For a
detail data set, the search item name would appear in this eld.
The data set type. The following are valid data set types:
M
is a manual master data set.
A
is an automatic master data set.
D
is a detail data set.
Max Chain and Avg Chain are the number of entries in the longest
synonym or detail chain and the average number of entries per
chain, respectively. While long chains are not necessarily harmful
to the database, you may want to consider the following guidelines
when evaluating chain lengths:
Choosing an ecient capacity will keep synonym chains to a
minimum.
Maintaining the Database
8-7
The Avg Chain should not exceed 40 percent of the capacity
unless it's necessary for the application program.
The data item most heavily used by an application should be
specied as the search item for a detail data set repack. This
makes for a more ecient repack.
Sorted chains should be less than 50 records unless key values
are added in ascending order over time. For example, a date eld
where the currently added date will always be greater than any
of the prior dates can exceed more than 50 records.
Std Dev (standard deviation) is an indication of the accuracy of
the Avg Chain statistic. The closer to 0.00 this number is, the
more accurate the Avg Chain statistic is.
Pct Far Ptrs is the percentage of forward pointers that point
outside the current block. This statistic can be used to enhance the
packing ratio described below. The Pct Far Ptrs represents the
number of pointers that point beyond the current block.
Avg Blocks is the average number of blocks per chain.
Packing Ratio is the eciency of the path. It is the optimal
average number of blocks per chain divided by the actual average
number of blocks per chain. A value of 100 percent means that
every individual chain for the specied path occupies the minimum
number of blocks possible. Although packing ratios vary from
application to application, try to maintain a packing ratio of at
least 60 percent on primary paths.
The CHECK INFORMATION section of the output identies specic
records in the data set that contain problems. If no problems are
found, the following message is displayed:
No problems were detected by CHECK.
Fixing Paths
When used on a master data set, FIX PATH examines and attempts
to correct problems with the synonym chain pointers. When used on
a detail data set, FIX PATH examines and attempts to correct the
path chain pointers in both the detail data set and associated master
data sets. In the following example, FIX PATH is used to correct the
problems found in the previous CHECK PATH example:
>fix path customer
Fix Path issued for 1 set(s).
>
If you want to verify that the FIX PATH command is pending, use
the REVIEW PATHS command. Refer to \REVIEW PATHS" in
chapter 10, \DBChange Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
8-8
Maintaining the Database
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
Tabulating statistics.
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS)
Chain Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------CUSTOMER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
Starting data set chained reads.
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match bitmap entry count (CHK 560).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
FIX INFORMATION
-----------------------------------------------------------------------All problems detected have been fixed.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
The FIX PATH output is similar to the CHECK PATH output.
The same CHECK PATH and CHECK INFORMATION reporting
occurs. In addition, FIX INFORMATION reports the status of the
FIX PATH process. In the above example, FIX PATH corrected all
problems found.
Maintaining the Database
8-9
Checking and Fixing
Data Sets
Note
Checking a Master Data
Set
This section explains how to check data sets for internal pointer
or structural inconsistency and how to x data sets that contain
inconsistencies. To check a data set for internal or pointer
inconsistency, use the CHECK SET command. To correct problems
found after using CHECK SET, use the FIX SET command. You
can use CHECK SET and FIX SET for either master data sets or
detail data sets.
CHECK SET checks only the internal pointer consistency of the
set(s) specied. It does not check the pointer consistency across
sets. For example, the pointer from a chain head in a master data
set to the rst record on the chain in the associated detail set is
not checked. To check across data sets, use the CHECK PATH
command.
To check a master data set, use the CHECK SET command. In the
following example, the master data set CUSTOMER is checked.
>check set customer
Check Set issued for 1 set(s).
>
If you want to verify that the CHECK SET command is pending,
use the REVIEW SETS command. Refer to \REVIEW SETS" in
chapter 10, \DBChange Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
Starting data set serial reads.
Tabulating statistics.
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match bitmap entry count (CHK 560).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
8-10
Maintaining the Database
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
Analyzing the CHECK SET Statistics for a Master Data Set
CHECK SET performs a serial read followed by a chained read on
the master data set specied. If you use the QUICK parameter, only
a serial read is performed. The output is in two sections: CHECK
SET and CHECK INFORMATION.
Under the CHECK SET section of the output, the following
information is reported for the above example:
The data set name. CUSTOMER is the name of the master data
set.
The data set type. The following are valid data set types:
M
is a manual master data set.
A
is an automatic master data set.
Entries is the number of entries in the data set.
Capacity is the capacity of the data set.
Pct Full is the percentage of the data set capacity that is not
available, rounded to the nearest whole percentage. This statistic
is useful for capacity planning. The recommended percent full
for a master data set is between 60 percent and 80 percent. If a
master data set capacity is signicantly less than 60 percent full,
a serial read becomes slower. If a master data set is signicantly
more than 80 percent full, DBPUT intrinsics involving the master
data set can slow down. If you are experiencing performance
problems, consider changing the capacity of the data set. (Refer to
\CHANGE SET" in chapter 10, \DBChange Plus Commands.")
Pct Sec is the percentage of secondary entries. In general, the
lower the percentage, the better. A high percentage indicates that
the hashing algorithm is creating many synonyms. To decrease the
percentage of secondaries, increase the data set capacity to a larger
number that is not a power of two. (Refer to \CHANGE SET" in
chapter 10, \DBChange Plus Commands.")
Longest Cluster and Average Cluster are the longest and average
number of TurboIMAGE blocks that must be read to nd an open
slot to place a synonym. If two records with the same hash value
are added to a master data set, one of them must be placed in
another available slot. Acceptable guidelines range from a cluster
of 10 on a very heavily loaded transaction processing system to
as much as 200 on a very lightly loaded system. A collection of
historical statistics about the database can help you evaluate if
the longest and average clusters are within a reasonable range.
In addition, your database users can help identify clustering
Maintaining the Database
8-11
problems by reporting slow response time when adding records
to a particular data set. Once you have determined if the range
should be changed, increase or decrease the data set capacity
accordingly. (Refer to \CHANGE SET" in chapter 10, \DBChange
Plus Commands.")
The CHECK INFORMATION section of the output identies specic
records in the data set that contain problems. If no problems are
found, the following message is displayed:
No problems were detected by CHECK.
Fixing a Master Data
Set
To correct problems identied by CHECK SET, use the FIX SET
command.
When xing a master data set, the following messages may occur:
Dataset DataSetName record n is duplicate manual master
(FIX 170). Key value: n
To correct this problem, examine the key values in the data set
DataSetName and delete the key that has no entries. Be sure to
print the data before deleting.
Please verify key for dataset DataSetName (FIX 170). Key
value: n
To correct this problem, examine the key value and the record to
determine if the data is damaged.
In the following example, FIX SET is used to correct the problems
found in the previous CHECK SET example:
>fix set customer
Fix Set issued for 1 set(s).
>
If you want to verify that the FIX SET command is pending, use the
REVIEW SETS command. Refer to \REVIEW SETS" in chapter
10, \DBChange Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
Tabulating statistics.
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
8-12
Maintaining the Database
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match bitmap entry count (CHK 560).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
FIX INFORMATION
-----------------------------------------------------------------------All problems detected have been fixed.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
The FIX SET output is similar to the CHECK SET output. The
same CHECK PATH and CHECK INFORMATION reporting occurs.
In addition, FIX INFORMATION reports the status of the FIX SET
process. All problems found in the previous example are corrected.
Checking a Detail Data
Set
To check a detail data set, use the CHECK SET command. In the
following example, the detail data set SALES is checked:
>check set sales
Check Set issued for 1 set(s).
>
If you want to verify that the CHECK SET command is pending,
use the REVIEW SETS command. Refer to \REVIEW SETS" in
chapter 10, \DBChange Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
Tabulating statistics.
CHECK SET (DETAIL)
Pct
Highest
Delete
Maintaining the Database
8-13
Detail Set Name
Entries
Capacity Full Entry Used Chain Count
----------------------------------------------------------------------SALES
17
504
3
17
0
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
Analyzing the CHECK SET Statistics for a Detail Data Set
CHECK SET performs a serial read followed by a chained read on
the detail data set specied. If you use the QUICK parameter, only a
serial read is performed. The output is in two sections: CHECK SET
and CHECK INFORMATION.
Under the CHECK SET section of the output, the following
information is displayed for the previous example:
The data set name. SALES is the name of the detail data set.
Entries is the number of entries in the data set.
Capacity is the capacity of the data set.
Pct Full is the percentage of the data set capacity that is not
available, rounded to the nearest whole percentage. This statistic is
useful for capacity planning.
Highest Entry Used is the record number of the highest entry
ever used (the high-water mark) in the data set. When reducing
data set capacity, do not reduce it below the highest entry used;
otherwise, you must repack the data set to recover the unused
space in the middle of the data set. (Refer to \REPACK" in
chapter 10, \DBChange Plus Commands.")
Delete Chain Count is the number of records in the delete chain.
This number should be as close to 0 as possible. A high delete
chain count may mean a problem with a large quantity of deletes.
For example, if you have a program that performs a large number
of deletes, gaps may be left in your detail data set. Subsequent
record additions may disburse data randomly within the data set.
As a result, serial reads may be slow. To correct a high Delete
Chain Count, repack the data set. (Refer to \REPACK" in chapter
10, \DBChange Plus Commands.")
8-14
Maintaining the Database
The CHECK INFORMATION section of the output identies specic
records in the data set that contain problems. If no problems are
found, the following message is displayed:
No problems were detected by CHECK.
Fixing a Detail Data Set
Use the FIX SET command to correct problems identied by
CHECK SET. In the following example, FIX SET is used to correct
the problems found in the previous example:
>fix set customer
If you want to verify that the FIX SET command is pending, use the
REVIEW SETS command. Refer to \REVIEW SETS" in chapter
10, \DBChange Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
.
Tabulating statistics.
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
Maintaining the Database
8-15
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
FIX INFORMATION
-----------------------------------------------------------------------All problems detected have been fixed.
PERFORM COMMANDS completed.
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
The FIX SET output is similar to the CHECK SET output. The
same CHECK PATH and CHECK INFORMATION reporting occurs.
In addition, the FIX INFORMATION section reports how the
problem was corrected and the status of the FIX SET process. All
problems found in the previous example are corrected.
Checking and Fixing
the Entire Database
You can combine the CHECK PATH and FIX PATH and CHECK
SET and FIX SET commands to check and x the entire database by
using the CHECK BASE and FIX BASE commands. CHECK BASE
and FIX BASE check all the paths and sets in the database; while
CHECK PATH and FIX PATH are used only for paths in a specic
data set, and CHECK SET and FIX SET only for a specic data set.
Refer to \CHECK BASE" and \FIX BASE" in chapter 10,
\DBChange Plus Commands," for a detailed description of the
command syntax and output statistics.
8-16
Maintaining the Database
Using the QUICK
Option with CHECK
Commands
Note
When used with the CHECK PATH, CHECK SET, and CHECK
BASE commands, the QUICK option displays a summarized version
of the standard CHECK output. The QUICK option performs a
serial read only. This method is quicker than standard checking,
which uses both serial and chained reads. The QUICK option can
identify that a problem exists, but it cannot isolate the specic
records that need to be xed. If you already know that a problem
exists, but you need more detailed information, such as which records
are in error, use the standard checking method.
If a record contains only a damaged key, but does not contain any
other damage, the CHECK BASE QUICK command will not detect
the damaged key. To locate damaged keys on a large database, create
a copy of your database and perform a standard CHECK BASE on
the database copy. If you have a small database, perform a standard
CHECK BASE followed by a FIX BASE.
The QUICK option is useful if you have a large database and want
to determine if a problem exists but you don't need to know exactly
where. In the following example, the QUICK option is used to check
the paths in the detail data set SALES. ACCOUNT is the search
item linking SALES to the master data set CUSTOMER.
>check path sales (account) quick
Check Path pending for 1 set(s).
>
Maintaining the Database
8-17
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the
following output is displayed:
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
Tabulating statistics.
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------SALES
D
ACCOUNT
( S) 17231 2874.67 7033.14
6
1.17
6.86
Starting data set chained reads.
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
PERFORM COMMANDS completed.
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
Refer to \CHECK PATH" and \FIX PATH" in chapter 10,
\DBChange Plus Commands," for a detailed description of the
command syntax and output statistics.
8-18
Maintaining the Database
9
Applying Changes to the Database Structure
This chapter explains how to use the DBAPLUS program to apply
changes to the database structure.
Before reading this chapter, you should be familiar with the
information in chapter 1, \Introduction to DBChange Plus." To
learn how to do more DBChange Plus tasks, refer to chapters 2
through 8. If you understand DBChange Plus tasks and only want
to see command syntax information, refer to chapter 10, \DBChange
Plus Commands."
What is DBAPLUS?
DBChange Plus consists of two programs|DBCPLUS and
DBAPLUS. In earlier chapters in this guide, changes made to the
ORDERS database were actually stored in the change le using
the DBCPLUS program and not applied to the database. The
DBAPLUS program actually applies the changes to the database.
It also initiates pending CHECK and FIX commands stored in the
change le.
The DBAPLUS program requires exclusive access to the database.
Note that the DBAPLUS program disables Intrinsic Level Recovery
(ILR), logging, and recovery for the database being restructured. If
ILR needs to be performed, it will be done when ILR is disabled.
Before Restructuring
the Database
Before you use the DBAPLUS program to restructure the database,
be sure to follow the steps below:
1. Obtain a current backup copy of the database as a precautionary
measure. If the DBAPLUS program is unable to complete the
restructure because of a fatal error, your original database may be
left in an inconsistent state. In this case, you will need to restore a
backup copy of the database.
To be sure you have a current copy, the DBAPLUS program
checks if the database has been modied since the last DBStore. If
it has, the DBAPLUS program asks if you want to continue with
the restructure. You should continue only if you have a backup
copy of the database.
Applying Changes to the Database Structure
9-1
2. Make sure that all security criteria have been met. To use the
DBAPLUS program, you must be logged on as the database
creator. The DBAPLUS program checks that the logged-on
user matches the logon stored in the change le. If it does not,
a security violation message is displayed and the DBAPLUS
program terminates.
3. Ensure that adequate disk space is available for the DBAPLUS
program to perform the restructure. To estimate how much disk
space you need, rst identify the data sets being altered. Assume
that the DBAPLUS program will use at least as much space as
the data sets currently occupy. Adjust your estimate depending on
the nature of the changes stored in the change le. Modications,
such as adding new elds or changing data set capacity, can aect
the disk space needed by the new data sets. The method the
DBAPLUS program uses to restructure the database also aects
the disk space needed. Refer to \How DBAPLUS Restructures a
Database" later in this chapter for more information.
If not enough disk space exists to create all the necessary
temporary les before beginning the restructure, the DBAPLUS
program prompts you to make a choice as listed below. Note,
however, that neither of these methods guarantee that you can
successfully run the DBAPLUS program if you have very large
data sets and very little available disk space.
a. You can choose to exit the DBAPLUS program without
performing the restructure. Before using the DBAPLUS
program again, obtain more disk space or remove some of your
changes from the change le with DBChange and restructure
the database in stages.
b. You can direct the DBAPLUS program to perform the
restructure using an alternate method which uses less disk
space. However, be aware that if a fatal error occurs during the
restructure, the database is left in an inconsistent state. This
method creates one temporary data set at a time. When the
changes are successfully made to the temporary data set, the
DBAPLUS program purges the original data set. The danger
is that if a fatal error occurs during this process, some of the
original data sets will have been purged before the new ones
have been saved. In this case, you need to run DBUTIL to
purge the database and restore an archival version.
9-2
Applying Changes to the Database Structure
Saving the New
Schema
The DBAPLUS program creates a new schema based on the changes
stored in the change le. This schema is used when the DBAPLUS
program calls DBSCHEMA to build a new root le. The new schema
is placed in a temporary le named dbname SC. (Any temporary le
with the same name will be purged.) You must use the MPE XL
SAVE command on this new schema le if you want to keep it as a
permanent MPE XL le.
To maintain the security of the database passwords when the
DBAPLUS program is run from a batch job, the listing of the new
schema is suppressed with a le equation which sets DBSLIST
to $NULL. You must alter the job stream le when running the
DBAPLUS program in batch mode if you wish to save the schema
listing. The job stream example later in this chapter shows how to do
this.
Saving the Schema
Processor Output
The schema processor output (DBSLIST) is sent to $STDLIST. You
can redirect this listing to a permanent MPE XL le by issuing the
following le equation before running the DBAPLUS program:
:file dbslist= FileName;dev=disc;rec=-80,,f,ascii;disc= n;save;nocctl
where n is the number of records in the le. If n is not specied,
the default value is 1023, which may not be sucient for a large
database.
Methods of Using
the DBAPLUS
Program
The DBAPLUS program can be invoked independently in either
interactive or batch mode. Because the DBAPLUS program requires
exclusive access to the database, the method you choose depends
on the number and/or type of changes to be made. Because batch
mode can be set to run at times when the database is not being
accessed, this method is desirable when user access to the database is
important and/or when lengthy changes are stored in the change le.
Use the DBAPLUS program interactively only if the changes stored
in the change le do not take long to perform, or if user access to the
database is not critical.
To perform a restructure, the following three methods are available:
Initiating the DBAPLUS program interactively from within the
DBCPLUS program by using a PERFORM COMMANDS.
Creating a job le from within the DBCPLUS program by using
a PERFORM COMMANDS to execute the DBAPLUS program.
Then exit the DBCPLUS program and stream the job.
Exiting the DBCPLUS program and running the DBAPLUS
program independently.
Each of these methods is explained on the following pages.
Applying Changes to the Database Structure
9-3
Initiating the DBAPLUS
Program Interactively
9-4
The DBAPLUS program can be invoked interactively to perform
a restructure from within the DBCPLUS program. To invoke the
DBAPLUS program this way, do the following:
1. Run the DBCPLUS program (DBCPLUS).
2. Issue the BASE command to specify the database to be
restructured.
3. Issue one or more DBCPLUS restructure commands. Issue a
PERFORM COMMANDS to immediately invoke the DBAPLUS
program. When you are asked if changes should be performed
online or if a job stream le should be created, enter Y for yes.
The example below shows how to do this:
Applying Changes to the Database Structure
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
THU, JAN 18, 1990 7:15 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N]? y
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
Creating a DBAPLUS
Job File from within the
DBChange Program
The DBAPLUS program can be invoked by creating a job le from
within the DBCPLUS program. To invoke the DBAPLUS program
this way, do the following:
1. Run the DBCPLUS program (DBCPLUS).
2. Issue the BASE command to specify the database to be
restructured.
3. Issue one or more DBChange restructure commands.
4. Issue PERFORM COMMANDS from within the DBCPLUS
program and create a job stream. When you enter PERFORM
COMMANDS, include the JOB and PARM parameters. After the
job stream le is created, exit the DBCPLUS program. When you
are ready to stream the job, enter the job ( DatabaseName JJ) at
the MPE XL system prompt (:). For example:
>perform commands job 1
Please wait.....change file is being verified.
New job stream file ORDERSJJ created.
>exit
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
******************* DBCHANGE STATISTICS***************************
Number
Number
Number
Number
Number
Number
of
of
of
of
of
of
databases
databases
databases
databases
databases
databases
prepared
prepared
prepared
prepared
prepared
prepared
for
for
for
for
for
for
rename:
restructure:
erase :
repack:
check :
fix :
0
1
0
0
0
0
:stream ordersjj
Applying Changes to the Database Structure
9-5
For more information about PARM values, refer to \Using PARM
Values" later in this chapter.
9-6
Applying Changes to the Database Structure
Modifying the Job File
When instructed to do so, DBChange creates a job stream le for
each existing change le. The name of this job stream le is the
database name with JJ appended ( DatabaseName JJ). Use this job
stream le to perform a restructure in batch mode. This job stream
le does the following:
Sets a le equation for the change le.
Sets DBSLIST to $NULL to suppress the listing of the new
schema.
Contains commands to purge the old version of the schema and to
save the temporary le containing the new schema. Note that these
commands have been \commented out." To use them, alter the job
stream le with a text editor.
Contains TELL commands that report the beginning and the
completion of the restructure.
You may need to make the following alterations to a job stream le:
Add any necessary user, group, and/or account passwords.
Alter the run-time parameter of the RUN DBALTER command.
(This parameter provides answers to questions DBAPLUS may ask.
Refer to Table 9-1 later in this chapter.)
Remove the :comment** portion of the commands that save the
temporary le containing the new schema.
The example below shows the unedited job stream le before editing
created by DBChange for the database ORDERS:
:job JDBALTER,KELLY.FINANCE,DATABASE
:comment***********************************************
:comment*
This job will perform the actual
:comment*
restructuring of the database by
:comment*
calling DBALTER.
:comment***********************************************
:
:tell
KELLY.FINANCE; /-->Start JDBALTER for ORDERS
:
:file DBCHGF = ORDERSCF
:file DBSLIST = $NULL
:
:comment***********************************************
:comment*
DBALTER creates the new schema file as a
:comment*
job temporary file. To save it, purge the
:comment*
old schema file before running DBALTER and
:comment*
save the new schema file after DBALTER
:comment*
completes.
:comment***********************************************
:comment*
:purge ORDERSSC
:comment***********************************************
Applying Changes to the Database Structure
9-7
:
:comment*
verify that DBALTER parmvalue is correct
:
:run dbaplus; parm = 1
:
:comment***********************************************
:comment*
:save ORDERSSC
:comment***********************************************
:
:tell
KELLY.FINANCE; /-->End JDBALTER for ORDERS
:
:eoj
In the example below, the ORDERS job stream le, ORDERSJJ, has
been edited to add passwords, to change the parameter of the RUN
DBALTER command, and to remove the \commented out" portions
that save the new schema le.
:job JDBALTER,KELLY/USER.FINANCE/MGR,DATABASE/ALL
:comment***********************************************
:comment*
This job will perform the actual
:comment*
restructuring of the database by
:comment*
calling DBALTER.
:comment***********************************************
:
:tell
KELLY.FINANCE; /-->Start JDBALTER for ORDERS
:
:file DBCHGF = ORDERSCF
:file DBSLIST = $NULL
:
:comment***********************************************
:comment*
DBALTER creates the new schema file as a
:comment*
job temporary file. To save it, purge the
:comment*
old schema file before running DBALTER and
:comment*
save the new schema file after DBALTER
:comment*
completes.
:comment***********************************************
:
:purge ORDERSSC
:
:comment*
verify that DBALTER parmvalue is correct
:
:run dbaplus; parm = 15
:
:save ORDERSSC
:
:tell
KELLY.FINANCE; /-->End JDBALTER for ORDERS
:
:eoj
9-8
Applying Changes to the Database Structure
Running the DBAPLUS
Program Independently
You can invoke the DBAPLUS program independent of the
DBCPLUS program in two ways, as follows:
Issue a le equation for DBCHGF, the formal le designator for
the change le. Next, run the DBAPLUS program providing a
parm value. For example:
:hello kelly.finance,database
:file dbchgf=orderscf
:run dbaplus.pub.sys;parm=1
The DBAPLUS program determines the database name from the
name of the change le in the le equation. This le equation
is reset by the DBAPLUS program upon completion of the
restructure. Note that a run-time parameter, PARM=1, is
included. Use this parameter if you want to keep the change le.
For more information about PARM values, refer to \Using PARM
Values" later in this chapter.
Run the DBAPLUS program, but allow it to prompt you for the
database name. For example:
:hello kelly.finance,database
:run dbaplus.pub.sys
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
THU, JAN 18, 1990, 9:11 AM
Which database? orders
The DBAPLUS program determines the correct change le by
reading the database name. Because no parameter is specied,
the change le is automatically purged upon completion of the
restructure.
Using PARM Values
PARM values are used in the following situations:
When creating a job le from within the DBCPLUS program.
When running the DBAPLUS program independently.
To restructure the database, the DBAPLUS program may need you
to answer four questions. In interactive mode, you can answer these
questions if and when they are asked. However, batch mode requires
a run-time parameter (PARM value) to provide answers to these
questions in case they are asked. Optionally, a parameter can also be
used to keep the change le.
PARM values can be determined by adding them together. For
example, if you want both PARM=1 and PARM=4 to take eect,
add them together, then specify PARM=5.
Applying Changes to the Database Structure
9-9
Table 9-1 describes the parameter values and which DBAPLUS
questions they answer.
Table 9-1. DBAPLUS Parameters
PARM You do not have enough disk
Value space to build all necessary
temporary data sets before
beginning the restructure.
Do you want DBAPLUS to
continue with the restructure
using an alternative
restructuring method?
The database has
been modied
since the last
DBSTORE. Do
you wish to
continue?
Your root le is not in
normal DBSCHEMA
format. Do you want
DBAPLUS to x it and
continue with the
restructure?
1
Y
2
Y
3
Y
4
Y
5
Y
6
Y
Y
7
Y
Y
Y
9
Y
10
Y
Y
11
Y
Y
12
Y
Y
13
Y
Y
14
Y
Y
Y
15
Y
Y
Y
How DBAPLUS
Restructures a
Database
Y
Y
8
9-10
The change le is
normally purged after
successful completion of
DBAPLUS. Do you
want to save the change
le?
Y
Y
Y
Y
Y
Before actually beginning the restructure, DBAPLUS creates an
intermediate version of the database. The new root le and any data
sets which have structural changes are created as temporary les.
Once DBAPLUS has created all these temporary les, it begins the
restructure. If the restructure is successful, the original data sets are
purged and the new ones saved.
Applying Changes to the Database Structure
Caution
If one of the stored changes in the change le is the reordering
of data sets, you should not have any temporary les named
ALTERnn where nn is the number of one of the data sets in the
database. The DBAPLUS program creates temporary les with
these names and overwrites your temporary les.
Do not create a database with the name TEMPDB. The
DBAPLUS program creates a le name TEMPDB to restructure
master data set. Your TEMPDB le will be purged and can also
prevent the DBAPLUS from processing.
Possible Restructuring
Problems
If a fatal error occurs during the restructuring process, the following
situations may occur leaving the original database in an inconsistent
state. If this happens, resolve the error and restore the database from
your backup copy.
If a detail data set path is changed, the associated master set in
the original database is altered during the restructuring process. If
the detail set whose path you changed has more than one path, all
the master data sets associated with these additional paths are also
altered. Their chain counts are reset to zero to allow the chains to
be rebuilt while processing the path change. If a fatal error occurs
during this change or after it is processed, those associated master
data sets which are permanent les in the original database are left
in an inconsistent state.
If data sets are reordered from top to bottom, the original database
is altered during the restructuring process. For example, if
the original SET02 becomes SET03 after the resequence, the
DBAPLUS program places SET02 in a temporary le named
SET03 to prevent a naming conict with the original SET03.
Therefore, SET02 in the original database is altered or no longer
exists. This top to bottom reordering occurs when a set is moved
above its original position in the schema, or when a set is added
or deleted from the database. If a fatal error occurs during this
change or after it is processed, the original database is left in an
inconsistent state.
If the entries in a detail data set are erased, the automatic master
data set(s) linked to the detail data set may be purged and
re-created with zero entries. The chain count and chain pointers
of the path to the detail data set may also be updated to zero.
Additionally, the manual master data set(s) linked to the detail
data set may have chain count and chain pointers updated to zero.
The original data set is purged and re-created with zero entries.
If the entries in a manual master data set are erased, the original
data set is purged, then re-created with zero entries. If a fatal error
occurs after the original data set is purged, no manual master data
set exists.
Applying Changes to the Database Structure
9-11
When a detail data set is repacked, the chain pointers in the
master data set linked to the detail data set are adjusted. The
pointers in the detail data set are also adjusted.
Restructuring the
ORDERS Database
Following is an example of the messages the DBAPLUS program
sends to your terminal when it is performing the restructure
interactively. In this example, the DBAPLUS program is
restructuring the ORDERS database:
>perform commands
Please wait.....change file is being verified.
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
MON, JAN 8, 1990, 11:18 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
PAGE 1
HEWLETT-PACKARD 30391C.00.52 TurboIMAGE/3000: DBSCHEMA
MON, JAN 8, 1990, 11:18 AM (C) HEWLETT-PACKARD CO. 1987
BEGIN DATABASE ORDERS;
PASSWORDS:
11 CREDIT
;
.
.
.
NUMBER OF ERROR MESSAGES: 0
ITEM NAME COUNT: 26
DATA SET COUNT: 6
ROOT LENGTH: 1176
BUFFER LENGTH: 561
TRAILER LENGTH: 256
ROOT FILE ORDERS CREATED.
New database schema is saved as temporary file ORDERSSC
Data set CUSTOMER
: No conversion necessary.
Data set DATE-MASTER
: No conversion necessary.
Data set PRODUCT
: No conversion necessary.
Data set SUP-MASTER
: No conversion necessary.
Data set SALES
: No conversion necessary.
Data set INVENTORY
: No conversion necessary.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
9-12
Applying Changes to the Database Structure
>
In the previous example, the DBAPLUS program was able to nd
enough disk space to create all the temporary les before beginning
the restructure. However, if the DBAPLUS program is unable to
create all the temporary les before beginning the restructure, the
message delivered to the terminal reveals at what point in the process
the DBAPLUS program ran out of disk space. The message the
DBAPLUS program displays will be exactly the same as the previous
message until the DBAPLUS program begins to build temporary
les.
The following example illustrates what happens when the DBAPLUS
program attempts to create a temporary le for the data set
BRANCH-STORES. The example begins just after the new schema
has been displayed on the screen.
.
.
.
DATA SET
NAME
CUSTOMER
DATE-MASTER
PRODUCT
SALES
SUP-MASTER
INVENTORY
BRANCH-STORES
TYPE
M
A
M
D
M
D
D
FLD PT ENTR
CNT CT LGTH
9
1
3
9
5
6
5
1
3
2
4
1
3
2
MED CAPACITY
REC
BLK
FAC
BLK DISC
LGTH SPACE
43
54 221
10
541
3
26 211
19
496
16
33 307
16
529
24
40 504
14
561
31
42 211
12
505
20
32 450
15
481
24
32 225
15
481
TOTAL DISC SECTORS INCLUDING ROOT:
NUMBER OF ERROR MESSAGES: 0
ITEM NAME COUNT: 26
DATA SET COUNT: 6
ROOT LENGTH: 1176
BUFFER LENGTH: 561
128
64
112
192
80
128
64
768
TRAILER LENGTH: 256
ROOT FILE ORDERS CREATED.
New database schema is saved as temporary file ORDERSSC
Data set CUSTOMER
: No conversion necessary.
Data set DATE-MASTER
: No conversion necessary.
Data set PRODUCT
: No conversion necessary.
Data set SUP-MASTER
: No conversion necessary.
Data set SALES
: No conversion necessary.
Data set INVENTORY
: No conversion necessary.
DBAPLUS has tried to create all the necessary temporary data sets
before beginning the restructuring process and has run out of disk
space. You can:
Applying Changes to the Database Structure
9-13
1) exit DBAPLUS and obtain more disk space or remove some of the
changes in the change file with DBChange and run DBAPLUS again.
2) ask DBAPLUS to try again using a second restructuring method.
This method creates one temporary data set at a time. The
original data set is purged when the changes for that set are
successfully processed. Although this requires less disk space,
there is no guarantee that there is enough disk space for the
entire restructure.
If you receive the preceding message, choose one of the two options
given to complete the restructure. If you choose method 2, be sure
you have a backup copy of the database.
9-14
Applying Changes to the Database Structure
10
DBChange Plus Commands
This chapter provides detailed command syntax descriptions of the
DBChange Plus commands. The commands appear alphabetically.
Before reading this chapter, you should be familiar with the
information in chapter 1, \Introduction to DBChange Plus." To
learn about more DBChange Plus tasks, refer to chapters 2 through
9. For a complete list of tasks and where to nd them in this guide,
refer to the preface.
DBChange Plus
Command Formats
DBChange commands are in the format of one or two keywords
plus parameters. The keywords specify the function. The number
of parameters varies according to the function. Some parameters
are required, while others are optional. If you omit an optional
parameter, the DBCPLUS program uses the default value.
Commands and keywords can be abbreviated. In the command
syntax, the portion of the command or keyword enclosed in
brackets ([ ]) can be omitted. For example, A[DD] FIELD can be
abbreviated to A FIELD. Command and keyword abbreviations are
shown in Table 10-1.
Parameters are positional; they must be entered in the exact order
shown in the command syntax.
A minimum of one blank space is required between keywords. A
blank space or a comma must be used between parameters. A
blank space or comma can be used interchangeably.
Some commands use a slash (/), a left parenthesis, or a right
parenthesis as a delimiter between two parameters.
Some commands use an exclamation point (!) to designate a
primary path.
Some commands use an @ symbol to designate \all."
With the exception of passwords, DBChange Plus is not case
sensitive. DBChange Plus automatically upshifts all alphabetic
input. Passwords, however, must be entered by the user exactly as
they appear in the schema.
The maximum length of a command is 3 lines, each line containing
72 characters, for a total command length of 216 characters.
DBChange Plus does not read any characters exceeding the 72
DBChange Plus Commands
10-1
per line maximum or the 216 total maximum. If a command does
not t on one line, use an ampersand (&), preceded by a blank
or comma, as the last character on a line to indicate that the
command is continued on the next line.
Only one command per command line is allowed. A command can
be up to three lines.
Summary of
DBChange Plus
Table 10-1 summarizes the DBChange Plus commands and provides
command abbreviations.
Commands
10-2
DBChange Plus Commands
Table 10-1. Summary of DBChange Plus Commands
Command
ADD
Keyword
Abbreviation
Description
FIELD
AF
Adds a eld (data item) to a manual master or
detail data set.
ITEM
A ITEM
Adds a data item to the database.
PASSWORD
A PAS
Adds a password to the database.
PATH
A PAT
Adds a path from a detail data set to a master data
set and denes a search item.
SET
A SET
Adds a master or detail data set to the database.
SORT
A SO
Adds a sort item to a search item.
BASE
B
Species the database to be modied.
CANCEL COMMANDS
CA COM
Cancels all changes entered since the last BASE
command.
ERASE
CA E
Cancels the previous ERASE SET command.
REPACK
CA RE
Cancels the previous REPACK SET command.
CHA A
Changes the subitem count, type, and length of a
data item.
CHANGE ATTRIBUTES
BLOCKFACTOR CHA BLOCKF Changes the blocking factor of a data set.
BLOCKMAX
CHA BLOCKM Changes the maximum block length of one or more
data sets.
CAPACITY
CHA CA
Changes the capacity of a data set.
DEVICECLASS
CHA D
Moves a data set from one device (disk) to another.
ITEM
CHA ITEM
Changes the subitem count, type, length, security,
and/or order of a data item.
ITEMSECURITY CHA ITEMSE
Changes user class access to a data item.
PASSWORD
Changes a password.
CHA PAS
PRIMARYPATH CHA PR
Changes the primary path for a detail data set that
has at least two paths.
SETSECURITY
Changes user class access to a data set.
CHA SETSE
DBChange Plus Commands
10-3
Table 10-1. Summary of DBChange Plus Commands (continued)
Command
CHECK
Keyword
Description
BASE
CHE BA
Checks the root le, all data sets, and all paths in
the database for structural integrity and reports any
problems.
PATH
CHE PAT
Checks paths for broken chains and incorrect
pointer linkages and reports any problems.
SET
CHE SET
Checks data sets for internal or pointer
inconsistency and reports any problems.
CONTROL
CON
Species the setting of several options controlling
the way DBChange operates. Automatically adjusts
data set capacities.
COPY
COP
Copies a database.
FIELD
DF
Deletes a eld (data item) from a data set entry.
ITEM
D ITEM
Deletes a data item and its associated elds and
paths from the database.
DELETE
ITEMSECURITY D ITEMSE
Deletes all security specications for a data item.
PASSWORD
D PAS
Deletes a password and all associated user classes
from the database.
PATH
D PAT
Deletes a path from a detail data set.
SET
D SET
Deletes a master or detail data set and its
associated paths from the database.
SETSECURITY
D SETS
Deletes all security specications from a master or
detail data set.
SORT
D SO
Deletes a sort item from a search item in a detail
data set.
SET
ER SET
Erases entries in manual master and detail data
sets.
E
Stops the execution of the DBCPLUS program.
BASE
F BA
Examines all sets and paths in the database and
attempts to correct known problems.
PATH
F PAT
Examines paths for broken chains and incorrect
pointer linkages and attempts to correct known
problems.
SET
F SET
Examines data sets for internal pointer or structural
inconsistency and attempts to correct known
problems.
HELP
H
Provides information about DBChange Plus
commands.
OUTPUT
O
Redirects DBChange Plus output to a le or device.
ERASE
EXIT
FIX
10-4
Abbreviation
DBChange Plus Commands
Table 10-1. Summary of DBChange Plus Commands (continued)
Command
Keyword
Abbreviation
Description
PERFORM COMMANDS PE COM
Invokes DBAPLUS to restructure, check, or
maintain the database according to the commands
stored in the current change le.
PRINT
PR SC
Prints the database schema, applying any changes
stored in the current change le.
REC ITEM
Cancels a data item deletion.
REC SET
Cancels a data set deletion.
R
Allows a user to correct or modify the last
DBChange Plus command entered.
BASE
REN BA
Renames the database.
ITEM
REN ITEM
Renames a data item.
SET
REN SET
Renames a data set.
REO F
Reorders the eld sequence in a manual master or
detail data set.
ITEM
REO ITEM
Reorders the sequence in which the data item
resides in the database.
SET
REO SET
Reorders the sequence in which the data set resides
in the database.
REPACK
SET
REP SET
Rebuilds a detail data set by removing gaps left by
deleted entries and by adjusting pointers.
REVIEW
BLOCKS
REV BLOCK Displays information about the data sets in the
database. Includes data set type, eld count,
blocking factor, and block length.
FIELDS
REV F
Displays information about the elds in master and
detail data sets. Includes search items, sort items,
and linked data sets.
ITEMS
REV ITEM
Displays information about the data items in the
database. Includes attributes and security.
SCHEMA
RECOVER ITEM
SET
REDO
RENAME
REORDER FIELD
XEQ
PASSWORDS REV PAS
Displays information about the user classes and
associated passwords in the database.
PATHS
REV PAT
Displays information about the paths in a data set.
Includes key item, device class, and security.
SETS
REV SET
Displays information about the data sets in the
database. Includes data set type, capacity, blocking
factor, block length, device class, and security.
X
Executes DBChange Plus commands from a le
instead of the standard input device.
DBChange Plus Commands
10-5
Adds a eld (data item) to a manual master or detail data set.
ADD FIELD
A[DD] F[IELD] DataSetName FieldName [( NextField)]
Syntax
Parameters
DataSetName
FieldName
(NextField)
Description
is the name of the manual master or detail
data set to which the eld will be added.
is the name of the eld to be added. It must
already exist as a data item in either the
change le or the database.
is the existing eld that will follow the newly
added eld in the schema. If this parameter
is omitted, the new eld becomes the last
eld in the data set.
Use this command to add a eld (data item) to a manual master
or detail data set. The eld must already exist as a data item in
either the change le or the database. Use the optional NextField
parameter to place the eld in a specied order in the data set.
Otherwise, the newly added eld is placed last. Note that the
occurrence of a data item in a data set is referred to as a eld to
distinguish it from the denition of the data item itself.
Use the ADD ITEM command to add a new data item to the
database.
>add field inventory store# (supplier)
Example
In this example, the eld STORE# is added to the INVENTORY
detail data set. The existing eld, SUPPLIER, will appear directly
after the newly added eld, STORE#, in the schema listing for the
data set.
Before the addition, the schema entry for the INVENTORY detail
data set looks like this:
NAME:
ENTRY:
INVENTORY
STOCK#
ONHANDQTY
SUPPLIER
UNIT-COST
SUPPLIER
LASTSHIPDATE
BINNUM
CAPACITY: 450(15);
10-6
DBChange Plus Commands
,D(12,14/13,18);
(PRODUCT
),
,
(!SUPMASTER ), <---- eld to be added above
,
( DATE-MASTER),
;
ADD FIELD
After the addition, the schema entry for the INVENTORY detail
data set looks like this:
NAME:
ENTRY:
INVENTORY
STOCK#
ONHANDQTY
STORE#
SUPPLIER
UNIT-COST
LASTSHIPDATE
BINNUM
CAPACITY: 450(15);
,D(12,14/13,18);
(PRODUCT
),
,
, <---- new eld added
(!SUPMASTER ),
,
( DATE-MASTER),
;
DBChange Plus Commands
10-7
Adds a data item to the database.
ADD ITEM
Syntax
A[DD] ITEM ItemName [( NextItem)] [ SubitemCount] SubitemType SubitemLength
[([ ReadClassList]/[ WriteClassList])]
Parameters
ItemName
(NextItem)
SubitemCount
SubitemType
SubitemLength
(ReadClassList/
WriteClassList)
10-8
DBChange Plus Commands
is the name of the data item to be
added. Each data item within the
database must have a unique name.
This name must be from 1 to 16
characters, the rst of which must be
alphabetic. Characters after the rst
must be chosen from this set: letters
A - Z, digits 0 - 9, and + * / ? ' # %
& @ only.
is the existing data item that follows
the newly added data item in the
schema. If this parameter is omitted,
the new data item is placed last in the
ITEM part of the schema.
must be an integer from 1 to 255.
For data item types U, X, or Z, the
product of the subitem count and
the subitem length must equal an
even number. For data item type P,
the product of the subitem count and
the subitem length must be evenly
divisible by 4. If this parameter is
omitted, the subitem count is assumed
to be 1.
must be a valid data item type: I, J,
K, R, U, X, Z, or P.
has a maximum of 255 for data item
types U, X, Z, and P. The length for
types I or J must be 1, 2, or 4. For
type K it must be 1 or 2, and for type
R it must be 2 or 4. For data item
types U, X, or Z, the product of the
subitem count and the subitem length
must equal an even number. For
data item type P, the product of the
subitem count and the subitem length
must be evenly divisible by 4.
denes user class access to the data
item. If this entire parameter is
omitted (an absent list), all user
ADD ITEM
classes can read the data item unless
access is further restricted by data set
security. Note that access to a data
item is only possible when the data
item is a eld in a data entry. The
two class lists are dened as follows:
(ReadClassList)
is a list of the
user classes
that have
read-only
access to the
added item.
It can consist
of user class
numbers
from 0 to 63,
separated by
commas. If
this parameter
is empty [for
example,
(/12,14)], no
user classes
have read
access to the
data item
unless access
is allowed
by data set
security.
However,
the database
creator can
read the data
item.
(WriteClassList)
is a list of
the user
classes that
have write
(and implied
read) access
to the data
item. It can
consist of user
class numbers
from 0 to 63,
separated by
commas. If
this parameter
is empty [for
DBChange Plus Commands
10-9
ADD ITEM
example,
(12,14/)], no
user class has
write access to
the data item
unless access
is allowed
by data set
security.
However,
the database
creator can
write to the
data item.
Description
Use this command to add a new data item to the database.
When dening data item security, note that the absence of a
ReadClassList/WriteClassList (an absent list), allows all user classes
to read the data item unless prevented by data set security, while the
null (or empty) list (/), prevents all user classes from accessing the
data item unless allowed by data set security. Note also that data
set security can further restrict or enhance user class access to data
items.
>add item store# j 2 (11,12/14)
Example
In this example, a new data item STORE# is added to the database.
The data item is of type J and has a subitem length of 2. User
classes 11 and 12 have read access and user class 14 has write
access to the new data item. Because NextItem and SubitemCount
parameters are not specied, the new data item appears at the end of
the ITEMS part of the schema and has a subitem count of 1.
Before the addition, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
.
.
.
TOTAL
UNIT-COST
ZIP
10-10
DBChange Plus Commands
, J2(0,11,12,13,14,18/);
, Z2(/13);
, J2(11,14);
, P8(/12);
, X6(12,13,14/11);
<---- item to be added after ZIP
ADD ITEM
After the addition, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
.
.
.
TOTAL
UNIT-COST
ZIP
STORE#
, J2(0,11,12,13,14,18/);
, Z2(/13);
,
,
,
,
J2(11,14);
P8(/12);
X6(12,13,14/11);
J2(11,12/14);
<---- new item added
DBChange Plus Commands
10-11
ADD PASSWORD
Adds a password to the database.
A[DD] PAS[SWORD] Password UserClass
Syntax
Parameters
is the new password. Passwords are case
sensitive and are not upshifted like other
schema names. Therefore, an uppercase
character is distinguished from a lowercase
character. A password must be from 1 to 8
characters, excluding carriage returns, slashes,
semicolons, and blanks.
is the user class number associated with the
new password. A user class number from 1
to 63 must be associated with one password
in the database and must be unique within
the PASSWORD part of the schema. This
number is used to dene data item and data
set security associated with the password.
Password
UserClass
Description
Use this command to add a new password to the database. Both the
Password and UserClass parameters are required.
>add password MANAGER 20
Example
In this example, the new password \MANAGER" is added. The user
class number 20 is associated with this new password and it, instead
of the password, is used in the data item and data set read and write
class lists to dene data item and data set security. Note that the
user must enter \MANAGER" exactly as it appears; \manager" or
\Manager" are not equivalent.
Before the addition, the PASSWORDS part of the schema looks like
this:
PASSWORDS:
11 CREDIT
12 BUYER
13 SHIP-REC
14 CLERK
18 DO-ALL
10-12
DBChange Plus Commands
;
;
;
;
;
<---- password to be added after DO{ALL
ADD PASSWORD
After the addition, the PASSWORDS part of the schema looks like
this:
PASSWORDS:
11 CREDIT
12 BUYER
13 SHIP-REC
14 CLERK
18 DO-ALL
20 MANAGER
;
;
;
;
;
;
<---- password added
DBChange Plus Commands
10-13
Adds a path to a detail data set.
ADD PATH
Syntax
A[DD] PAT[H] DetailDataSetName SearchItemName [!] MasterDataSetName [ SortItemName]
Parameters
DetailDataSetName
SearchItemName
!
MasterDataSetName
SortItemName
Description
is the name of the detail data set that will
contain the new path.
is the name of the search item for the new
path.
indicates that the new path is to be the
primary path. Only one path in a detail data
set can be designated as the primary path.
If this parameter is omitted, a primary path
previously designated will remain in eect. If
no primary path has been designated, the
rst unsorted path listed for the data set in
the schema becomes the primary path by
default. No space is allowed between ! and
MasterDataSetName .
is the master data set related to the search
item. It must be an existing data set and
must be listed in the schema before the
specied detail data set containing.
is the name of the sort item for the new path.
If this parameter is omitted, the entries will
not be sorted. The sort item must be an
existing eld in the detail data set.
Use this command to add a new path to a detail data set. Place an
exclamation point (!) before the name of the master data set to
dene the path as the primary path. The primary path should be
the path in the data set most frequently accessed. A newly dened
primary path replaces any existing primary path.
Note that a master data set must be listed in the schema before any
related detail data sets. Use the REORDER SET command if it is
necessary to reorder data sets.
>add path inventory stock# !product
Example
In this example, a new path is added to the detail data set
INVENTORY and is designated as the primary path. PRODUCT is
the related master data set. No sort item has been specied for the
path. Use the REORDER SET command if it is necessary to reorder
data sets.
10-14
DBChange Plus Commands
ADD PATH
Before the addition, the schema entry for the INVENTORY data set
looks like this (note that the path to SUP{MASTER is the existing
primary path):
NAME:
ENTRY:
INVENTORY ,D(12,14/13,18);
STOCK#
,
ONHANDQTY
,
SUPPLIER
(!SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE (DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
<---- path to be added
<---- path to be changed
After the addition, the schema entry for the INVENTORY data set
looks like this:
NAME:
ENTRY:
INVENTORY ,D(12,14/13,18);
STOCK#
(!PRODUCT
),
ONHANDQTY
,
SUPPLIER
(SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE (DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
<---- primary path added
<---- path no longer primary
DBChange Plus Commands
10-15
Adds a new master or detail data set to the database.
ADD SET
Syntax
2
2
9
:
D
3 3
;
DataSetName
A
M
D
KeyItem
(ReadClassList/
WriteClassList)
DBChange Plus Commands
3 2
KeyItem =
M KeyItem
) SetCapacity
( ReadClassList32 / WriteClassList
3
( BlockFactor) DeviceClass
(NextSet)
10-16
8
A
3<
A DD SET DataSetName ( NextSet)
2 2
Parameters
2
3
is the name of the data set to be
added. This name must be from 1 to
16 characters, the rst of which must
be alphabetic. Characters after the
rst must be chosen from this set:
letters A - Z, digits 0 - 9, and + * / ?
' # % & @ only.
is the data set that follows the newly
added data set in the schema. If this
parameter is omitted, the new data
set is placed last in the SETS part of
the schema. Detail data sets must be
dened after any master data sets
related by a shared path.
is used if you are adding an automatic
master data set.
is used if you are adding a manual
master data set.
is used if you are adding a detail data
set.
is the key item for a master data
set. This parameter is required when
adding a master data set and cannot
be used when adding a detail data set.
denes user class access to the data
set. If this entire parameter is omitted
(an absent list), all user classes can
read the data set. (Data item security
may allow update access to individual
elds within the data set if the data
item has read access to the data set
and is in the write class list of the
data item.) The class lists are dened
below:
(ReadClassList)
is a list of user
classes having
read access to
ADD SET
SetCapacity
(BlockFactor)
the new data
set. It can
consist of user
class numbers
from 0 to 63,
separated by
commas. If
this parameter
is empty [for
example,
(/12,14)],
only users
with write
access can
read the data
set. However,
the database
creator can
read the data
set.
(WriteClassList)
is a list of user
classes that
have write
access to the
new data
set. It can
consist of user
class numbers
from 0 to 63,
separated by
commas. If
this parameter
is empty [for
example,
(12,14/)], no
user class has
write access
to the data
set. However,
the database
creator can
write to the
data set.
must be less than 231 01
(2,147,483,647).
is the new block factor for the data
set. If this parameter is omitted,
DBSCHEMA calculates the optimal
block factor for a block size of 512
DBChange Plus Commands
10-17
ADD SET
DeviceClass
Description
words or for a block size specied by
the DBSchema $CONTROL command
or by the CHANGE BLOCKMAX
command.
is the disk on which the data set will
reside. If this parameter is omitted,
DBSCHEMA defaults to device class
DISK.
Use this command to add a new data set to the database. When
adding master data sets, the KeyItem parameter must be used. Also
remember that all master data sets must appear in the schema before
their related detail data sets. Use the REORDER SET command if
it is necessary to reorder data sets.
Use the ADD FIELD command on detail and manual master data
sets and the ADD PATH command on detail data sets to complete
the denition of the newly created data set.
Data Set Security
When dening data set security, note that the absence of a
ReadClassList/WriteClassList (an absent list) allows all user classes
to read the data set, while the null (or empty) list (/), prevents
everyone except the database creator from accessing the data set.
Note that user classes with read-only access to a data set may be
allowed to update elds (data items) within the data set if they are
allowed write access to the data item.
Example
>add set binnum-master (inventory) A binnum (14/11,18) 221 disk2
In this example, a new automatic master data set, BINNUM{
MASTER, is added to the database. It has a capacity of 221. DISK2
is the device class for the newly added data set. User class 14 has
read access to the data set, and user classes 11 and 18 have write
access (and implied read access). Because the NextSet parameter is
used, the data set appears directly before the INVENTORY data set
in the schema. The ADD PATH command can now be used to dene
paths for the data set.
Before the addition, the SETS part of the schema looks like this:
10-18
DBChange Plus Commands
ADD SET
SETS:
NAME:
ENTRY:
CUSTOMER
,M(14/11,18);
ACCOUNT
(1)
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
CREDIT-RATING
CAPACITY: 221(10);
,
,
,
,
,
,
,
;
NAME:
DATE-MASTER ,A(0,11,12,13,14,18/)
ENTRY:
DATE
(3)
CAPACITY: 211(9);
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18)
STOCK#
(2)
DESCRIPTION
CAPACITY: 307(16)
NAME:
ENTRY:
SALES
,D(11/14,18)
ACCOUNT
( CUSTOMER (PURCH-DATE)
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
NAME:
ENTRY:
SUP-MASTER ,M(13/12,18);
SUPPLIER
(1)
STREET-ADD
CITY
STATE
ZIP
CAPACITY: 211(12);
NAME:
ENTRY:
INVENTORY ,D(12,14/13,18);
STOCK#
(PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
UNIT-COST
LASTSHIPDATE ( DATE-MASTER
)
)
)
)
,
,
,
,
;
<---- data set to be added
before INVENTORY
),
,
),
,
),
DBChange Plus Commands
10-19
ADD SET
BINNUM
CAPACITY: 450(15);
END.
10-20
DBChange Plus Commands
;
ADD SET
After the addition, the SETS part of the schema looks like this:
SETS:
NAME:
ENTRY:
CUSTOMER
,M(14/11,18);
ACCOUNT
(1)
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
CREDIT-RATING
CAPACITY: 221(10);
,
,
,
,
,
,
,
;
NAME:
DATE-MASTER ,A(0,11,12,13,14,18/);
ENTRY:
DATE
(2)
CAPACITY: 211(19);
;
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18);
STOCK#
(1)
DESCRIPTION
CAPACITY: 307(16);
NAME:
ENTRY:
SALES
,D(11/14,18);
ACCOUNT
( CUSTOMER (PURCH-DATE)
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
NAME:
ENTRY:
SUP-MASTER ,M(13/12,18);
SUPPLIER
STREET-ADD
CITY
STATE
ZIP
CAPACITY: 211(12);
NAME:
BINNUM-MASTER ,A(14/11,18);
ENTRY:
BINNUM
CAPACITY: 221(10);
,
;
),
),
,
,
,
,
),
);
,
,
,
,
;
<---- data set added
;
DBChange Plus Commands
10-21
ADD SET
NAME:
ENTRY:
INVENTORY ,D(12,14/13,18);
STOCK#
(PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
UNIT-COST
LASTSHIPDATE ( DATE-MASTER
BINNUM
CAPACITY: 450(15);
END.
10-22
DBChange Plus Commands
),
,
),
,
),
;
ADD SORT
Adds a new sort item to a search item of a path.
ADD SORT
Syntax
A[DD] SO[RT] DetailDataSetName SearchItemName SortItemName
Parameters
DetailDataSetName
SearchItemName
SortItemName
Description
Example
is the name of the detail data set for the new
sort item.
is the name of the search item whose chains
are sorted based on the new sort item values.
is the name of the new sort item. It must be
an existing eld in the data set.
Use this command to add a new sort, or to replace an existing sort
item, to a search item of a path. All parameters are required. If a
sort item already exists for the path, the new sort item replaces it.
The sort item must be a data item other than the current search
item for that path. Only data items types U, K, or X can be sort
items.
>add sort sales account purch-date
In this example, the sort item PURCH{DATE is added to the path
dened by the search item ACCOUNT in the detail data set SALES.
Before the addition, the SALES data set entry in the schema looks
like this:
NAME:
ENTRY:
SALES
,D(11/14,18);
ACCOUNT
( CUSTOMER
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
), <---- sort item to be added
),
,
,
,
,
),
);
DBChange Plus Commands
10-23
ADD SORT
After the addition, the SALES data set entry in the schema looks like
this:
NAME:
ENTRY:
CAPACITY:
10-24
DBChange Plus Commands
SALES
,D(11/14,18);
ACCOUNT
( CUSTOMER (PURCH-DATE)), <---- sort item added
STOCK#
(!PRODUCT
),
QUANTITY
,
PRICE
,
TAX
,
TOTAL
,
PURCH-DATE ( DATE-MASTER
),
DELIV-DATE ( DATE-MASTER
);
504(14);
BASE
Species the database to be modied.
BASE
Syntax
Parameters
2
3
DatabaseName
NEW
OLD
PURGECF
Description
3
NEW
5
B ASE DatabaseName 4 OLD
PURGECF
2
is the name of the database to be modied.
It cannot be qualied with the group and
account names.
creates a new change le ( DatabaseName CF).
If an old change le exists, it is purged. This
parameter is the default.
uses the existing change le and adds to it.
purges the existing change le without
creating a new change le.
Use this command to specify the name of the database you want
to modify. The BASE command must be entered before any other
DBChange commands, except COPY, HELP, OUTPUT, REDO,
and XEQ. The BASE command has the three following change le
options:
NEW|used to create a new change le. If an old change le exists
it is purged. In interactive mode, if NEW is specied and a change
le already exists, a conrmation message is displayed asking if you
want to purge the old change le and create a new one. In batch
mode, the old change le is purged automatically and a new one is
created.
OLD|used to enter additional changes to an existing change
le. In interactive mode, if no change le exists, the DBCPLUS
program asks if you want to create a new change le. In batch
mode, if no change le exists, an error occurs and all commands
after that are invalid.
PURGECF|used to purge the existing change le without
creating a new change le. In interactive mode, you are prompted
for conrmation and asked if a new change le should be created
after the existing change le is purged.
DBChange Plus Commands
10-25
BASE
>base orders purgecf
To purge change file, confirm purge [y/N] ? y
Change file ORDERSCF has been purged.
Example
No old change file. Create new file [y/N] ? y
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
>
In this example, the existing change le for the ORDERS database is
purged. The DBCPLUS program asks you to conrm the purge and
returns a message conrming that the change le ORDERSCF has
been purged. The DBCPLUS program then asks if you want a new
change le created. Messages are returned conrming the creation of
the new change le.
10-26
DBChange Plus Commands
CANCEL COMMANDS
Cancels all changes entered in the change le since the last BASE
command.
CANCEL
COMMANDS
CA[NCEL] COM[MANDS]
Syntax
Description
Use this command to cancel all changes entered since the last BASE
command. After issuing CANCEL COMMANDS, the change le
returns to the state it was in just after the most recent BASE
command. To continue using the DBCPLUS program after issuing
CANCEL COMMANDS, you must issue a new BASE command.
Example
>add item ship-cost j 4 (/12,13,14,18)
Addition of data item accepted.
>add field sales ship-cost
Addition of field accepted.
>cancel commands
Completed CANCEL COMMANDS, existing change file is intact.
>base orders
>
In this example, some restructuring commands are canceled and the
DBCPLUS program returns the change le to the state it was in
when the BASE command was issued.
Before issuing the restructuring commands to the ORDERS change
le, the ITEMS part of the schema and the SALES data entry in the
schema look like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
I4(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14/11);
R2(/14);
X6(11,12,13,14,18/);
X6(/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
DBChange Plus Commands
10-27
CANCEL COMMANDS
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
,
,
,
,
,
,
,
,
X2(12,13,14/11);
U8(0,11,12,14,18/);
X26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14/);
P8(/12);
X6(12,13,14/11);
SETS:
.
.
.
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 500(10);
,D(11/14,18);
( CUSTOMER
(!PRODUCT
( DATE-MASTER
( DATE-MASTER
(PURCH-DATE
)),
),
,
,
,
,
),
);
Before canceling the restructuring commands, the ITEMS part of the
schema and the SALES data set entry in the schema look like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
10-28
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
I4(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14/11);
R2(/14);
X6(11,12,13,14,18/);
X6(/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14/11);
U8(0,11,12,14,18/);
X26(12,13,14/11);
X16(12,13/);
J2(14/);
DBChange Plus Commands
CANCEL COMMANDS
TOTAL
UNIT-COST
ZIP
SHIP-COST
,
,
,
,
J2(11,14/);
P8(/12);
X6(12,13,14/11);
J4(/12,13,14,18);
<---- data item added
SETS:
..
.
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
SHIP-COST
,D(11/14,18);
( CUSTOMER
(!PRODUCT
(PURCH-DATE
( DATE-MASTER
( DATE-MASTER
)),
),
,
,
,
,
),
),
; <---- eld added
After canceling the restructuring commands, the ITEMS part of the
schema and the SALES data set entry in the schema look like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
I4(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14/11);
R2(/14);
X6(11,12,13,14,18/);
X6(/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14/11);
U8(0,11,12,14,18/);
X26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14/);
P8(/12);
X6(12,13,14/11); <---- 1
DBChange Plus Commands
10-29
CANCEL COMMANDS
SETS:
.
.
.
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 500(10);
1
2
10-30
data item addition canceled
eld addition canceled
DBChange Plus Commands
,D(11/14,18);
( CUSTOMER
(!PRODUCT
( DATE-MASTER
( DATE-MASTER
(PURCH-DATE
)),
),
,
,
,
,
),
);
<----
2
CANCEL ERASE
CANCEL ERASE
Syntax
Cancels the previous ERASE SET command.
CAN[CEL] E[RASE] DataSetName
is the name of the data set which should not
be erased.
Parameters
DataSetName
Description
Use this command to cancel a previous ERASE SET command
stored in the change le for a specied data set. Note that once
DBAPLUS has been run, the erased data set entries cannot be
recovered.
Example
>erase set inventory
To confirm erase of data set, enter [y/N].y
Erase Set issued for data set.
>cancel erase inventory
Cancel erase of data set.
>
In this example, the ERASE SET command issued for the
INVENTORY data set entries is canceled.
DBChange Plus Commands
10-31
CANCEL REPACK
Cancels the previous REPACK SET command.
CAN[CEL] RE[PACK] DataSetName
Syntax
is the name of the data set which should not
be repacked.
Parameters
DataSetName
Description
Use this command to cancel a previous REPACK SET command
stored in the change le for a specied data set. Note that once
DBAPLUS has been run, the REPACK SET command cannot be
canceled.
>repack set sales chained
REPACK SET issued for data set.
Example
>cancel repack sales
Cancel repack of data set.
>
In this example, the REPACK SET command issued for the SALES
data set is canceled.
10-32
DBChange Plus Commands
CHANGE ATTRIBUTES
Changes the subitem count, type, and/or length of a data item.
CHANGE
ATTRIBUTES
Syntax
CHA[NGE] A[TTRIBUTES] DataItemName [ SubitemCount] SubitemType SubitemLength
Parameters
DataItemName
SubitemCount
SubitemType
SubitemLength
Description
is the name of the data item whose attributes
are changed. Each data item within the
database must have a unique name. This
name must be from 1 to 16 characters, the
rst of which must be alphabetic. Characters
after the rst must be chosen from this set:
letters A - Z, digits 0 - 9, and + * / ? ' # %
& @ only.
must be an integer from 1 to 255. For data
item types U, X, or Z, the product of the
subitem count and the subitem length must
equal an even number. For data item type P,
the product of the subitem count and the
subitem length must be evenly divisible by
4. If this parameter is omitted, the subitem
count is assumed to be 1.
must be a valid data item type: I, J, R, U, X,
Z, or P.
must be an integer from 1 to 200 for data
item types U, X, Z, and P. The length for
types I or J must be 1, 2, or 4. For type K,
it must be 1 or 2, and for type R, it must be
2 or 4. For data item types U, X, or Z, the
subitem count and the subitem length must
be an even number. For data item type P,
the product of the subitem count and the
subitem length must be evenly divisible by 4.
Use this command to change the subitem count, type, and/or length
of a data item. This command is similar to CHANGE ITEM;
however, use the CHANGE ATTRIBUTE command when you only
want to change data item attributes but do not want to change the
security or order in which the data item appears in the ITEMS part
of the schema.
DBChange Plus Commands
10-33
CHANGE ATTRIBUTES
>change attributes store# X 4
Example
In this example, the attributes of the data item STORE# are
changed. The subitem type is changed to X and the subitem length
to 4. Because the SubitemCount parameter is not specied, the
subitem count does not change.
Before the change, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
STORE#
10-34
DBChange Plus Commands
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/14);
X6(0,11,12,13,14,18/);
X6((/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
X6(12,13,14/11);
J2(11,12/14);
<---- attributes to be changed
CHANGE ATTRIBUTES
After attributes change, the ITEMS part of the schema looks like
this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
STORE#
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/14);
X6(0,11,12,13,14,18/);
X6((/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
X6(12,13,14/11);
X4(11,12/14);
<---- attributes changed
DBChange Plus Commands
10-35
Changes the blocking factor of a data set.
CHANGE
BLOCKFACTOR
CHA[NGE] BLOCKF[ACTOR] DataSetName NewBlockFactor
Syntax
Parameters
DataSetName
NewBlockFactor
Description
is the name of the data set to be
reblocked.
is the number of data set records in
one block. If zero is specied, it takes
the value calculated by DBSCHEMA.
Use this command to change the blocking factor of a data set.
When selecting a blocking factor, remember that the resulting block
length must not be larger than the maximum block length for the
data set. That is, if the media record is 6 words and the maximum
block length is 85, the blocking factor cannot be greater than 14
(85/6=14). The default maximum block size is 512, but it may have
been redened with a DBSCHEMA $CONTROL command or with a
previous CHANGE BLOCKMAX command.
The blocking factor must be a number that can be evenly divided
into the capacity.
Note
If you change the blocking factor to a number that cannot be evenly
divided into the capacity, DBSCHEMA (called by the DBAPLUS
program) adjusts the capacity to a multiple of the new blocking
factor closest to the current capacity.
To change the maximum block size for a data set, use the CHANGE
BLOCKMAX command.
>change blockfactor sales 16
Example
In this example, the blocking factor of the SALES data set is
changed to 16.
Before the change, the SALES data set entry in the schema looks like
this:
NAME:
ENTRY:
10-36
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
,D(11/14,18);
( CUSTOMER ( PURCH-DATE
(!PRODUCT
( DATE-MASTER
( DATE-MASTER
DBChange Plus Commands
)),
),
,
,
,
,
),
);
CHANGE BLOCKFACTOR
CAPACITY: 504(14);
<---- blocking factor to be changed
DBChange Plus Commands
10-37
CHANGE BLOCKFACTOR
After the change, the SALES data set entry in the schema looks like
this:
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 504(16);
10-38
DBChange Plus Commands
,D(11/14,18);
( CUSTOMER
( PURCH-DATE )),
(!PRODUCT
),
,
,
,
,
( DATE-MASTER
),
( DATE-MASTER
);
<---- blocking factor changed
CHANGE BLOCKMAX
Changes the maximum block length of one or more data sets.
CHANGE
BLOCKMAX
Syntax
2
3
2
CHA NGE BLOCKM AX
BlockMaxNumber
Parameters
DataSetName
FirstDataSetName /
LastDataSetName
@
BlockMaxNumber
Description
8
DataSetName
3<
:
9
=
FirstDataSetName/LastDataSetName
;
@
is the name of the data set to be
assigned the new maximum block
length.
are names that dene a range of data
sets to be assigned the new maximum
block length.
is used to change the maximum block
length for all the data sets in the
database.
is the new maximum physical block
length in words. It must be a
number from 128 to 2048 or 0. If 0 is
specied, it takes the value calculated
by DBSCHEMA.
Use this command to change the maximum block length of one or
more data sets. Multiple CHANGE BLOCKMAX commands may be
issued. If multiple commands include overlapping ranges of data sets,
the MaxBlockNumber in the last CHANGE BLOCKMAX command
is in eect for the data set range indicated. For example, if one
CHANGE BLOCKMAX command is issued for data sets 1 through
4 and the next CHANGE BLOCKMAX command is issued for data
sets 3 through 5, the rst BlockMaxNumber is in eect for data sets
1 and 2 and the second BlockMaxNumber is in eect for data sets
3 through 5. To verify the order of the data sets before using the
CHANGE BLOCKMAX command, use the REVIEW BLOCKS or
REVIEW SETS command.
The BLOCKMAX must be large enough to accommodate the
blocking factor. That is, if the media record is 6 words, and the
blocking factor is 14, the BLOCKMAX must be at least 85 words.
To change the blocking factor of the data set, use CHANGE
BLOCKFACTOR.
Example
>change blockmax sales 1024
In this example, the maximum block length of the SALES data set is
changed to 1024.
DBChange Plus Commands
10-39
CHANGE BLOCKMAX
Before the change, the SALES data set entry in the schema looks like
this:
$CONTROL BLOCKMAX = 640
NAME:
SALES
,D(11/14,18);
ENTRY: ACCOUNT
( CUSTOMER (PURCH-DATE
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
<---- block length to be changed
)),
),
,
,
,
,
),
);
After the change, the SALES data set entry in the schema looks like
this:
$CONTROL BLOCKMAX = 1024
NAME:
SALES
,D(11/14,18);
ENTRY:
ACCOUNT
( CUSTOMER (PURCH-DATE
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
10-40
DBChange Plus Commands
<---- block length changed
)),
),
,
,
,
,
),
);
CHANGE CAPACITY
CHANGE CAPACITY
Syntax
Parameters
Changes the capacity of a data set.
CHA[NGE] CA[PACITY] DataSetName NewCapacity
DataSetName
NewCapacity
is the name of the data set whose capacity is
to be changed.
is the new capacity of the data set. It must
be less than 231 01 (2,147,483,647), but
cannot be less than the current number of
entries in the data set.
Description
Use this command to change the capacity of a data set. For
performance reasons, it is recommended that you do not use a
number that is a power of two for the capacity of a master data set.
The capacity must be a number that can be evenly divided by the
blocking factor. If you change the capacity to a number that cannot
be evenly divided by the blocking factor, DBChange Plus adjusts the
specied capacity to the nearest multiple of the blocking factor.
Note
If a data set capacity is lowered below the greatest number of entries
the data set has ever contained (the high-water mark), DBChange
Plus displays a recommendation to use the REPACK SET command.
Example
>change capacity inventory 503
In this example, the capacity of the data set INVENTORY is
changed from 450 to 503. However, because 503 cannot be evenly
divided by the blocking factor of 15, the capacity is automatically
adjusted to the nearest multiple of the blocking factor, which is 510.
Before the change, the INVENTORY data set entry in the schema
looks like this:
NAME:
ENTRY:
INVENTORY
,D(12/13,14,18);
STOCK#
( PRODUCT
),
ONHANDQTY
,
SUPPLIER
(!SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE
( DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
<---- capacity to be changed
DBChange Plus Commands
10-41
CHANGE CAPACITY
After the change, the INVENTORY data set entry in the schema
looks like this:
NAME:
ENTRY:
INVENTORY
,D(12/13,14,18);
STOCK#
( PRODUCT
),
ONHANDQTY
,
SUPPLIER
(!SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE
( DATE-MASTER ),
BINNUM
;
CAPACITY: 510(15);
<---- capacity changed
10-42
DBChange Plus Commands
CHANGE DEVICECLASS
Moves a data set from one device (disk) to another.
CHANGE
DEVICECLASS
Syntax
Parameters
CHA[NGE] D[EVICECLASS] DataSetName NewDeviceClass
DataSetName
NewDeviceClass
Description
Example
is the name of the data set whose device class
is to be changed.
is the class of the device where the data set
will reside.
Use this command to move a data set to another device. A device
class can span multiple disk drives.
>change deviceclass sales disk2
In this example, the SALES data set is moved from the default class
DISK to a disk drive identied by the device class of DISK2.
Before the change, the SALES data set entry in the schema looks like
this:
SALES
,D(11/14,18);
<---- device class to be changed
ACCOUNT
( CUSTOMER ( PURCH-DATE )),
STOCK#
(!PRODUCT
),
QUANTITY
,
PRICE
,
TAX
,
TOTAL
,
PURCH-DATE ( DATE-MASTER
),
DELIV-DATE ( DATE-MASTER
);
CAPACITY: 504(14);
NAME:
ENTRY:
After the change, the SALES data set entry in the schema looks like
this:
NAME:
ENTRY:
SALES
,D(11/14,18),DISC2;
ACCOUNT
( CUSTOMER ( PURCH-DATE
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
)),
),
,
,
,
,
),
);
<---- device class changed
DBChange Plus Commands
10-43
CHANGE ITEM
Changes the subitem count, type, length, security, and/or order of a
data item. (For information about supported item type conversions,
refer to Table 10-2 later in this section.)
Syntax
CHA[NGE] ITEM DataItemName [( NextItem)] [ SubitemCount] SubitemType SubitemLength
[([ ReadClassList]/[ WriteClassList])]
Parameters
DataItemName
(NextItem)
SubitemCount
SubitemType
SubitemLength
10-44
DBChange Plus Commands
is the name of the data item to be
changed. It must be an existing data
item in the database.
is the name of the data item that will
follow the changed data item in the
schema. If this parameter is omitted,
the data item order is not changed.
must be an integer from 1 through
255. For data item types U, X, or
Z, the product of the subitem count
and the subitem length must be an
even number. For data item type P,
the product of the subitem count
and the subitem length must be
evenly divisible by 4. The default
is 1 subitem. If this parameter is
selected, the SubitemType and the
SubitemLength parameters are also
required. If this parameter is omitted,
the subitem count remains unchanged.
must be a valid data item type: I, J,
K, R, U, X, Z, or P. If this parameter
is selected, the SubitemLength
parameter is also required. If this
parameter is omitted, the subitem
type remains unchanged.
must be an integer from 1 to 255
for data item types U, X, Z, and P.
The length for types I or J must
be 1, 2, or 4. If this parameter is
selected, the SubitemType parameter
is also required. If this parameter is
omitted, the subitem length remains
unchanged.
CHANGE ITEM
(ReadClassList/
WriteClassList)
denes user class access to the
data set. If this entire parameter
is omitted, the data item security
remains unchanged. The class lists are
dened as follows:
(ReadClassList)
is a list of user
classes having
read access
to the data
set. It can
consist of user
class numbers
from 0 to 63,
separated by
commas. If
this parameter
is empty [for
example,
(/12,14)],
read access
to the data
set remains
unchanged.
(WriteClassList)
is a list of user
classes that
have write
(and implied
read) access
to the data
set. It can
consist of user
class numbers
from 0 to 63,
separated by
commas. If
this parameter
is empty [for
example
(12,14/)],
write access
to the data
set remains
unchanged.
DBChange Plus Commands
10-45
CHANGE ITEM
Description
Use this command when making several data item changes at the
same time.
Note
Several parameters are interrelated. For example, if you enter the
subitem count, you must enter the subitem type and the subitem
length, even if the last two parameters have not changed. The
SubitemType and SubitemLength parameters are also interrelated.
If you enter one, you must enter the other, even if only one has
changed.
When making changes to data item security, remember that access to
data items within data sets may be further allowed or restricted by
data set security.
Item Type Conversions
DBChange Plus supports type conversion for all data item types
dened in the TurboIMAGE/XL Reference Manual with the
exception of I4 and J4. The following table shows the data item type
conversions supported by DBChange Plus. An x in the appropriate
box indicates that you can convert the current item type to the new
item type.
Table 10-2. DBChange Plus Supported Item Type Conversions
New Item Type
I1,I2
J1,J2
K1
P
R2,R4
U
X
Z
I1,I2
x
x
x
x
x
x
x
x
J1,J2
x
x
x
x
x
x
x
x
K1
x
x
x
x
x
x
x
x
P
x
x
x
x
x
x
x
R2,R4
x
x
x
U
x
x
X
x
x
x
x
Current
Item Type
Z
x
Caution
10-46
x
x
x
x
x
When converting data item types, overow, underow, and
truncation may occur if you are reducing data item size. Be sure to
verify that data item conversions do not result in loss of data.
DBChange Plus Commands
CHANGE ITEM
Example
>change item deliv-date 2 u 6 (/11,14)
In this example, the subitem count of the data item DELIV{DATE
is changed to 2, the subitem type to U, and the subitem length to 6.
User class 11 has also been given write access to the data item. Note
that the subitem length must be entered even though it has not been
changed. Because NextItem was not entered, the data item order
remains the same.
Before the change, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/14);
X6(0,11,12,13,14,18/);
X6(/14);
<---- item to be changed
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
X6(12,13,14/11);
After the change, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
,
,
,
,
,
,
,
,
,
,
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/14);
X6(0,11,12,13,14,18/);
2U6(/11,14);
<---- item changed
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
DBChange Plus Commands
10-47
CHANGE ITEM
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
STORE#
10-48
DBChange Plus Commands
,
,
,
,
,
,
,
,
,
,
,
,
,
,
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
X6(12,13,14/11);
J2(11,12/14);
CHANGE ITEMSECURITY
Changes user class access to a data item.
CHANGE
ITEMSECURITY
2
Parameters
3
DataItemName
UserClassNumber
R
W
N
Description
Example
2
3
CHA NGE ITEMSE CURITY DataItemName UserClassNumber
8 9
<R=
W
: ;
N
Syntax
is the name of a data item whose security is
to be changed.
is a user class number dened in the
PASSWORD part of the schema. User class
numbers are used in the schema security lists
to dene access to each data set and data
item.
allows read-only access to the data item.
allows write access (and implied read access)
to the data item.
denies any access to the data item.
Use this command to change user class access to a data item. To
deny all users access, create a null (or empty) list (/), which allows
only the creator access to the data item. When making changes to
data item security, remember that access to data items within data
sets may be further allowed or restricted by data set security.
>change itemsecurity quantity 18 w
>change itemsecurity quantity 14 r
>change itemsecurity credit-rating 14 n
In this example, user class 18 is given write access to the data
item QUANTITY. User class 14 is given read access to the data
item QUANTITY and is denied any access to the data item
CREDIT{RATING.
Before the change, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
,
,
,
,
,
,
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/14);
X6(0,11,12,13,14,18/);
X6(/14);
<---- security to be changed
DBChange Plus Commands
10-49
CHANGE ITEMSECURITY
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
<---- security to be changed
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
X6(12,13,14/11);
After the change, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
10-50
DBChange Plus Commands
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/);
<---- security changed
X6(0,11,12,13,14,18/);
X6(/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(14/18);
<---- security changed
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
X6(12,13,14/11);
CHANGE PASSWORD
Changes a password.
CHANGE
PASSWORD
Syntax
CHA[NGE] PAS[SWORD] OldPassword NewPassword [ UserClass]
Parameters
is the password to be changed.
is the new password. Passwords are case
sensitive; that is, uppercase is distinguished
from lowercase by TurboIMAGE/XL. A
password must be from 1 to 8 characters
long. It cannot include carriage returns,
slashes (/ or n), semicolons (;), or blanks.
is the user class to be changed. If this
parameter is omitted, the user class
associated with the old password is changed.
OldPassword
NewPassword
UserClass
Description
Example
Use this command to change a password. The OldPassword and
NewPassword parameters are required.
>change password CLERK SALESREP
In this example, the password CLERK is changed to SALESREP.
The user must enter SALESREP exactly as it is; \salesrep" is not
equivalent.
Before the change, the PASSWORDS part of the schema looks like
this:
PASSWORDS:
11 CREDIT
12 BUYER
13 SHIP-REC
14 CLERK
18 DO-ALL
;
;
;
;
;
<---- password to be changed
After the change, the PASSWORDS part of the schema looks like
this:
PASSWORDS:
11 CREDIT
12 BUYER
13 SHIP-REC
14 SALESREP
18 DO-ALL
;
;
;
;
;
<---- password changed
DBChange Plus Commands
10-51
Changes the primary path of a detail data set.
CHANGE
PRIMARYPATH
CHA[NGE] PRI[MARYPATH] DataSetName SearchItemName
Syntax
Parameters
DataSetName
SearchItemName
Description
is the name of the detail data set whose
primary path is to be changed.
is the name of the search item for the new
primary path.
Use this command to change the primary path of a detail data set.
>change primarypath inventory stock#
Example
In this example, the primary path in the detail data set
INVENTORY is changed to the path dened by the STOCK# search
item.
Before the change, the INVENTORY data set entry in the schema
looks like this:
NAME:
ENTRY:
INVENTORY ,D(12,14/13,18);
STOCK#
(PRODUCT
),
ONHANDQTY
,
SUPPLIER
(!SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE ( DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
<---- to become primary path
<---- path to be changed
After the change, the INVENTORY data set entry in the schema
looks like this:
NAME:
ENTRY:
INVENTORY ,D(12,14/13,18);
STOCK#
(!PRODUCT
),
ONHANDQTY
,
SUPPLIER
( SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE ( DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
10-52
DBChange Plus Commands
<---- path now primary path
<---- path no longer primary
CHANGE SETSECURITY
Changes user class access to a data set.
CHANGE
SETSECURITY
Syntax
Parameters
2
3
3
CHA NGE SETSE CURITY DataSetName UserClassNumber
DataSetName
UserClassNumber
R
W
N
Description
2
8 9
<R=
:
W
;
N
is the name of a data set whose security is to
be changed.
is a user class number dened in the
PASSWORDS part of the schema. User class
numbers are used in the schema read and
write class lists to dene access to each data
set and data item.
allows read-only access to the data set.
allows write access to the data set (and
implied read access).
denies any access to the data set.
Use this command to change user class access to a data set. To deny
all users access, create a null (or empty) list (/), which allows only
the creator to access the data set.
When making changes to data set security, remember that access to
data items within data sets may be further enhanced or restricted by
data item security.
Example
>change setsecurity inventory 18 w
>change setsecurity inventory 12 n
In this example, user class 18 is given write access (and implied read
access) to the data set INVENTORY. User class 12 no longer has any
access to the data set.
Before the changes, the INVENTORY data set entry in the schema
looks like this:
NAME:
ENTRY:
INVENTORY
,D(12,14/13);
STOCK#
(PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
UNIT-COST
LASTSHIPDATE ( DATE-MASTER
BINNUM
CAPACITY: 450(15);
),
,
),
,
),
;
<---- security to be changed
DBChange Plus Commands
10-53
CHANGE SETSECURITY
After the changes, the data set entry in the schema looks like this:
INVENTORY ,D(14/13,18);
<---- security changed
STOCK#
( PRODUCT
),
ONHANDQTY
,
SUPPLIER
(!SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE ( DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
NAME:
ENTRY:
10-54
DBChange Plus Commands
CHECK BASE
Checks all data sets and all paths in the database for structural
integrity and reports any problems.
CHECK BASE
Syntax
Parameters
CHE[CK] BA[SE] [ Quick]
Quick
is a fast method of checking the database
to validate pointer integrity. If you specify
the Quick parameter, the database is
examined using a serial read. Using this
option, the command reports if the database
has a problem, but it does not indicate the
location.
Description
Note
Before using the CHECK BASE command, read chapter 8,
\Maintaining the Database."
Use this command to check the database, or a specied portion of it,
for various structural integrity problems. CHECK BASE examines
the root le for incorrect path sequences, examines the data sets for
inconsistent pointers or bit maps, and examines the paths for broken
chains.
The database checking process begins only after you issue the
PERFORM COMMANDS command.
Example 1
In the example below, the ORDERS database is checked using
the CHECK BASE command without the Quick parameter. A
description of the output follows the example.
>base orders
>check base
CHECK BASE (CHECK ROOT, CHECK SET and CHECK PATH) pending for 5 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 9:03 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Checking root file.
Starting data set serial reads.
DBChange Plus Commands
10-55
CHECK BASE
.....
Tabulating statistics.
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
PRODUCT
M
32
307
10 6.3
0
0.0
SUP-MASTER
M
6
211
3 0.0
0
0.0
CHECK SET (DETAIL)
Pct
Highest
Delete
Detail Set Name
Entries
Capacity Full Entry Used Chain Count
----------------------------------------------------------------------SALES
17
504
3
17
0
INVENTORY
5
510
1
5
0
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------CUSTOMER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
PRODUCT
M
SYNONYM CHAINS
2
1.07
0.25
0
1.00
N/A
SALES
D
ACCOUNT
( S) 17231 2874.67 7033.14
6
1.17
6.86
STOCK#
(P )
5
2.13
1.64
6
1.13
0.89
SUP-MASTER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
INVENTORY
D
STOCK#
1
1.00
0.00
0
1.00
1.00
SUPPLIER
(P )
5
5.00
0.00
0
1.00
1.00
Starting data set chained reads.
......
10-56
DBChange Plus Commands
CHECK BASE
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
Record 6 is not linked into the proper synonym chain (CHK 360).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
Chainhead record 113 chain count mismatches entries on chain (CHK 450).
Record 3 contains bad backward pointer (CHK 440).
Record 14 contains bad backward pointer (CHK 440).
Record 15 is not linked into the proper chain (CHK 460).
Record 16 contains bad forward pointer (CHK 430).
STOCK#
(Path 2; linked to master PRODUCT, path 1)
Path Chain inconsistencies detected (CHK 400).
Chainhead record 267 contains bad forward pointer (CHK 410).
Chainhead record 267 contains bad backward pointer (CHK 420).
Chainhead record 267 chain count mismatches entries on chain (CHK 450).
Record 15 is not linked into the proper chain (CHK 460).
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
DBChange Plus Commands
10-57
CHECK BASE
Following is a description of the CHECK BASE output:
CHECK SET (Master) Output
Master Set Name
Type
Entries
Capacity
Pct Full
Pct Sec
Longest Cluster
Average Cluster
is the name of the master data set being
checked.
is the type of master data set being checked.
A is for automatic master; M is for manual
master.
is the number of entries the data set contains.
is the capacity of the data set.
is the percentage of the data set capacity,
rounded to the nearest whole percentage, that
is not available.
is the percentage of secondary entries.
is the longest number of TurboIMAGE/XL
blocks that must be read to nd an open slot
to place a synonym.
is the average number of TurboIMAGE/XL
blocks that must be read to nd an open slot
to place a synonym.
CHECK SET (Detail) Output
Detail Set Name
Entries
Capacity
Pct Full
Highest Entry Used
Delete Chain Count
is the name of the detail data set being
checked.
is the number of entries the data set contains.
is the capacity of the data set.
is the percentage of the data set capacity,
rounded to the nearest whole percentage, that
is not available.
is the record number of the highest entry ever
used in the data set.
is the number of records in the delete chain.
CHECK PATH output
Data Set Name
10-58
DBChange Plus Commands
is the name of data set whose paths are being
checked.
CHECK BASE
Search Item Name
Type
Max Chain
Avg Chain
Std Dev
Pct Far Ptrs
Avg Blocks
Packing Ratio
is the name of the search item. Because
master data sets do not contain search items,
but rather key items, the text SYNONYM
CHAINS appears in the eld instead. For
detail data sets, the search item name
appears in the eld.
is the data set type. Valid data set types are
as follows:
M
is for manual master data sets.
A
is for automatic master data sets.
D
is for detail data sets.
Other codes that appear in this column are
dened as follows:
P
designates primary paths.
S
designates sort items.
is the maximum number of entries in the
longest synonym or detail chain.
is the average number of entries per chain.
is the standard deviation, which indicates
the accuracy of the Avg Chain statistic.
The closer to 0.00 this number is, the more
accurate the Avg Chain statistic is.
is percent far pointers. This number is the
percentage of forward pointers that point
outside the current block.
is the average number of blocks per chain.
is the eciency of the path. This is
calculated by the optimal number of blocks
per chain divided by the actual number of
blocks per chain.
CHECK INFORMATION Output
The CHECK INFORMATION output contains a series of messages
containing information about inconsistencies in the database and
where they occur; that is, which data set they occur in, which record
number, and so on.
DBChange Plus Commands
10-59
CHECK BASE
Example 2
In the example below, the ORDERS database is checked using the
CHECK BASE command with the Quick parameter. A description
of the output follows the example.
>base orders
>check base quick
CHECK BASE (CHECK ROOT, CHECK SET and CHECK PATH) pending for 5 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 9:04 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Checking root file.
Starting data set serial reads.
.....
Tabulating statistics.
10-60
DBChange Plus Commands
CHECK BASE
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
PRODUCT
M
32
307
10 6.3
0
0.0
SUP-MASTER
M
6
211
3 0.0
0
0.0
CHECK SET (DETAIL)
Pct
Highest
Delete
Detail Set Name
Entries
Capacity Full Entry Used Chain Count
----------------------------------------------------------------------SALES
17
504
3
17
0
INVENTORY
5
510
1
5
0
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------CUSTOMER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
PRODUCT
M
SYNONYM CHAINS
2
1.07
0.25
0
1.00
N/A
SALES
D
ACCOUNT
( S) 17231 2874.67 7033.14
6
1.17
6.86
STOCK#
(P )
5
2.13
1.64
6
1.13
0.89
SUP-MASTER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
INVENTORY
D
STOCK#
1
1.00
0.00
0
1.00
1.00
SUPPLIER
(P )
5
5.00
0.00
0
1.00
1.00
Starting data set chained reads.
DBChange Plus Commands
10-61
CHECK BASE
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------ROOT FILE
Root file inconsistency in area other than path sequence. This
cannot be fixed by DBChange (CHK 220).
CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
STOCK#
(Path 2; linked to master PRODUCT, path 1)
Path Chain inconsistencies detected (CHK 400).
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
The output for the CHECK BASE command using the
Quick parameter is the same as the standard CHECK BASE
command; however, a summary version of the standard CHECK
INFORMATION output is displayed. Problems are identied, but
the specic location and records that need xing are not isolated.
10-62
DBChange Plus Commands
CHECK PATH
Checks paths for broken chains and incorrect pointer linkages and
reports any problems.
CHECK PATH
Syntax
2
3
2
CHE CK PAT H
2
Parameters
Quick
3
@
MasterSetName
DetailSetName
Quick
3
8
@
>
>
<
MasterSetName
>
>
: DetailSetName
(@)
(SearchItemName)
9
>
>
=
>
>
;
indicates that you want to check all paths in
all data sets in the database.
is the name of the master data set whose
synonym chains should be checked.
is the name of the detail data set whose paths
should be checked. The following parameters
can be specied with DetailSetName :
(@)
indicates that you
want to check all the
paths in a detail data
set.
(SearchItemName)
is the name of the
search item dening
the path to be
checked.
is a fast method of checking paths to validate
pointer integrity. If you specify the Quick
parameter, paths are checked using a serial
read. Using this option, the command reports
if the paths have problems, but does not
indicate the location.
Description
Note
Before using the CHECK PATH command, read chapter 8,
\Maintaining the Database."
Use this command to check paths for broken chains or incorrect
pointer linkages. For a master data set, the CHECK PATH command
follows and examines synomym chain pointers. For a detail data
set, the CHECK PATH command follows and examines detail chain
pointers and the chain head pointers in the associated master data
sets.
The path checking process begins only after you issue a PERFORM
COMMANDS.
DBChange Plus Commands
10-63
CHECK PATH
Example 1
In the example below, all the paths in the ORDERS database are
checked using the CHECK PATH command without the Quick
parameter. A description of the output follows the example.
>base orders
>check path @
Check Path issued for 5 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 11:12 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Starting data set serial reads.
.....
Tabulating statistics.
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------CUSTOMER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
PRODUCT
M
SYNONYM CHAINS
2
1.07
0.25
0
1.00
N/A
SALES
D
ACCOUNT
( S) 17231 2874.67 7033.14
6
1.17
6.86
STOCK#
(P )
5
2.13
1.64
6
1.13
0.89
SUP-MASTER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
INVENTORY
D
STOCK#
1
1.00
0.00
0
1.00
1.00
SUPPLIER
(P )
5
5.00
0.00
0
1.00
1.00
10-64
DBChange Plus Commands
CHECK PATH
Starting data set chained reads.
......
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
Record 6 is not linked into the proper synonym chain (CHK 360).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
Chainhead record 113 chain count mismatches entries on chain (CHK 450).
Record 3 contains bad backward pointer (CHK 440).
Record 14 contains bad backward pointer (CHK 440).
Record 15 is not linked into the proper chain (CHK 460).
Record 16 contains bad forward pointer (CHK 430).
STOCK#
(Path 2; linked to master PRODUCT, path 1)
Path Chain inconsistencies detected (CHK 400).
Chainhead record 267 contains bad forward pointer (CHK 410).
Chainhead record 267 contains bad backward pointer (CHK 420).
Chainhead record 267 chain count mismatches entries on chain (CHK 450).
Record 15 is not linked into the proper chain (CHK 460).
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
Following is a description of the CHECK PATH output:
Data Set Name
is the name of data set whose paths are being
checked.
Search Item Name
is the name of the search item. Because
master data sets do not contain search items,
but rather key items, the text SYNONYM
CHAINS appear in the eld instead. For
detail data sets, the search item name
appears in the eld.
Type
is the data set type. Valid data set types are
as follows:
M
is for manual master data sets.
A
is for automatic master data sets.
D
is for detail data sets.
DBChange Plus Commands
10-65
CHECK PATH
Max Chain
Avg Chain
Std Dev
Pct Far Ptrs
Avg Blocks
Packing Ratio
Example 2
Other codes that appear in this column are as
follows:
P
designates primary paths.
S
designates sort items.
is the maximum number of entries in the
longest synonym or detail chain.
is the average number of entries per chain.
is the standard deviation, which indicates
the accuracy of the Avg Chain statistic.
The closer to 0.00 this number is, the more
accurate the Avg Chain statistic is.
is percent far pointers. This number is the
percentage of forward pointers that point
outside the current block.
is the average number of blocks per chain.
is the eciency of the path. This is
calculated by the optimal number of blocks
per chain divided by the actual number of
blocks per chain.
In the example below, all the paths in the detail data set
INVENTORY are checked using the Quick parameter. A description
of the output follows the example.
>base orders
>check path inventory ( @ ) quick
CHECK PATH issued for 1 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 11:14 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ?y
Starting data set serial reads.
...
Tabulating statistics.
CHECK PATH
10-66
DBChange Plus Commands
Pct
CHECK PATH
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------INVENTORY
D
STOCK#
1
1.00
0.00
0
1.00
1.00
SUPPLIER
(P )
5
5.00
0.00
0
1.00
1.00
Starting data set chained reads.
DBChange Plus Commands
10-67
CHECK PATH
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------No problems were detected by CHECK.
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
The output for the CHECK PATH command using the
Quick parameter is the same as the standard CHECK PATH
output; however, a summary version of the standard CHECK
INFORMATION output is displayed. Problems are identied, but
the specic location and records that need xing are not isolated.
10-68
DBChange Plus Commands
CHECK SET
Checks data sets for internal or pointer inconsistency and reports any
problems.
CHECK SET
2
Syntax
Parameters
3
CHE CK SET
DataSetName
@
DataSetName
@
Quick
2
Quick
3
is the name of the data set which should be
checked.
indicates that all data sets in the database
should be checked.
is a fast method of checking data sets to
validate pointer integrity. If you specify
the Quick parameter, the data sets are
examined using a serial read. Using this
option, the command reports if the data sets
have problems, but it does not indicate the
location.
Description
Note
Before using the CHECK SET command, read chapter 8,
\Maintaining the Database."
Use this command to check data sets for internal or pointer
inconsistency. CHECK SET only checks for internal or pointer
inconsistency within the data set(s) specied. To check chain head
pointers in the associated master data set(s), use the CHECK PATH
command.
The database checking process begins only after you issue a
PERFORM COMMANDS.
Example 1
In the example below, the detail data set SALES in the ORDERS
database is checked using the CHECK SET command without the
Quick parameter. A description of the output follows the example.
>base orders
>check set sales
CHECK SET issued for 1 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 12:57 PM
DBChange Plus Commands
10-69
CHECK SET
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Starting data set serial reads.
Tabulating statistics.
CHECK SET (DETAIL)
Pct
Highest
Delete
Detail Set Name
Entries
Capacity Full Entry Used Chain Count
----------------------------------------------------------------------SALES
17
504
3
17
0
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
Following is a description of the CHECK SET output for a detail
data set:
Detail Set Name
is the name of the detail data set being
checked.
Entries
is the number of entries the data set contains.
Capacity
is the capacity of the data set.
Pct Full
is the percentage of the data set capacity,
rounded to the nearest whole percentage, that
is not available.
Highest Entry Used is the record number of the highest entry ever
used in the data set.
Delete Chain Count is the number of records in the delete chain.
10-70
DBChange Plus Commands
CHECK SET
Example 2
In the example below, the master data set CUSTOMER in the
ORDERS database is checked using the CHECK SET command
without the Quick parameter. A description of the output follows the
example.
>base orders
>check set customer
CHECK SET issued for 1 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 12:57 PM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Starting data set serial reads.
Tabulating statistics.
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
DBChange Plus Commands
10-71
CHECK SET
Following is a description of the CHECK SET output for a master
data set:
Master Set Name
is the name of the master data set being
checked.
Type
is the type of master data set being checked.
A is for automatic master; M is for manual
master.
Entries
is the number of entries the data set contains.
Capacity
is the capacity of the data set.
Pct Full
is the percentage of the data set capacity,
rounded to the nearest whole percentage, that
is not available.
Pct Sec
is the percentage of secondary entries.
Longest Cluster
is the longest number of TurboIMAGE/XL
blocks that must be read to nd an open slot
to place a synonym.
Average Cluster
is the average number of TurboIMAGE/XL
blocks that must be read to nd an open slot
to place a synonym.
The output for the CHECK SET command using the Quick
parameter is the same as the standard CHECK SET command;
however, a summary version of the standard CHECK
INFORMATION output is displayed. Problems are identied, but
the specic location and records that need xing are not isolated.
10-72
DBChange Plus Commands
CONTROL
Species the setting of several options controlling the way DBChange
operates. Automatically adjusts data set capacities.
CONTROL
Syntax
Parameters
2
3
CON TROL
3
2
LIST
5
4 NOLIST
3
2
PERCENTFULL DataSet MinFull MaxFull NewFull
LIST
NOLIST
PERCENTFULL
writes all commands, their parameters, and any
messages to $STDLIST or the designated output
device according to the le equation that is set
for DBCOUT. This parameter is the default.
displays messages and program output only.
Commands and their parameters are not written
to $STDLIST. For security reasons, CONTROL
NOLIST can be used before the PASSWORD
command to prevent passwords from being
displayed on batch output.
indicates how full a data set can get before
DBChange Plus ags it as needing a capacity
change. The following options can be used with
the PERCENTFULL parameter:
DataSet
identies the name of the data
set(s) to be agged for expansion.
The DataSet can be specied in
one of the following ways:
DataSetName is the name of
a specic data
set to which the
CONTROL
PERCENTFULL
command
applies.
@MASTERS indicates that
the CONTROL
PERCENTFULL
command applies
to all master
data sets in the
database.
@DETAILS
indicates that
the CONTROL
PERCENTFULL
command applies
to all detail
DBChange Plus Commands
10-73
CONTROL
MinFull
MaxFull
NewFull
data sets in the
database.
@
indicates that
the CONTROL
PERCENTFULL
command applies
to all data sets in
the database.
is the percent of the data
set capacity at which the
specied data set(s) is agged
for reduction. If the data set
capacity falls below the MinFull
amount, DBChange Plus
immediately prints a warning.
Zero is a valid value.
is the percent of the data
set capacity at which the
specied data set(s) is agged
for expansion. If the data set
exceeds the MaxFull value, a
warning message is printed.
is the desired percent of capacity
for the specied data set(s).
If the data set capacity falls
below the MinFull parameter or
exceeds the MaxFull parameter,
the data set capacity within
the current change le is
automatically adjusted to the
NewFull value. DBChange avoids
two's complement values and
prime numbers for master data
sets and rounds to the nearest
block for detail data sets.
If the capacity is expanded,
the specied data set le is
enlarged. Conversely, if the data
set capacity is decreased, the
specied data set le is reduced.
When reducing detail data set
capacity, a serial repack is used.
If this parameter is omitted, the
percent of capacity is set at 60
percent for master data sets and
70 percent for detail data sets.
10-74
DBChange Plus Commands
CONTROL
Description
Use this command to control the following DBChange operations:
To suppress commands and their parameters to $STDLIST during
DBChange command execution, whether interactively or batch.
To determine minimum and maximum data set capacity for
reduction or expansion.
To determine user access to the database while checking is in
progress.
The CONTROL command can be issued multiple times. However,
each command overrides the previous command. Therefore, you
should rst specify the most inclusive group of sets being controlled,
then the next most inclusive group, and so on. For example, if you
want all detail data sets in the ORDERS database to be agged
for expansion at 60 percent of capacity, except the INVENTORY
data set, which should be agged at 80 percent of capacity, use the
following command sequence:
>control percentfull @ details 0 60
>control percentfull inventory 0 80
Because the second CONTROL statement overrides the rst, every
detail data set, including the INVENTORY data set, is agged for
expansion at 60 percent of capacity. Only the INVENTORY data
set is agged for expansion at 80 percent of capacity. Note that the
CONTROL PERCENTFULL parameter used with the NewFull
option overrides any previous CHANGE CAPACITY commands
stored in the change le.
Note
Because the most recent DBChange Plus command always takes
precedence over the previous command, you should issue the
CONTROL command immediately after issuing the BASE command.
To verify data set capacity in the current change le, use the
REVIEW SETS command.
Example
>base orders
>control nolist
>control percentfull @ details 55 85 65
>
In this example, the CONTROL command is used to control the
ORDERS database. Only messages and program output are sent to
$STDLIST. The percent of the data set capacity at which all the
detail data sets are agged for reduction is 55 percent. The percent
of the data set capacity at which all the detail data sets are agged
for expansion is 85 percent. The desired percent of capacity is 65
percent.
DBChange Plus Commands
10-75
Copies a database.
COPY
COPY OldBaseName [ NewBaseName] [(REPLACE)]
Syntax
Parameters
OldBaseName
NewBaseName
(REPLACE)
Description
is the name of the existing database to be
copied. The OldBaseName can be fully
qualied using the MPE XL le name
conventions of Name.Group.Account .
is the name of the new copy of the database.
The NewBaseName can only be qualied
with the MPE XL Group name. If this
parameter is omitted, the OldBaseName is
used, and the database is placed in the logon
group.account. The same le capability in the
target group is required.
allows you to overwrite an existing database
with the same name as NewBaseName .
In interactive mode, if this parameter is
omitted, you are prompted with a REPLACE
conrmation. In batch mode, you are not
prompted.
Use this command to copy a database. The COPY command copies
a database from any account and places it in any group within the
current logon account; therefore, you must log on to the system as
the database creator in the account where the database copy will
reside.
The COPY command cannot be issued while a change le is open,
that is, after a BASE command is issued. The copying process must
be done independently from all other DBChange Plus restructuring.
Security
To successfully copy a database, you must have the following MPE
XL security capabilities:
Table 10-3. Required MPE XL Security Capabilities
Copying Ability
10-76
MPE XL
Security
Copying any database from any account
SM or [OP+PM]
Copying any database from within the logon account
AM
Copying any database created by user
Creator
DBChange Plus Commands
COPY
When copying a database from another account with only OP+PM
capabilities, you must rst pass MPE XL security or have the
database released.
Example
:hello kelly.testacct.testgrp
:dbcplus
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, JUN 15, 1990, 3:00 PM
>copy orders.shipping.database
copy ORDERS.SHIPPING.DATABASE ==> ORDERS.TESTGRP.TESTACCT [y/N]? y
Database ORDERS.TESTGRP.TESTACCT already exists. Replace [y/N]? y
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
Data set DATE-MASTER
Data set CUSTOMER
Data set SUP-MASTER
: successfully copied.
: successfully copied.
: successfully copied.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
In this example, the database ORDERS is copied from the
SHIPPING account and DATABASE group to the current logon
group and account (TESTGRP.TESTACCT). You are prompted to
proceed with the copy and whether or not to replace the existing
ORDERS database. DBAPLUS is automatically invoked to complete
the copying process, and the DBChange prompt is returned.
DBChange Plus Commands
10-77
Deletes a eld from a manual master or detail data set.
DELETE FIELD
D[ELETE] F[IELD] DataSetName FieldName
Syntax
Parameters
DataSetName
FieldName
Description
Caution
is the name of the data set from which the
eld is to be deleted.
is the name of the eld to be deleted.
Use this command to delete a eld from a manual master or detail
data set.
The deletion of a eld will cause loss of data.
If you are deleting a search item, you must delete the path before you
can delete the eld. Refer to \DELETE PATH" later in this chapter.
When you delete a eld, the ITEMS part of the database schema and
other data sets are not aected.
If you are deleting a sort item, you must delete the sort item before
deleting the eld. Refer to \DELETE SORT" later in this chapter.
>delete field product description
Example
In this example, the eld DESCRIPTION is deleted from the
PRODUCT data set.
Before the deletion, the data set PRODUCT data set entry in the
schema looks like this:
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18);
STOCK#
(2)
,
DESCRIPTION
; <---- eld to be deleted
CAPACITY: 307(16);
After the deletion, the data set entry in the schema looks like this:
NAME:
PRODUCT
ENTRY:
STOCK#
CAPACITY: 307(16);
10-78
DBChange Plus Commands
,M(13,14/12,18);
(2)
; <---- eld deleted after STOCK#
DELETE ITEM
Deletes a data item and its associated elds and paths from the
database.
DELETE ITEM
D[ELETE] ITEM DataItemName
Syntax
is the name of the data item to be deleted.
Parameters
DataItemName
Description
Use this command to delete a data item from the ITEMS part of the
schema and from any data set in which it is used as a eld.
The deletion of a data item causes loss of data and, if the data item
is a search item, deletion of paths associated with the search item.
Any automatic master containing the data item is also deleted.
Therefore, use caution when deleting data items, especially if the
data item is used as a sort or search item.
Caution
In interactive mode you are required to conrm the deletion of the
data item; in batch mode no conrmation is required.
If you only want to delete a eld from a specic data set, use the
DELETE FIELD command. If the data item to be deleted is a sort
item, you must rst use the DELETE SORT command.
>delete item zip
Example
In this example, the data item ZIP is deleted from the database.
Before the deletion, the ITEMS and SETS parts of the schema look
like this:
ITEMS:
ACCOUNT
BINNUM
, J2(0,11,12,13,14,18/);
, Z2(/13);
.
.
.
UNIT-COST
ZIP
SETS:
NAME:
ENTRY:
, P8(/12);
, X6(12,13,14/11);
CUSTOMER
ACCOUNT
LAST-NAME
,M(14/11,18);
(1)
<---- to be deleted
,
,
.
.
.
STATE
ZIP
CREDIT-RATING
,
, <---- to be deleted
;
DBChange Plus Commands
10-79
DELETE ITEM
CAPACITY: 221(10);
NAME:
DATE-MASTER ,A(0,11,12,13,14,18/);
ENTRY:
DATE
(3)
CAPACITY: 211(9);
;
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18);
STOCK#
(2)
DESCRIPTION
CAPACITY: 307(16);
,
;
.
.
.
NAME:
ENTRY:
SUP-MASTER ,M(13/12,18);
SUPPLIER
(1)
,
.
.
.
ZIP
CAPACITY: 211(12);
;
<---- to be deleted
.
.
.
END.
After the deletion, the ITEMS and SETS parts of the schema look
like this:
ITEMS:
ACCOUNT
BINNUM
, J2(0,11,12,13,14,18/);
, Z2(/13);
.
.
.
UNIT-COST
SETS:
NAME:
ENTRY:
<---- ZIP deleted here
, P8(/12);
CUSTOMER
ACCOUNT
LAST-NAME
,M(14/11,18);
(1)
,
,
.
.
.
STATE
CREDIT-RATING
CAPACITY: 221(10);
NAME:
10-80
DATE-MASTER ,A(0,11,12,13,14,18/);
DBChange Plus Commands
,
;
<---- ZIP deleted here
DELETE ITEM
ENTRY:
DATE
CAPACITY: 211(19);
(3)
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18);
STOCK#
(2)
DESCRIPTION
CAPACITY: 307(16);
;
,
;
.
.
.
NAME:
ENTRY:
SUP-MASTER
SUPPLIER
,M(13/12,18);
(1)
,
.
.
.
STATE
CAPACITY: 211(12);
;
<---- ZIP deleted here
.
.
.
END.
DBChange Plus Commands
10-81
Deletes all security specications from a data item.
DELETE
ITEMSECURITY
D[ELETE] ITEMSE[CURITY] DataItemName
Syntax
is the name of the data item whose security
specications are to be removed.
Parameters
DataItemName
Description
Use this command to delete all security specications from a data
item, which results in an absent list. This command is necessary
because without it, you can only delete user classes from the security
list, creating a null (or empty) list (/), not an absent list. A null list
allows only the database creator access to the data item. An absent
list allows any user read access to the data item.
Note that access to data items may be further restricted or allowed
by data set security.
>delete itemsecurity state
Example
In this example, all security specications are removed from the data
item STATE. This allows all users read access to the data item unless
access is restricted by data set security.
Before the deletion, the schema entry for the data item STATE looks
like this:
STATE, X2(12,13,14/11);
<---- security list to be deleted
After the deletion, the schema entry for the data item STATE looks
like this:
STATE, X2;
10-82
DBChange Plus Commands
<---- security list deleted
DELETE PASSWORD
DELETE PASSWORD
Deletes a password and its associated user class from the database.
D[ELETE] PAS[SWORD] Password UserClass
Syntax
Parmeters
Password
UserClass
Description
is the name of the password to be deleted
from the database.
is the associated user class to be deleted.
Use this command to delete a password and its associated user class
from the PASSWORDS section of the schema list.
In interactive mode, a conrmation message asks you to conrm the
deletion of the password. In batch mode, no conrmation is required.
>delete password ship-rec 13
Example
In this example, the password SHIP{REC and its associated user
class 13 are deleted from the PASSWORDS section of the ORDERS
database.
Before the deletion, the schema looks like this:
BEGIN DATABASE ORDERS:
PASSWORDS:
11 CREDIT
12 BUYER
13 SHIP-REC
14 CLERK
18 DO-ALL
;
;
;
;
;
<---- 13 to be deleted
After the deletion, the schema looks like this:
BEGIN DATABASE ORDERS:
PASSWORDS:
11 CREDIT
12 BUYER
14 CLERK
18 DO-ALL
;
;
;
;
<---- 13 deleted after 12
DBChange Plus Commands
10-83
Deletes a path from a detail data set to a master data set.
DELETE PATH
D[ELETE] PAT[H] DataSetName SearchItemName
Syntax
Parameters
DataSetName
SearchItemName
Description
is the name of the detail data set of the path
to be deleted.
is the name of the search item dening the
path to be deleted.
Use this command to delete a path between a detail data set and a
master data set. This command also changes the search item to a
non-key item. Note that you are not deleting the data item from the
data set; you are only deleting the path that the search item dened.
If the deleted path was the primary path in the data set, you may
want to redene a new primary path using the CHANGE PATH
command. If you do not, the primary path defaults to the rst
unsorted path dened for the data set.
If you delete a path that is the only path to an automatic master
data set, the automatic master data set is also deleted.
>delete path inventory stock#
Example
In this example, the path dened by the STOCK# search item in the
detail data set INVENTORY is deleted.
Before the deletion, the schema entry for the data set INVENTORY
looks like this:
NAME:
ENTRY:
INVENTORY
STOCK#
ONHANDQTY
SUPPLIER
UNIT-COST
LASTSHIPDATE
BINNUM
CAPACITY: 450(15);
10-84
DBChange Plus Commands
,D(12,14/13,18);
(PRODUCT
),
,
(!SUP-MASTER ),
,
( DATE-MASTER ),
;
<---- path to be deleted
DELETE PATH
After the deletion, the schema entry for the data set INVENTORY
looks like this:
NAME:
ENTRY:
INVENTORY
,D(12,14/13,18);
STOCK#
,
ONHANDQTY
,
SUPPLIER
),
UNIT-COST
(!SUP-MASTER ),
LASTSHIPDATE ( DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
<---- path deleted
After the deletion, STOCK# is still a data item in the data set
INVENTORY; however, it is no longer a search item.
DBChange Plus Commands
10-85
Deletes a master or detail data set and all associated paths from a
database.
DELETE SET
D[ELETE] SET DataSetName
Syntax
is the name of the data set to be deleted.
Parameters
DataSetName
Description
Use this command to delete a data set and its associated paths from
a database. The deletion of a data set causes loss of data. If the
data set contains the only path to an automatic master, the path
and the automatic master are also deleted. Therefore, use caution
when deleting data sets. In interactive mode you are required to
conrm the deletion of the data set; in batch mode no conrmation is
required.
>delete set inventory
Example
This example deletes the detail data set INVENTORY and its
related path from the database.
Before the deletion, the SETS part of the schema looks like this:
SETS:
NAME:
ENTRY:
CUSTOMER
,M(14/11,18);
ACCOUNT
(1)
LAST-NAME
FIRST-NAME
INITIAL
STREET
CITY
STATE
ZIP
CREDIT-RATING
CAPACITY: 221(10);
,
,
,
,
,
,
,
,
;
NAME:
DATE-MASTER ,A(0,11,12,13,14,18/);
ENTRY:
DATE
(3)
CAPACITY: 211(9);
;
<---- path count to change
,
;
<---- path count to change
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18);
STOCK#
(2)
DESCRIPTION
CAPACITY: 307(16);
10-86
DBChange Plus Commands
DELETE SET
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 504(14);
,D(11/14,18);
( CUSTOMER (PURCH-DATE )),
(!PRODUCT
),
,
,
,
,
( DATE-MASTER
),
( DATE-MASTER
);
NAME:
ENTRY:
,M(13/12,18);
(1)
SUP-MASTER
SUPPLIER
STREET-ADD
CITY
STATE
ZIP
CAPACITY: 211(12);
NAME:
ENTRY:
INVENTORY
,D(12,14/13,18);
STOCK#
(PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
UNIT-COST
LASTSHIPDATE ( DATE-MASTER
BINNUM
CAPACITY: 450(15);
,
,
,
,
;
),
,
),
,
),
;
<---- path count to change
<---- to be deleted
END.
DBChange Plus Commands
10-87
DELETE SET
After the deletion, the SETS part of the schema looks like this:
SETS:
NAME:
ENTRY:
CUSTOMER
,M(14/11,18);
ACCOUNT
(1)
LAST-NAME
FIRST-NAME
INITIAL
STREET
CITY
STATE
ZIP
CREDIT-RATING
CAPACITY: 221(10);
,
,
,
,
,
,
,
,
;
NAME:
DATE-MASTER ,A(0,11,12,13,14,18/);
ENTRY:
DATE
(2)
;
CAPACITY: 211(9);
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18);
STOCK#
(1)
DESCRIPTION
CAPACITY: 307(16);
NAME:
ENTRY:
SALES
,D(11/14,18);
ACCOUNT
( CUSTOMER (PURCH-DATE
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
NAME:
ENTRY:
SUP-MASTER ,M(13/12,18);
SUPPLIER
STREET-ADD
CITY
STATE
ZIP
CAPACITY: 211(12);
END.
10-88
DBChange Plus Commands
,
;
<---- path count changed
)),
),
,
,
,
,
),
);
,
,
,
,
;
here
<---- path count changed
<---- path count changed
<---- INVENTORY deleted
DELETE SETSECURITY
Deletes all security specications from a master or detail data set.
DELETE
SETSECURITY
Syntax
D[ELETE] SETSE[CURITY] DataSetName
is the name of the data set whose security
specications are to be removed.
Parameters
DataSetName
Description
Use this command to remove the security list from the data set. The
absence of a security list (an absent list) allows any user read access
to the data set.
Note that access to data items within the data set may be further
restricted or allowed by data item security.
Example
>delete setsecurity product
This example removes all security specications from the data set
PRODUCT.
Before the deletion, the data set entry in the schema looks like this:
NAME:
ENTRY:
CAPACITY:
PRODUCT,
M(14,13/12,18),DISC2;
STOCK#
(2)
,
DESCRIPTION
;
300(16);
<---- security list to be deleted
After the deletion, the data set entry in the schema looks like this:
NAME:
ENTRY:
CAPACITY:
PRODUCT,
M,DISC2;
STOCK#
(2)
DESCRIPTION
300(16);
,
;
<---- security list deleted
DBChange Plus Commands
10-89
Deletes a sort item from a search item in a detail data set.
DELETE SORT
D[ELETE] SO[RT] DataSetName SearchItemName
Syntax
Parameters
DataSetName
SearchItemName
Description
is the name of the data set containing the
sort item to be deleted.
is the name of the search item associated with
the sort item to be deleted.
Use this command to delete a sort item from a path in a detail data
set. When a sort item is associated with a particular path, the search
item that denes the path is entered, rather than the sort item name
itself.
>delete sort sales account
Example
In this example, the sort item PURCH-DATE is deleted from the
data set SALES.
Before the deletion, the data set entry in the schema looks like this:
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 504(14);
,D(11/14,18);
( CUSTOMER (PURCH-DATE )),
(!PRODUCT
),
,
,
,
,
( DATE-MASTER
),
( DATE-MASTER
),
<---- sort item to be deleted
After the deletion, the data set entry in the schema looks like this:
NAME:
ENTRY:
SALES
,D(11/14,18);
ACCOUNT
( CUSTOMER
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
CAPACITY: 504(14);
10-90
DBChange Plus Commands
),
),
,
,
,
,
),
),
<---- sort item deleted
ERASE SET
Erases entries in manual master and detail data sets.
ERASE SET
Syntax
Parameters
2
3
ER ASE SET
DetailSetName
ManualMasterSetName
DetailSetName
is the name of the detail data set
which contains entries to be erased.
For a standalone detail data set, all
entries are erased. If the detail data
set is linked to one or more automatic
master data sets, all detail data set
entries are erased, and the appropriate
chain counts and chain pointers of the
related automatic master data set
entries are set to zero. If the deletion
of a detail data set entry results in
an automatic master data set entry
not being linked to any detail entries,
the master data set entry is deleted.
If the detail data set is linked to one
or more manual master data sets,
all detail data set entries are erased,
and the appropriate chain counts and
chain pointers of the related manual
master data set entries are set to zero.
Manual master data set entries are
left in the master data set whether or
not the master data set entries are
linked to any detail data set entries.
ManualMasterSetName
You cannot explicitly erase entries
in an automatic master data set.
Automatic master data set entries
are erased via related detail data set
entries.
is the name of the manual master
data set which contains entries to be
deleted.
For a standalone manual master
data set, all entries are erased. For a
manual master data set with one or
more paths to detail data sets, and
the detail entries in all paths are
empty (zero count), all entries in the
manual master data set are erased.
You cannot delete entries from a
manual master data set with one or
DBChange Plus Commands
10-91
ERASE SET
more paths to detail data sets which
contain entries (path counts are not
zero).
Description
Use the ERASE SET command to erase entries in manual master
and detail data sets. In session mode, a conrmation message is
displayed to conrm the erasure of the data set entries. In batch
mode, the data set is erased without conrmation. If you want to
cancel the specifed erasure, use the CANCEL ERASE command
before running the DBAPLUS program.
>erase set inventory
To confirm erase of data set, enter Y for Yes. y
Erase Set issued for data set.
Example
>
In this example, the ERASE SET command erases the entries in the
INVENTORY detail data set.
10-92
DBChange Plus Commands
EXIT
Stops the execution of the DBCPLUS program.
EXIT
Syntax
Description
E[XIT]
Use this command to leave the DBCPLUS program. A series of
statistics are displayed about the status of the change le. These
statistics are accumulated for every BASE command that is issued
while the DBCPLUS program is running. They are displayed when
you exit the DBCPLUS program, even if the DBAPLUS program has
already applied the changes to the database.
Example
>exit
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
******************* DBCHANGE STATISTICS***************************
Number
Number
Number
Number
Number
Number
of
of
of
of
of
of
databases
databases
databases
databases
databases
databases
prepared
prepared
prepared
prepared
prepared
prepared
for
for
for
for
for
for
rename:
restructure:
erase :
repack:
check :
fix :
0
1
0
0
0
0
END OF PROGRAM
:
In this example, the EXIT command causes the DBCPLUS program
to stop executing.
DBChange Plus Commands
10-93
Examines all sets and paths in the database and attempts to correct
known problems.
FIX BASE
F[IX] BA[SE]
Syntax
Description
Before using the FIX BASE command, read chapter 8, \Maintaining
the Database."
Note
Use this command to examine all sets and paths in the database
and to correct known problems. The FIX BASE command is
equivalent to issuing the FIX SET @ and FIX PATH @ commands
simultaneously. The database xing process begins only after you
issue the PERFORM COMMANDS command.
The FIX BASE command requires exclusive access to the database.
Example
In the example below, the ORDERS database is xed using the FIX
BASE command. A description of the output follows the example.
>base orders
>fix base
FIX BASE (FIX SET and FIX PATH) pending for 5 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 2:47 PM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Checking root file.
Starting data set serial reads.
.....
Tabulating statistics.
10-94
DBChange Plus Commands
FIX BASE
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
PRODUCT
M
32
307
10 6.3
0
0.0
SUP-MASTER
M
6
211
3 0.0
0
0.0
CHECK SET (DETAIL)
Pct
Highest
Delete
Detail Set Name
Entries
Capacity Full Entry Used Chain Count
----------------------------------------------------------------------SALES
17
504
3
17
0
INVENTORY
5
510
1
5
0
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------CUSTOMER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
PRODUCT
M
SYNONYM CHAINS
2
1.07
0.25
0
1.00
N/A
SALES
D
ACCOUNT
( S) 17231 2874.67 7033.14
6
1.17
6.86
STOCK#
(P )
5
2.13
1.64
6
1.13
0.89
SUP-MASTER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
INVENTORY
D
STOCK#
1
1.00
0.00
0
1.00
1.00
SUPPLIER
(P )
5
5.00
0.00
0
1.00
1.00
Starting data set chained reads.
...
DBChange Plus Commands
10-95
FIX BASE
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
Record 6 is not linked into the proper synonym chain (CHK 360).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
Chainhead record 113 chain count mismatches entries on chain (CHK 450).
Record 3 contains bad backward pointer (CHK 440).
Record 14 contains bad backward pointer (CHK 440).
Record 15 is not linked into the proper chain (CHK 460).
Record 16 contains bad forward pointer (CHK 430).
STOCK#
(Path 2; linked to master PRODUCT, path 1)
Path Chain inconsistencies detected (CHK 400).
Chainhead record 267 contains bad forward pointer (CHK 410).
Chainhead record 267 contains bad backward pointer (CHK 420).
Chainhead record 267 chain count mismatches entries on chain (CHK 450).
Record 15 is not linked into the proper chain (CHK 460).
FIX INFORMATION
-----------------------------------------------------------------------New Key value added for dataset CUSTOMER (FIX 170). Key value:
INTEGER(I4/J4)=>> 1482184792 / 1482184792
New Key value added for dataset PRODUCT (FIX 170). Key value:
ASCII( 8)==>> XXXXXXXX
All problems detected have been fixed.
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
The FIX BASE command rst checks the entire database. (For
a description of the CHECK BASE output, refer to \CHECK
BASE" earlier in this chapter). After checking the database, any
problems that are detected are xed and described in the FIX
INFORMATION section of the output. In the above example,
DBChange Plus adds new key values to the data sets CUSTOMER
and PRODUCT. A message is returned verifying the status of the x
process.
10-96
DBChange Plus Commands
FIX PATH
Examines paths for broken chains and incorrect pointer linkages and
attempts to correct known problems.
FIX PATH
Syntax
2
3
2
F IX PAT H
Parameters
3
8
@
>
>
<
MasterDataSetName
>
>
: DetailDataSetName
@
MasterDataSetName
DetailDataSetName
(@)
(SearchItemName)
9
>
>
=
>
>
;
indicates that all paths in all data sets in the
database should be examined and corrected.
is the name of the master data set whose
synonym chains should be examined and
corrected.
is the name of the detail data set whose
paths should be examined and corrected.
DetailDataSetName can be specied as
follows:
(@)
indicates that all
paths in the detail
data set should
be examined and
corrected.
(SearchItemName)
is the name of
the search item
dening the path to
be examined and
corrected.
Description
Note
Before using the FIX PATH command, read chapter 8, \Maintaining
the Database."
Use this command to examine and correct broken chain and data set
structural inconsistencies, such as user label, bit map, and delete
chain problems.
When used to examine a master data set, FIX PATH checks and
attempts to x the synonym chain pointers in the master data set.
When used to examine a detail data set, FIX PATH checks and
attempts to x the path chain pointers in the detail data set and its
associated master set(s).
The database xing process begins only after you issue a PERFORM
COMMANDS.
The FIX PATH command requires exclusive access to the database.
DBChange Plus Commands
10-97
FIX PATH
Example
In the example below, the FIX PATH command is used to x all
paths in all data sets in the ORDERS database. A description of the
command output follows the example.
>base orders
>fix path @
FIX PATH issued for 5 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, MAY 25, 1990, 3:13 PM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Starting data set serial reads.
.....
Tabulating statistics.
CHECK PATH
Pct
Set Name
Type
Max
Avg
Std Far
Avg Packing
Search Item
(PS) Chain
Chain
Dev Ptrs Blocks
Ratio
---------------------------------------------------------------------CUSTOMER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
PRODUCT
M
SYNONYM CHAINS
2
1.07
0.25
0
1.00
N/A
SALES
D
ACCOUNT
( S) 17231 2874.67 7033.14
6
1.17
6.86
STOCK#
(P )
5
2.13
1.64
6
1.13
0.89
SUP-MASTER
M
SYNONYM CHAINS
1
1.00
0.00
0
1.00
N/A
INVENTORY
D
STOCK#
1
1.00
0.00
0
1.00
1.00
SUPPLIER
(P )
5
5.00
0.00
0
1.00
1.00
Starting data set chained reads.
...
10-98
DBChange Plus Commands
FIX PATH
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
Record 6 is not linked into the proper synonym chain (CHK 360).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
Chainhead record 113 chain count mismatches entries on chain (CHK 450).
Record 3 contains bad backward pointer (CHK 440).
Record 14 contains bad backward pointer (CHK 440).
Record 15 is not linked into the proper chain (CHK 460).
Record 16 contains bad forward pointer (CHK 430).
STOCK#
(Path 2; linked to master PRODUCT, path 1)
Path Chain inconsistencies detected (CHK 400).
Chainhead record 267 contains bad forward pointer (CHK 410).
Chainhead record 267 contains bad backward pointer (CHK 420).
Chainhead record 267 chain count mismatches entries on chain (CHK 450).
Record 15 is not linked into the proper chain (CHK 460).
FIX INFORMATION
-----------------------------------------------------------------------New Key value added for dataset CUSTOMER (FIX 170). Key value:
INTEGER(I4/J4)=>> 1482184792 / 1482184792
New Key value added for dataset PRODUCT (FIX 170). Key value:
ASCII( 8)==>> XXXXXXXX
All problems detected have been fixed.
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
The FIX PATH command rst checks all paths and all data sets
in the database. (For a description of the CHECK PATH and
CHECK SET output, refer to \CHECK BASE" and \CHECK
SET" earlier in this chapter). After checking the paths and data
sets, any problems that are detected are xed and described in the
FIX INFORMATION section of the output. In the above example,
DBChange Plus adds new key values to the data sets CUSTOMER
and PRODUCT. A message is returned verifying the status of the x
process.
DBChange Plus Commands
10-99
Examines data sets for internal pointer or structural inconsistency
and attempts to correct known problems.
FIX SET
2
Syntax
Parameters
3
F IX SET
@
DataSetName
@
DataSetName
indicates that all data sets in the database
should be examined and corrected.
is the name of the data set to be examined
and corrected.
Description
Use this command to examine one or more data sets for internal
pointer or structural inconsistency and to correct known problems.
Note
Before using the FIX SET command, read chapter 8, \Maintaining
the Database." In addition, because of the FIX SET command
limitations as described below, consider using the FIX PATH
command instead.
FIX SET examines and corrects only the internal pointer consistency
of the set(s) specied. It does not correct pointer consistency across
sets. For example, it does not correct a pointer from a chain head in
a master data set to the rst record on the chain in the associated
detail data set(s). To do this, use the FIX PATH command.
FIX SET does not repair broken chains. FIX SET only repairs
structures that reside entirely within the data set, such as user label,
bit map, and delete chains. For information about xing both broken
chains and data set structure, refer to \FIX PATH" earlier in this
chapter.
The database xing process begins only after you issue the
PERFORM COMMANDS command.
The FIX SET command requires exclusive access to the database.
10-100
DBChange Plus Commands
FIX SET
Example
In the example below, all the data sets in the ORDERS database
are xed using the FIX SET command. A description of the output
follows the example.
>base orders
>fix set @
FIX SET issued for 5 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
TUE, MAY 29, 1990, 8:49 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
Starting data set serial reads.
.....
Tabulating statistics.
CHECK SET (MASTER)
Pct Pct Longest Average
Master Set Name Type Entries Capacity Full Sec Cluster Cluster
----------------------------------------------------------------------CUSTOMER
M
9
221
4 11.1
0
0.0
PRODUCT
M
32
307
10 6.3
0
0.0
SUP-MASTER
M
6
211
3 0.0
0
0.0
CHECK SET (DETAIL)
Pct
Highest
Delete
Detail Set Name
Entries
Capacity Full Entry Used Chain Count
----------------------------------------------------------------------SALES
17
504
3
17
0
INVENTORY
5
510
1
5
0
DBChange Plus Commands
10-101
FIX SET
CHECK INFORMATION
Set Name
Type
Search Item
Message(s)
-----------------------------------------------------------------------CUSTOMER
M
Userlabel entry count does not match synonym chain count (CHK 570).
SALES
D
ACCOUNT
(Path 1; linked to master CUSTOMER, path 1)
Path Chain inconsistencies detected (CHK 400).
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
STOCK#
(Path 2; linked to master PRODUCT, path 1)
Path Chain inconsistencies detected (CHK 400).
FIX INFORMATION
-----------------------------------------------------------------------All problems detected have been fixed.
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
>
The FIX SET command rst checks all the master and detail data
sets in the database. (For a description of the CHECK SET output,
refer to \CHECK SET" earlier in this chapter). After checking
the data sets, any problems that are detected are described in
the CHECK INFORMATION section of the output. Under FIX
INFORMATION, a message is returned verifying the status of the x
process. In the above example, all problems detected are xed.
10-102
DBChange Plus Commands
HELP
Provides information about DBChange commands.
HELP
Syntax
Parameters
H[ELP] [ CommandName]
CommandName
is the name of a command about which you
want information. The abbreviated form of
the command may be used.
If this parameter is omitted, a brief
description of all DBChange Plus commands
is displayed.
Description
Use this command to display information about DBChange Plus
commands.
Example 1
>help recover
RECOVER ITEM
RECOVER SET
Cancels a data item deletion in change file.
Cancels a data set deletion in change file.
>
In this example, information about the RECOVER command is
displayed.
DBChange Plus Commands
10-103
HELP
Example 2
>help recover item
RECOVER ITEM
Cancels a data item deletion stored in the change file.
Syntax
REC[OVER] ITEM DataItemName
Parameter
DataItemName
is the name of the data item to be recovered.
Examples
RECOVER ITEM zip
REC ITEM state
Related Commands
ADD ITEM, DELETE ITEM, REVIEW ITEM.
>
In this example, information about the RECOVER command and the
ITEM keyword is displayed.
10-104
DBChange Plus Commands
OUTPUT
Redirects DBChange and DBAPLUS output to a le or device.
OUTPUT
2
Syntax
Parameters
O UTPUT
LP
TERM
Description
3 LP
TERM
directs output to the formal le designator
DBCOUT.
directs output to $STDLIST.
Use this command to direct DBChange and DBAPLUS output to a
le or device. If this command is not used, the output is directed to
$STDLIST (the terminal in session mode and the spool le in batch
mode). You can also direct the output to a le other than $STDLIST
by setting the following le equation:
:file dbcout= lename;dev=disc;rec=-80,,f,ascii;disc= n;save
:run dbcplus.pub.sys
>output lp
where n is the number of records in the le. If n is not specied,
the default value is 1023, which may not be sucient for a large
database.
Each OUTPUT command supersedes the previous OUTPUT
command and closes any le opened by the previous OUTPUT
command.
Each time the OUTPUT LP command is issued, a new le is created.
That is, OUTPUT LP does not create an appended output le. If
you want to create an appended output le, set a le equation like
the following:
:build myfile;dev=disc;rec=-80,,f,ascii;disc= n
:file dbcout=myfile;acc=append
or
:file dbcout= lename;dev=disc;rec=-80,,f,ascii;disc= n;save;acc=append
In the example below, output is directed to a printer. The priority is
two, and three copies will be printed:
>:file dbcout;dev=pp,2,3
>output lp
DBChange Plus Commands
10-105
Invokes the DBAPLUS program to copy, restructure, check, or
maintain the database depending on the commands stored in the
current change le.
PERFORM
COMMANDS
PE[RFORM] COM[MANDS] [JOB] [ ParmValue]
Syntax
Parameters
JOB
ParmValue
creates a job le ( DatabaseName JJ) to enable
running the DBAPLUS program at a later time.
For batch mode, this parameter is required. In
session mode, if you omit this option, DBChange
asks you if changes should be performed online or if a
job stream le should be created.
is a parameter value from 0 to 15 that provides
instructions to DBAPLUS during execution. This
option is required for batch mode or if the JOB
parameter is used. In session mode, if you omit this
option, you are prompted for any necessary Y or N
responses.
PARM values can be determined by adding them
together. For example, if you want both PARM=1
and PARM=4 to take eect, add them together and
specify PARM=5. Table 10-4 lists the questions
DBAPLUS may need answers to about parameter
values.
Description
Use PERFORM COMMANDS to invoke DBAPLUS to copy,
restructure, check, or maintain the database according to the
deferred commands stored in the current change le. PERFORM
COMMANDS should be the last command used before the EXIT
command or before the next BASE command if multiple databases
are being restructured.
In session mode, DBChange asks if changes should be performed
online or if a job stream le should be created. If you request a job
stream le to be created, DBChange creates FileName JJ, which you
can later modify and stream. Note that the larger the database,
the longer DBAPLUS takes to perform the restructure. Therefore,
depending on the size of the database, you may want to create a
batch job.
In batch mode, PERFORM COMMANDS only takes eect if the
change le has no errors. If errors are encountered since the most
recent BASE command, a message stating that the commands cannot
be performed because previous errors were encountered is displayed.
Refer to chapter 9, \Applying Changes to the Database Structure,"
for more information about the DBAPLUS program.
10-106
DBChange Plus Commands
PERFORM COMMANDS
Table 10-4. DBAPLUS Parameters
PARM You do not have enough disk
Value space to build all necessary
temporary data sets before
beginning the restructure.
Do you want DBAPLUS to
continue with the restructure
using an alternative
restructuring method?
The database has
been modied
since the last
DBSTORE. Do
you wish to
continue?
Your root le is not in
normal DBSCHEMA
format. Do you want
DBAPLUS to x it and
continue with the
restructure?
1
The change le is
normally purged after
successful completion of
DBAPLUS. Do you
want to save the change
le?
Y
2
Y
3
Y
4
Y
5
Y
6
Y
Y
7
Y
Y
Y
Y
8
Y
9
Y
10
Y
Y
11
Y
Y
12
Y
Y
13
Y
Y
14
Y
Y
Y
15
Y
Y
Y
Y
Y
Y
Y
Y
DBChange Plus Commands
10-107
PERFORM COMMANDS
Example
>base orders
>fix base
Fix Base (Fix Root, Fix Set and Fix Path) issued for 6 set(s).
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
THU, JAN 18, 1990, 7:15 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
HP36386 (X.00.02) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
In this example, the BASE command is issued for the ORDERS
database. The FIX BASE command is issued, followed by
PERFORM COMMANDS. DBChange asks if changes should
be performed online or if a job stream le should be created.
Because the database has been modied since the last DBSTORE,
DBAPLUS asks if you want to continue. When the database has
been successfully xed, the DBChange prompt is returned.
10-108
DBChange Plus Commands
PRINT SCHEMA
PRINT SCHEMA
Syntax
Prints the schema of the database, applying any changes stored in
the current change le.
PR[INT] SC[HEMA] FileName
is the name of an MPE XL disk le to which
the schema is printed. Use this parameter
interactively or in batch mode. The le must
adhere to MPE XL le naming conventions.
(Refer to the MPE XL General Users
Reference Manual .)
Parameters
FileName
Description
Use this command to print the database schema. The printed schema
reects any changes stored in the current change le. The schema
is printed on $STDLIST unless output has been redirected by the
OUTPUT command, or the lename parameter is specied in the
PRINT SCHEMA command. If the lename parameter is specied,
a 60000-line, ASCII MPE XL disk le is created, and the schema
is printed to the disk le in a DBSCHEMA readable format. If the
schema le does not use the 60000 lines of allotted disk space, the
unused disk space is returned to the MPE XL system.
Example 1
>print schema salessc
Schema is printed.
In this example, the schema is interactively printed to an MPE XL
disk le named SALESSC.
Example 2
>print schema ordersz
Old schema file ORDERSZ exists.
Schema is printed.
Purge and create a new file [y/N]? y
In this example, the schema is interactively printed to an MPE XL
disk le named ORDERSZ. Because the le ORDERSZ already
exists, DBChange returns a message conrming whether or not to
purge and create a new le.
Example 3
>print schema ordersz
Duplicate schema file. Cannot process PRINT SCHEMA.
In this example, the schema is printed to an MPE XL disk le named
ORDERSZ in batch mode. Because the le ORDERSZ already
exists, the new schema le is not created.
DBChange Plus Commands
10-109
PRINT SCHEMA
>base orders new
>output lp
>print schema
Example 4
In this example, the schema for the ORDERS database is directed to
a printer.
>base orders old
>:file dbcout;dev=pp,2,3
>output lp
>print schema
Schema is printed.
>output term
Example 5
In this example, the schema for the ORDERS database is directed to
printer PP. The priority is two, and three copies will be printed.
10-110
DBChange Plus Commands
RECOVER ITEM
RECOVER ITEM
Syntax
Cancels a DELETE ITEM command stored in the change le.
REC[OVER] ITEM DataItemName
is the name of the data item to be recovered.
Parameters
DataItemName
Description
Use this command to recover a data item, its type and security
denitions, and all elds represented by the data item.
The recovery can only take place if DBAPLUS has not yet been
run against the current change le. Once DBAPLUS restructures a
database, data items can no longer be recovered. In addition, if a
new data item has already been added with the same name as the
deleted item, then the deleted item cannot be recovered.
If the deleted data item is a eld in a data set that has been
subsequently changed, the eld is not recovered with this command.
That is, if any changes to the data set containing the deleted eld
are stored in the current change le, the eld must be recovered
by adding it back with the ADD FIELD command. For example,
suppose you change a data set capacity and then want to recover a
deleted data item that was a eld in that data set. Because the data
set has been changed, you must add the deleted eld, using the ADD
FIELD command, to that data set.
Example
>delete item zip
>change password CLERK SALESREP
>recover item zip
In this example, the data item ZIP, its type and security denitions,
and all elds represented by the data item are recovered, provided
the data sets containing the elds have not been changed and
DBAPLUS has not yet been run against the current change le.
DBChange Plus Commands
10-111
Cancels a DELETE SET command stored in the change le.
RECOVER SET
REC[OVER] SET DataSetName
Syntax
is the name of the data set to be recovered.
Parameters
DataSetName
Description
Use this command to recover a data set.
The recovery can only take place if DBAPLUS has not yet been
run against the current change le. Once DBAPLUS restructures a
database, data sets can no longer be recovered. In addition, if a new
data set has already been added with the same name as the deleted
data set, then the deleted data set cannot be recovered.
>delete set customer
>change password CLERK SALESREP
>recover set customer
Example
In this example, the data set CUSTOMER is recovered.
10-112
DBChange Plus Commands
REDO
Allows a user to correct or modify the last DBChange command
entered.
REDO
R[EDO]
Syntax
Description
Subcommands
Use this command to display the last DBChange command entered.
Use the associated subcommands to correct or change the displayed
command. The REDO command applies only to the last command
entered and is available only in interactive mode. A warning is issued
if REDO is used in batch mode.
D
H
I
L
R
U
X
deletes the character above the cursor. If D
is repeated, each character above each D is
deleted. The D and I subcommands can be
used in conjunction, to delete characters and
then insert new characters.
lists all the valid editing subcommands.
inserts one or more characters immediately
preceding the character above the cursor.
The D and I subcommands can be used in
conjunction, to delete characters and then
insert new characters.
lists the current command as it is currently
edited.
replaces the characters above the cursor with
new characters. If one character is entered,
the character above the cursor is replaced; if
two characters are entered, two characters
(the character above the cursor and the
character to the right) are replaced; and so
on for additional characters. R is the default
subcommand and is only required when the
rst character to be replaced is a D, H, I, L,
R, U, or X.
restores the line being corrected to its original
form.
executes the edited version of a command
(same as a carriage return).
DBChange Plus Commands
10-113
REDO
Example
>print shcema
Invalid command (DBC 508).
>redo
print shcema
rch
print schema
<---- Incorrect command is entered
<---<---<---<----
Request to REDO command
Command is displayed for corrections
Error is deleted and replaced by correction
Corrected command is displayed
In this example, the PRINT SCHEMA command is corrected using
the R subcommand.
10-114
DBChange Plus Commands
RENAME BASE
RENAME BASE
Syntax
Renames the database.
REN[AME] BA[SE] NewDatabaseName
is the new database name. A database name
must be from 1 to 6 alphanumeric characters,
the rst of which must be alphabetic.
Parameters
NewDatabaseName
Description
Use this command to rename the database named in the previous
BASE command. Note that the database is physically renamed only
after DBAPLUS is run.
Example
>base orders
>rename base order2
In this example, the database ORDERS is renamed to ORDER2.
Before renaming the database, the schema listing begins like this:
BEGIN DATABASE ORDERS;
After renaming the database, the schema listing begins like this:
BEGIN DATABASE ORDER2;
DBChange Plus Commands
10-115
RENAME ITEM
Renames a data item.
REN[AME] ITEM OldItemName NewItemName
Syntax
Parameters
OldItemName
NewItemName
Description
is the name of the data item to be renamed.
is the new name of the data item. Each
data item within a database must have a
unique name. This name must be from 1
to 16 characters, the rst of which must be
alphabetic. Characters after the rst must
be chosen from the following set: letters
A - Z, digits 0 - 9, and + * / ? ' # % & @
inclusive. Data item names are upshifted.
Use this command to rename a data item. The data item is renamed
wherever it appears in the schema, including the data set eld lists.
>rename item lastshipdate shipdate
Example
This example gives the data item LASTSHIPDATE the new name
SHIPDATE.
Before renaming the data item, the ITEMS and SETS parts of the
schema looks like this:
ITEMS:
ACCOUNT
BINNUM
, J2(0,11,12,13,14,18/);
, Z2(/13);
..
.
<---- item to be renamed
LASTSHIPDATE , X6(12/);
ONHANDQTY
, J2(14/12);
..
.
UNIT-COST
LASTSHIPDATE ( DATE-MASTER
BINNUM
CAPACITY: 450(15);
END.
10-116
DBChange Plus Commands
,
),
;
<---- eld to be renamed
RENAME ITEM
After renaming the data item, the ITEMS and SETS parts of the
schema look like this:
ITEMS:
ACCOUNT
BINNUM
, J2(0,11,12,13,14,18/);
, Z2(/13);
.
.
.
SHIPDATE
<---- item renamed
, X6(12/);
.
.
.
CAPACITY:
SHIPDATE
BINNUM
450(15);
( DATE-MASTER
), <---- eld renamed
;
END.
DBChange Plus Commands
10-117
Renames a data set.
RENAME SET
REN[AME] SET OldSetName NewSetName
Syntax
Parameters
OldSetName
NewSetName
Description
is the name of the data set to be renamed.
is the new name of the data set. Each
data set within a database must have a
unique name. This name must be from 1
to 16 characters, the rst of which must be
alphabetic. Characters after the rst must
be chosen from the following set: letters
A - Z, digits 0 - 9, and + * / ? ' # % & @
inclusive. Data set names are upshifted.
Use this command to rename a data set.
>rename set sales local-sales
Example
In this example. the data set SALES is renamed to LOCAL{SALES.
Before renaming the data set, the data set entry in the schema looks
like this:
NAME:
ENTRY:
CAPACITY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
504(14);
,D(11/14,18);
( CUSTOMER (PURCH-DATE )),
(!PRODUCT
),
,
,
,
,
( DATE-MASTER
),
( DATE-MASTER
),
<---- data set to be renamed
After renaming the data set, the data set entry in the schema looks
like this:
NAME:
ENTRY:
CAPACITY:
10-118
LOCAL-SALES ,D(11/14,18);
ACCOUNT
( CUSTOMER (PURCH-DATE
STOCK#
(!PRODUCT
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE ( DATE-MASTER
DELIV-DATE ( DATE-MASTER
504(14);
DBChange Plus Commands
)),
),
,
,
,
,
),
),
<---- data set renamed
REORDER FIELD
REORDER FIELD
Syntax
Parameters
Reorders the eld sequence in a manual master or detail data set.
REO[RDER] F[IELD] DataSetName FieldName [ (NextField) ]
DataSetName
FieldName
(NextField)
Description
Example
is the name of the data set which contains the
eld to be reordered.
is the name of the eld to be reordered. It
must be an existing eld in the data set.
is the existing eld that follows the newly
reordered eld in the eld list for the
data set. If this parameter is omitted, the
reordered eld is placed last.
Use this command to reorder the eld (data item) sequence in a
manual master or detail data set eld list. The eld must already
be an existing eld in the data set. Use the NextField parameter to
specify where you want to place the reordered eld. If you want the
reordered eld to appear in last place, omit the NextField parameter.
>reorder field inventory unit-cost binnum
This example reorders the eld UNIT{COST in the INVENTORY
data set. The eld will appear directly before BINNUM in the eld
listing for the data set.
Before the reorder, the schema entry for INVENTORY looks like
this:
NAME:
ENTRY:
INVENTORY ,D(12,14/13);
STOCK#
(PRODUCT
),
ONHANDQTY
,
SUPPLIER (!SUP-MASTER ),
UNIT-COST
,
LASTSHIPDATE ( DATE-MASTER ),
BINNUM
;
CAPACITY: 450(15);
<---- eld to be reordered
After the reorder, the data set entry in the schema looks like this:
NAME:
ENTRY:
INVENTORY ,D(12,14/13);
STOCK#
( PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
LASTSHIPDATE ( DATE-MASTER
UNIT-COST
BINNUM
CAPACITY: 450(15);
),
,
),
),
,
;
<---- eld reordered
DBChange Plus Commands
10-119
REORDER ITEM
Reorders the sequence in which the data item resides in the database.
REO[RDER] ITEM DataItemName [( NextDataItem)]
Syntax
Parameters
DataItemName
(NextDataItem)
Description
is the name of the data item to be reordered.
is the data item that follows the newly
reordered data item in the schema data
item list. If this parameter is omitted, the
reordered data item is placed last.
Use this command to reorder the data item sequence in the data item
part of the schema. The data item must be an existing data item in
the database. Use the NextDataItem parameter to specify where you
wish to place the reordered eld. If you wish the reordered data item
to appear in last place, omit the NextDataItem parameter.
>reorder item store# street-add
Example
In this example, the data item STORE# is reordered to appear
before the data item STREET{ADD in the schema data item list.
Before the reorder, the schema data item list looks like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
10-120
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
DBChange Plus Commands
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/14);
X6(0,11,12,13,14,18/);
X6((/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
REORDER ITEM
ZIP
STORE#
, X6(12,13,14/11);
, J2(11,12/14);
<---- item to be reordered
After the reorder, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STORE#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
J2(0,11,12,13,14,18/);
Z2(/13);
X12(12,13,14,/11);
R2(/14);
X6(0,11,12,13,14,18/);
X6((/14);
X20(0,11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14,/11);
U8(0,11,12,13,14,18/);
J2(11,12/14);
S26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14);
P8(/12);
X6(12,13,14/11);
<---- item reordered
DBChange Plus Commands
10-121
REORDER SET
Reorders the sequence in which the data set resides in the database.
REO[RDER] SET DataSetName [( NextDataSet)]
Syntax
Parameters
DataSetName
(NextDataSet)
is the name of the data set to be reordered.
It must be an existing data set in the
database.
is the existing data set that follows the newly
reordered data set in the schema data set list.
If this parameter is omitted, the reordered
data set is placed last.
Description
Use this command to reorder the data set sequence in the data set
part of the schema. It must be an existing data set in the database.
Use the NextDataSet parameter to specify where you wish to place
the reordered data set. If you wish the reordered data set to appear
in last place, omit the NextDataSet parameter.
Note
When reordering data sets, remember that all master data sets must
appear in the schema before their related detail data sets.
>reorder set sup-master sales
Example
In this example, the data set SUP{MASTER is reordered to appear
before the data set SALES in the schema data set list.
Before the reorder, the schema data set list looks like this:
SETS:
NAME:
ENTRY:
CUSTOMER
,M(14/11,18);
ACCOUNT
(1)
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
CREDIT-RATING
CAPACITY: 221(10);
10-122
DBChange Plus Commands
,
,
,
,
,
,
,
;
REORDER SET
NAME:
DATE-MASTER ,A(0,11,12,13,14,18/)
ENTRY:
DATE
(3)
CAPACITY: 211(9)
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18)
STOCK#
(2)
DESCRIPTION
CAPACITY: 307(16)
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 504(14)
,D(11/14,18)
( CUSTOMER (PURCH-DATE) )
(!PRODUCT
)
NAME:
ENTRY:
,M(13/12,18);
(1)
SUP-MASTER
SUPPLIER
STREET-ADD
CITY
STATE
ZIP
CAPACITY: 211(12);
NAME:
ENTRY:
( DATE-MASTER
( DATE-MASTER
INVENTORY
,D(12,14/13,18);
STOCK#
(PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
UNIT-COST
LASTSHIPDATE ( DATE-MASTER
BINNUM
CAPACITY: 450(15);
)
)
,
,
,
,
;
<---- data set to
be reordered
),
,
),
,
),
;
END.
DBChange Plus Commands
10-123
REORDER SET
After the reorder, the SETS part of the schema looks like this:
SETS:
NAME:
ENTRY:
CUSTOMER
,M(14/11,18);
ACCOUNT
(1)
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
CREDIT-RATING
CAPACITY: 221(10);
,
,
,
,
,
,
,
;
NAME:
DATE-MASTER ,A(0,11,12,13,14,18/);
ENTRY:
DATE
(2)
CAPACITY: 211(19);
;
NAME:
ENTRY:
PRODUCT
,M(13,14/12,18);
STOCK#
(1)
DESCRIPTION
CAPACITY: 307(16);
NAME:
ENTRY:
SUP-MASTER
SUPPLIER
STREET-ADD
CITY
STATE
ZIP
CAPACITY: 211(12);
,M(13/12,18);
NAME:
ENTRY:
,D(11/14,18);
( CUSTOMER (PURCH-DATE) ),
(!PRODUCT
),
,
,
,
,
( DATE-MASTER
),
( DATE-MASTER
);
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 504(14);
10-124
,
;
DBChange Plus Commands
,
,
,
,
;
<---- data set reordered
REORDER SET
NAME:
ENTRY:
INVENTORY
,D(12,14/13,18);
STOCK#
(PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
UNIT-COST
LASTSHIPDATE ( DATE-MASTER
BINNUM
CAPACITY: 450(15);
),
,
),
,
),
;
END.
DBChange Plus Commands
10-125
Rebuilds a detail data set by removing gaps left by deleted entries
and by adjusting pointers.
REPACK SET
2
Syntax
REP ACK SET DataSetName
2
Parameters
3
SetCapacity
32
DataSetName
SERIAL
CHAINED
(SearchItemName)
SetCapacity
(BlockFactor)
DeviceClass
10-126
DBChange Plus Commands
(BlockFactor)
SERIAL 2
CHAINED (SearchItemName)
3
32
3
DeviceClass
is the name of the detail data set to be
repacked. If a master data set name is used,
DBChange returns an error message stating
that only detail data sets can be repacked.
is used to serially rebuild the detail data
set. This option eliminates space left by
deleted entries and adjusts the pointers while
preserving both the serial order of the data
set and the chronology of every chain for each
path.
is used to reorganize the data set entries
according to the values for the search item
you specify with the SearchItemName . This
option preserves the chronology of every
chain.
is the name of the search item to be used. If
this parameter is omitted, the search item of
the primary path is used. This must be a
valid path or valid search item; that is, it has
not been deleted or newly added.
is the new capacity for the repacked detail
data set. The capacity must be less than
231 01 (2,147,483,647). If this parameter is
omitted, the detail data set capacity is not
changed.
is the new blocking factor for the repacked
detail data set. When determining the
blocking factor, remember that the resulting
block size must not be larger than the
maximum block size for the data set. That
is, if the media record is 6 words and the
maximum block size is 85, the blocking factor
cannot be greater than 14 (85/6=14). If this
parameter is omitted, the detail data set
blocking factor is not changed.
is the new device class for the repacked detail
data set. If this parameter is omitted, the
detail data set device class is not changed.
REPACK SET
Description
Use this command to rebuild a detail data set. This command
eliminates deleted entry gaps and adjusts pointers.
To verify a pending REPACK SET command, use the REVIEW
SETS command. If you want to cancel the data set repack, use
the CANCEL REPACK command before running the DBAPLUS
program.
Refer to chapter 8, \Maintaining the Database," for more
information about repacking data sets.
Example 1
>base orders
>repack set sales serial
Repack Set issued for data set.
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
TUE, MAY 29, 1990, 11:10 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N]? y
Data Set SALES
: 17 entries repacked successfully.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
In this example, the BASE command is issued for the ORDERS
database. The REPACK SET command is issued, specifying a serial
repack for the data set SALES. To repack the data set interactively,
the PERFORM COMMANDS command is issued. The DBCPLUS
program asks if changes should be performed online or if a job le
should be created. Because the database has been modied since
the last DBSTORE, DBAPLUS asks if you wish to continue. When
the data set has been successfully repacked, a message is displayed
stating the number of entries successfully repacked. The DBChange
prompt is returned.
DBChange Plus Commands
10-127
REPACK SET
Example 2
>base orders
>repack set inventory chained (lastshipdate) 100 (4)
REPACK SET issued for data set.
>perform commands
Please wait ... change file is being verified.
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
WED, MAY 30, 1990, 10:00 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
PAGE 1
HEWLETT-PACKARD 30391C.02.00 TurboIMAGE/3000: DBSCHEMA
WED, MAY 30, 1990, 10:00 AM (C) HEWLETT-PACKARD CO. 1987
BEGIN DATABASE ORDERS;
PASSWORDS:
11 CREDIT ;
12 BUYER
;
13 SHIP-REC;
14 CLERK
;
18 DO-ALL ;
ITEMS:
ACCOUNT
BINNUM
.
.
.
10-128
DBChange Plus Commands
, I4(0,11,12,13,14,18/);
, Z2(/13);
REPACK SET
SETS:
..
.
NAME: INVENTORY
ENTRY: STOCK#
ONHANDQTY
SUPPLIER
UNIT-COST
LASTSHIPDATE
BINNUM
CAPACITY: 100(4);
,D(12,14/13,18);
( PRODUCT
),
,
(!SUP-MASTER
),
,
( DATE-MASTER ),
;
<---- capacity and blocking factor changed
END.
..
.
DATA SET
NAME
DATE-MASTER
CUSTOMER
PRODUCT
SUP-MASTER
INVENTORY
SALES
TYPE FLD PT
CNT CT
A
M
M
M
D
D
1
9
2
5
6
8
3
1
2
1
3
4
ENTR MED CAPACITY
LGTH REC
BLK BLK DISC
FAC LGTH SPACE
3
26 365
19 496
43
54 201
10 541
14
31 300
16 497
31
42 201
12 505
20
32 100
4
129
21
37 500
10 371
TOTAL DISC SECTORS INCLUDING ROOT:
NUMBER OF ERROR MESSAGES: 0
ITEM NAME COUNT: 23
DATA SET COUNT: 6
ROOT LENGTH: 1176
BUFFER LENGTH: 541
96
112
80
80
64 <---- capacity
160
and blocking
624
factor
changed
TRAILER LENGTH: 256
ROOT FILE ORDERS CREATED.
New database schema is saved as temporary file ORDERSSC
Temporary file created for set INVENTORY.
Data set DATE-MASTER
: No conversion necessary.
Data set CUSTOMER
: No conversion necessary.
Data set PRODUCT
: No conversion necessary.
Data set SUP-MASTER
: No conversion necessary.
Data set INVENTORY
: 5 entries expected.
Data set INVENTORY
: 5 entries repacked successfully.
Data set SALES
: No conversion necessary.
HP36386 (A.00.00) DBCHANGE
(c) COPYRIGHT Hewlett-Packard Co. 1985
DBChange Plus Commands
10-129
REPACK SET
>
10-130
DBChange Plus Commands
REPACK SET
In this example, the BASE command is issued for the ORDERS
database. The REPACK SET command is issued, specifying a
chained repack for the detail data set INVENTORY on the search
item LASTSHIPDATE. The capacity is changed to 100 and the
blocking factor is changed to 4.
After issuing a PERFORM COMMANDS to actually repack the data
set, the schema is printed along with messages about the status of
the repack. In this case, ve entries were successfully repacked.
DBChange Plus Commands
10-131
REVIEW BLOCKS
Displays information about the blocking factor of one or more data
sets.
2
Syntax
Parameters
DataSetName
@
Description
3
2
REV IEW BLOCK S
3
DataSetName
@
is the name of the data set to be reviewed.
indicates you want to review the blocking
factor of all data sets in the database. This
parameter is the default.
Use this command to review the following information about one or
more data sets:
Data Set
is the name of the master or detail data set being
Name
reviewed.
Type
is the type of data set being reviewed. Valid data set
types are as follows:
A
is for automatic master data set.
M
is for manual master data set.
D
is for detail data set.
Fld Cnt
is the number of elds in the data set.
Pth Cnt
is the number of paths connecting the data set to
other data sets.
Entr Len
is the total length of the data set entries in 16-bit
words excluding chain counters and pointers.
Med Rec
is the total length of the data set entries including
chain counters and pointers.
Capacity
is the capacity of the data set.
Blk Fac
is the blocking factor of the data set.
Blk Len
is the block length of the data set.
Blk Max
is the maximum physical block length of the data set
or the default to block length. Note that this column
can be the same as the Blk Len column. However, if
$CONTROL BLOCKMAS is need for DBSCHEMA,
or if the CHANGE BLOCKMAX command is used,
the Blk Max number is automatically checked, and, if
necessary, changed by the DBCPLUS program.
In addition to the above information, error messages for incorrect
blocking factor, block length, or block maximum are displayed. All
changes stored in the the current change le are included in the
REVIEW BLOCKS output. Any pending CHECK SET and FIX
SET messages are also displayed.
10-132
DBChange Plus Commands
REVIEW BLOCKS
Example
>review blocks @
REVIEW BLOCKS:
Fld Pth Entr Med
Blk Blk Blk
Data Set Name
Type Cnt Cnt Len Rec Capacity Fac Len Max
----------------------------------------------------------------CUSTOMER
DATE-MASTER
PRODUCT
SALES
SUP-MASTER
INVENTORY
M
A
M
D
M
D
9
1
2
8
5
6
1
3
2
4
1
3
43
3
14
21
31
20
54
26
31
37
42
32
221
211
307
504
211
450
10
19
16
14
12
15
541
496
498
519
505
481
640
496
498
640
505
481
>
In this example, all the data sets in the ORDERS database are
reviewed using the REVIEW BLOCKS command.
DBChange Plus Commands
10-133
REVIEW FIELDS
Displays information about the elds (data items) in a master and
detail data set.
REV[IEW] F[IELDS] DataSetName
Syntax
is the name of a data set that contains elds
to be reviewed.
Parameters
DataSetName
Description
Use this command to review elds (data items) in a data set. For a
master data set, the following information is displayed:
Data Set No. is the sequence in which the data set appears in the
SETS part of the schema.
Name
is the data set name.
Type
is the type of data set. Valid data set types are as
follows:
A
is for automatic master data set.
M
is for manual master data set.
D
is for detail data set.
Fld No.
is the sequence in which the eld appears in the data
set.
Field Name
is the name of the eld.
Detail Set
is the name of the related detail data set.
Name
Path's Search is the name of the key item by which the master data
set is linked to a detail data set.
Item
For a detail data set, the information displayed is similar to that of
a master data set, except that paths are described along with the
names of the related master data sets. The primary path and any
sort items are also indicated. All changes stored in the the current
change le are included in the REVIEW FIELDS output.
10-134
DBChange Plus Commands
REVIEW FIELDS
Example
>review fields product
REVIEW FIELDS (MASTER SET):
Data Set No.: 3
Name: PRODUCT
Type: M
Fld No. Field Name
Detail Set Name Path's Search Item
--------------------------------------------------------------1
STOCK#
2
3
DESCRIPTION
DISC-PRICE
SALES
INVENTORY
STOCK#
STOCK#
>
In this example, the elds in the master data set PRODUCT are
reviewed. The data set PRODUCT contains three elds, STOCK#,
DESCRIPTION, and DISC{PRICE. The key item, STOCK#,
denes paths to two detail data sets, SALES and INVENTORY.
DBChange Plus Commands
10-135
REVIEW ITEMS
Displays information about the data items in the database.
2
Syntax
Parameters
3
2
REV IEW ITEM S
@
DataItemName
indicates you want to review all data items.
This parameter is the default.
is the name of a data item to be reviewed.
@
DataItemName
Description
3
Use this command to review data items in the database. The
following information is displayed:
Itm No.
is the sequence in which the data item resides in the
database.
Item Name
is the name of the data item being reviewed.
Attrib
are the attributes of the data item and includes the
subitem count, the subitem type, and the subitem
length.
Security
is the user class access to the data item.
All changes stored in the the current change le are included in the
REVIEW ITEMS output.
>review items credit-rating
Example
REVIEW ITEMS:
Itm No. Item Name
Attrib Security
-----------------------------------------4
CREDIT-RATING
R2
(/14)
>
In this example, the data item CREDIT{RATING is reviewed. It is
data item number 4 with subitem count 1 (the default), subitem type
R, and subitem length 2. User class 14 has read and write access to
the data item, unless otherwise restricted by data set security.
10-136
DBChange Plus Commands
REVIEW PASSWORDS
Displays information about user classes and associated passwords in
the database.
REVIEW
PASSWORDS
2
Syntax
Parameters
3
2
REV IEW PAS SWORDS
Example
UserClass
@
is the name of the user class whose security
you want to review.
indicates you want to review all user classes
and their associated passwords. This
parameter is the default.
UserClass
@
Description
3
Use this command in interactive mode to review user classes and
passwords in the database. The information displayed includes the
database name, each user class, and its associated password. All
changes stored in the the current change le are included in the
REVIEW PASSWORDS output.
>review passwords
REVIEW PASSWORDS:
User Class
Password
----------------------11
12
14
15
18
CREDIT
BUYER
CLERK
MANAGER
DO-ALL
>
In this example, the user classes and passwords in the ORDERS
database are reviewed. Because no UserClass parameter is specied,
all user classes and their associated passwords are displayed.
DBChange Plus Commands
10-137
REVIEW PATHS
Displays information about the paths in a data set.
REV[IEW] PAT[HS] DataSetName
Syntax
is the name of the master or detail data set
whose paths you want to review.
Parameters
DataSetName
Description
Use this command in interactive and batch mode to review the
paths in a data set. For detail data sets, the following information is
displayed:
Data Set No.
is the sequence in which the data
set appears in the SETS part of the
schema.
Name
is the name of the detail data set
being reviewed.
Type
is the type of data set. D is for a
detail data set.
Search Item Name
is the name of the search item linking
the detail data set to a master data
set.
Master Set Name
is the name of the master data set to
which the detail data set is associated.
Sort Item Name
is the name of the sort item.
Primary
indicates the primary path.
For master data sets, the following information is displayed:
Data Set No.
is the sequence in which the data
set appears in the SETS part of the
schema.
Name
is the name of the master data set
being reviewed.
Type
is the type of master data set. Valid
data set types are as follows:
A
is for automatic master data
set.
M
is for manual master data set.
Key(Search) Item
is the key item that connects the
master data set to the related detail
data set.
Detail Set Name
is the name of the related detail data
set.
Sort Item Name
is the name of the sort item.
10-138
DBChange Plus Commands
REVIEW PATHS
All changes stored in the the current change le are included in the
REVIEW PATHS output. The REVIEW PATHS command also
displays status messages if a CHECK PATH or FIX PATH command
is pending.
DBChange Plus Commands
10-139
REVIEW PATHS
Example 1
>review paths inventory
REVIEW PATHS (DETAIL SET):
Data Set No.: 6
Name: INVENTORY
Type: D
Search Item Name Master Set Name
Sort Item Name
Primary
---------------------------------------------------------------STOCK#
SUPPLIER
LASTSHIPDATE
PRODUCT
SUP-MASTER
DATE-MASTER
Y
>
In this example, the paths for the detail data set INVENTORY are
reviewed. The data set number is 6. The search item SUPPLIER
represents the primary path. No sort items are identied for any of
the paths.
Example 2
>review path customer
REVIEW PATHS (MASTER SET):
Data Set No.: 2
Name: CUSTOMER
Type: M
Key(Search) Item Detail Set Name
Sort Item Name
-----------------------------------------------------ACCOUNT
SALES
PURCH-DATE
>
In this example, the paths for the master data set CUSTOMER are
reviewed. The data set number is 2. The key item is ACCOUNT,
the related detail data set is SALES, and the sort item is
PURCH{DATE.
10-140
DBChange Plus Commands
REVIEW SETS
Displays information about the data sets in the database.
REVIEW SETS
2
Syntax
Parameters
3
@
DataSetName
Description
2
REV IEW SET S
3
@
DataSetName
indicates you want to review all data sets.
This parameter is the default.
is the name of a data set to be reviewed.
Use this command to review data sets in the database. For each data
set, the following information is displayed:
Set No.
is the sequence in which the data
set appears in the SETS part of the
schema.
Data Set Name
is the name of the data set.
Type
is the type of data set. Valid data set
types are as follows:
A
is for automatic master data
set.
M
is for manual master data set.
D
is for detail data set.
Capacity
is the capacity of the data set.
Blk Fac
is the blocking factor of the data set.
Blk Max
is the maximum physical block length
of the data set or the default to block
length.
Dev Class
identies the disk on which the data
set resides.
Security
is the user class access to the data set.
The REVIEW SETS command also displays status messages if a
CHECK SET command is pending. All changes stored in the the
current change le are included in the REVIEW SETS output.
DBChange Plus Commands
10-141
REVIEW SETS
Example
>review sets inventory
REVIEW SETS:
Set
Blk Blk Dev
No. Data Set Name Type Capacity Fac Max Class
Security
-------------------------------------------------------------6
INVENTORY
D
450
15
481
DISK1
(12,14/18)
>
In this example, the detail data set INVENTORY is reviewed. It is
data set number 6 on device class identied as DISK1 with a capacity
of 450 and a blocking factor of 15. The maximum block size is 481.
User class 18 has write (and implied read) access and user classes 12
and 14 have read-only access to the data set.
10-142
DBChange Plus Commands
XEQ
Executes DBChange commands from a le instead of the terminal or
batch les.
XEQ
Syntax
X[EQ] FileName
is the name of an ASCII le containing
commands and parameters.
Parameters
FileName
Description
Use this command to execute DBChange commands from a le
instead of the standard input device. All commands that are
accepted by DBChange Plus are allowed in an XEQ le. To create an
XEQ le, use a text editor.
When an XEQ command is entered, DBChange reads the specied
le and executes the commands until it reaches the end-of-le. The
command le must contain all data needed. When the end-of-le is
reached, control returns to the original command input device (in
session mode, the terminal; or in batch mode, the batch le).
In session mode, during the execution of an XEQ le, the DBCPLUS
program displays the contents of the le and any messages on
the screen. You are prompted if any changes in the le may have
unexpected results or may cause loss of data. If an error occurs
when the database is being opened, the DBCPLUS program closes
the XEQ le and prompts for another command. If an error occurs
when executing a DBChange Plus command, error messages are
displayed on the screen. You can then correct the XEQ le and enter
the XEQ command again. If the XEQ le contains a PERFORM
COMMANDS command, you are prompted for conrmation before
the database is restructured.
In batch mode, during the execution of an XEQ le, if an error
occurs when the database is being opened, DBChange closes the
XEQ le and terminates the job. If an error occurs while executing
a DBChange command, the error message is sent to DBCOUT, and
XEQ continues processing subsequent commands.
DBChange Plus Commands
10-143
XEQ
Example
>xeq xeqfile
><<This command file creates a new change file for the ORDERS database >>
><< and stores the addition of the data item REGION in the change file >>
>
>base orders
<---- DBChange command
>delete item date
<---- DBChange command
Deleting this data item will cause loss of data, delete [y/N]? y
Deletion of data item accepted.
>add item region j 2 (11,12/14)
<---- DBChange command
Addition of data item accepted.
>
> XEQ file is at end-of-file.
>
This example interactively executes the le XEQFILE. Note that,
because the deletion of the data item DATE will cause loss of data,
DBChange prompts for conrmation.
10-144
DBChange Plus Commands
A
DBChange Plus Messages
This appendix lists the DBChange Plus error and information
messages. In the case of error messages, the cause of the error and
user action to resolve the error are supplied for each message.
Note
All messages are arranged in numerical order. Duplicate message
numbers exist. In those cases, refer to the code in parentheses
following the message to determine the correct message. For
example, (DBC 500) is a DBCPLUS message, and (DBA 500) is a
DBAPLUS message.
0
MESSAGE
Cannot open message catalog,
DBCMSGS.PUB.SYS (FSERR n ) (DBC 0).
MEANING
The DBChange Plus message catalog,
DBCC000.PUB.SYS, is corrupt or does
not exist.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||5
MESSAGE
Unable to issue file equate for
DBCHGF (CIERR n ) (DBC 5).
MEANING
The MPE intrinsic COMMAND failed.
Refer to the MPE Intrinsics Reference
Manual , where CIERR n is the error
number returned from the COMMAND
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-1
6
MESSAGE
Cannot read the change file
(FSERR n ) (DBC 6).
MEANING
The MPE intrinsic FREADDIR failed
while reading the change le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-2
DBChange Plus Messages
7
MESSAGE
Cannot write to the change file
(FSERR n ) (DBC 7).
MEANING
The MPE intrinsic FWRITEDIR failed
while writing to the change le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||8
MESSAGE
Cannot open the change file
(FSERR n ) (DBC 8).
MEANING
The MPE intrinsic FOPEN failed while
opening the change le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||9
MESSAGE
Cannot open the root file (FSERR n )
(DBC 9).
MEANING
ACTION
The MPE intrinsic FOPEN failed while
opening the database root le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
||||||||||||||||||||||||||||||
|||||||||10
MESSAGE
Cannot close the change file (FSERR
n ) (DBC 10).
MEANING
The MPE intrinsic FCLOSE failed while
closing the change le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-3
11
MESSAGE
Cannot close the root file (FSERR n )
(DBC 11).
MEANING
The MPE intrinsic FCLOSE failed while
closing the database root le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||12
MESSAGE
Cannot read the root file (FSERR n )
(DBC 12).
MEANING
ACTION
The MPE intrinsic FREAD or
FREADDIR failed while reading the
database root le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
||||||||||||||||||||||||||||||
|||||||||13
MESSAGE
Cannot open the database (IMAGERR n )
(FSERR n ) (DBC 13).
MEANING
The TurboIMAGE/XL intrinsic
DBOPEN failed while opening the
database.
ACTION
Refer to the TurboIMAGE/XL DBMS
Reference Manual , where IMAGERR
n is the error number returned in
the status array. Refer to the MPE
Intrinsics Reference Manual , where
FSERR n is the le system error number
returned from the FCHECK intrinsic.
An asterisk (*) means no le system
error occurred.
||||||||||||||||||||||||||||||
|||||||||-
A-4
DBChange Plus Messages
14
MESSAGE
Cannot close the database (IMAGERR
n ) (FSERR n ) (DBC 14).
MEANING
The TurboIMAGE/XL intrinsic
DBCLOSE failed while closing the
database.
Refer to the TurboIMAGE/XL DBMS
Reference Manual , where IMAGERR
n is the error number returned in
the status array. Refer to the MPE
Intrinsics Reference Manual , where
FSERR n is the le system error number
returned from the FCHECK intrinsic.
An asterisk (*) means no le system
error occurred.
ACTION
||||||||||||||||||||||||||||||
|||||||||15
MESSAGE
Internal error, change file not open
(DBC 15).
MEANING
The change le was closed unexpectedly.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||16
MESSAGE
DBINFO intrinsic failed (IMAGERR n )
(FSERRn ) (DBC 16).
MEANING
The TurboIMAGE/XL intrinsic
DBINFO failed.
ACTION
Refer to the TurboIMAGE/XL DBMS
Reference Manual , where IMAGERR
n is the error number returned in
the status array. Refer to the MPE
Intrinsics Reference Manual , where
FSERR n is the le system error number
returned from the FCHECK intrinsic.
An asterisk (*) means no le system
error occurred.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-5
17
MESSAGE
The change file is full (DBC 17).
MEANING
The DBCPLUS program failed to nd
any empty records in the change le for
the new change.
Run the DBAPLUS program to
restructure the database with the
current changes. Then run the
DBCPLUS program to create a new
change le for the remaining changes.
ACTION
Caution
Review the changes in the change le before running the DBAPLUS
program. Make sure that the changes will leave the database in a
consistent state.
||||||||||||||||||||||||||||||
|||||||||18
MESSAGE
FFILEINFO intrinsic failed
(FSERR n ) (DBC 18).
MEANING
The MPE intrinsic FFILEINFO failed.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||19
MESSAGE
Cannot create temporary DBCHGF file
(FSERR n ) (DBC 19).
MEANING
The change le could not be built.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||20
MESSAGE
Cannot purge temporary DBCHGF file
(FSERR n ) (DBC 20).
MEANING
The change le could not be purged.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||A-6
DBChange Plus Messages
21
MESSAGE
Invalid control record in change
file (DBC 21).
MEANING
The database name, or the group and
account stored in an existing change le
does not match the logon group and
account or the database name.
Verify that you have logged on correctly
and entered the correct database name.
ACTION
||||||||||||||||||||||||||||||
|||||||||22
MESSAGE
Internal item information is
inconsistent (DBC 22).
MEANING
The change le contains an inconsistent
or invalid item name or number.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||23
MESSAGE
Internal set information is
inconsistent (DBC 23).
MEANING
The change le contains an inconsistent
or invalid data set name or number.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||24
MESSAGE
Internal error, cannot find set
information record (DBC 24).
MEANING
The set information record for the
master data set associated with the sort
item could not be found in the change
le.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||25
MESSAGE
Internal error, no search key
defined for master (DBC 25).
MEANING
No key item is dened for the master
data set in the set information record in
the change le.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||DBChange Plus Messages
A-7
26
MESSAGE
Insufficient stack space available
to initialize change file (DBC 26).
MEANING
The stack could not be expanded enough
to hold the root le information. Set and
item information must be read from the
root le to initialize tables stored in the
change le.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||27
MESSAGE
Cannot initiate DBAPLUS (create
failed) (DBC 27).
MEANING
The MPE intrinsic CREATE failed.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||28
MESSAGE
Cannot initiate DBAPLUS (activate
failed) (DBC 28).
MEANING
The MPE intrinsic ACTIVATE failed.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||51
MESSAGE
Enter the item/set name or @ to
review all items/sets (DBC 51).
MEANING
ACTION
The item or set name cannot be blank.
To change a set or item, enter the
name. To review sets or items, use the
REVIEW SETS or REVIEW ITEMS
command.
||||||||||||||||||||||||||||||
|||||||||-
A-8
DBChange Plus Messages
52
MESSAGE
This is not a TurboIMAGE database
(DBC 52).
MEANING
The database is an IMAGE/3000
database. DBChange Plus can only be
used on TurboIMAGE/XL databases.
Use DBCONV.PUB.SYS to convert
the IMAGE/3000 database to a
TurboIMAGE/XL database. Run
DBChange Plus again.
ACTION
||||||||||||||||||||||||||||||
|||||||||56
MESSAGE
The master data set is not in the
database (DBC 56).
MEANING
The master data set has not been
dened for this database.
Enter the name of an existing master
data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||57
MESSAGE
Enter either user class or password
to delete a password (DBC 57).
MEANING
Neither the user class nor the password
were specied. You must enter either the
user class or password or both when
deleting a password.
Enter the user class, password, or both.
ACTION
||||||||||||||||||||||||||||||
|||||||||58
MESSAGE
The detail data set is not in the
database (DBC 58).
MEANING
The detail data set has not been dened
for this database.
Enter the name of an existing detail data
set.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-9
59
MESSAGE
Enter new database name if copying
to logon group and account (DBC 59).
MEANING
When making a copy of the database
that will reside in the logon group and
account, you must specify a dierent
name for the database copy.
Specify a new name for the database
copy.
ACTION
||||||||||||||||||||||||||||||
|||||||||61
MESSAGE
Job stream file FileName cannot be
opened (FSERR n ) (DBC 61).
MEANING
Could not open the job stream le
FileName that would run the DBAPLUS
program in batch mode.
ACTION
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
||||||||||||||||||||||||||||||
|||||||||62
MESSAGE
The user class does not match the
password entered (DBC 62).
MEANING
The specied user class is not associated
with the specied password.
Enter a user class that corresponds to
the password you want to delete.
ACTION
||||||||||||||||||||||||||||||
|||||||||63
MESSAGE
This user class already exists (DBC
63).
MEANING
The specied user class number already
exists.
Specify a new and unique user class
number that does not already exist.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-10
DBChange Plus Messages
64
MESSAGE
The user class does not exist (DBC
64).
MEANING
The specied user class does not exist.
Specify an existing user class.
ACTION
||||||||||||||||||||||||||||||
|||||||||65
MESSAGE
Database copy must be done
independently of any other changes
(DBC 65).
MEANING
When copying a database, you cannot
specify any other DBChange Plus
function, except HELP or EXIT. If you
wish to copy the database to another
name, you must enter the new name at
the same time you enter the user, group,
and account for the copy.
Run the DBAPLUS program to copy the
database; then, after the copy is nished,
enter any other changes you wants.
ACTION
||||||||||||||||||||||||||||||
|||||||||66
MESSAGE
Duplicate data item name (DBC 66).
MEANING
A data item cannot be renamed with the
name of an existing data item in the
database.
Specify a new data item name. To
review existing data items, use the
REVIEW ITEMS command.
ACTION
||||||||||||||||||||||||||||||
|||||||||67
MESSAGE
No more data items can be added; max.
of 1023 has been reached (DBC 67).
MEANING
The TurboIMAGE/XL limit of 1023
data items per database has been
reached.
To add this data item, you must rst
delete a data item from the database.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-11
68
MESSAGE
No more data sets can be added; max.
of 199 has been reached (DBC 68).
MEANING
The TurboIMAGE/XL limit of 199 data
sets per database has been reached.
To add this data set, you must rst
delete a data set from the database.
ACTION
||||||||||||||||||||||||||||||
|||||||||69
MESSAGE
Search item must be a non-compound
item (DBC 69).
MEANING
The subitem count of a search item
cannot be changed because a search item
cannot be a compound data item. A
search item must have a subitem count
of 1.
Make sure the item whose subitem count
you are changing is not a search item.
ACTION
||||||||||||||||||||||||||||||
|||||||||70
MESSAGE
New item type cannot be converted
from current item type (DBC 70).
MEANING
When changing data item attributes,
the new data item type must be able to
convert from the existing data item type.
Refer to Table 4-2 for information on
available type conversions between
dierent item types.
ACTION
||||||||||||||||||||||||||||||
|||||||||71
MESSAGE
This is not a field in this data set
(DBC 71).
MEANING
The specied eld is not an item in this
data set.
Specify a valid eld. To review the
elds in the data set, use the REVIEW
FIELDS command.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-12
DBChange Plus Messages
72
MESSAGE
No more fields can be added; max. of
255 has been reached (DBC 72).
MEANING
The TurboIMAGE/XL limit of 255 items
(elds) per data set has been reached.
To add this eld, you must rst delete a
eld from the data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||73
MESSAGE
Only one primary path can be defined
(DBC 73).
MEANING
More than one primary path for this
data set was specied.
Specify only one primary path.
ACTION
||||||||||||||||||||||||||||||
|||||||||74
MESSAGE
Duplicate search item in detail set
(DBC 74).
MEANING
The search item in a detail data set was
dened as the key item for two or more
master data sets.
Dene one unique key item for each
master data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||75
MESSAGE
A sort item must be type U, X or K
(DBC 75).
MEANING
An item type other than U, X, or K was
specied for a sort item. Only U, X, or
K type is valid for sort items.
Specify a sort item of type U, X, or K.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-13
76
MESSAGE
Run DBAPLUS from group.account
where database will reside (DBC 76).
MEANING
When copying a database, you must
logon to the group and account where
the copy will reside and run the
DBAPLUS program from that group
and account.
Logon to the group and account
where the copy will reside and run the
DBAPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||77
MESSAGE
This field already exists in this
data set (DBC 77).
MEANING
The item to be added already exists in
this data set.
Specify a new data item name.
ACTION
||||||||||||||||||||||||||||||
|||||||||78
MESSAGE
This is not a master set (DBC 78).
MEANING
A detail data set name was specied, but
a master data set name is required.
Specify a master data set name.
ACTION
||||||||||||||||||||||||||||||
|||||||||79
MESSAGE
This is not a detail data set (DBC
79).
MEANING
A master data set name was specied,
but a detail data set name is required.
Specify a detail data set name.
ACTION
||||||||||||||||||||||||||||||
|||||||||80
MESSAGE
Enter a Y to redefine primary path
(DBC 80).
MEANING
A character other than Y was entered.
Enter Y if you want to redene the
primary path.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-14
DBChange Plus Messages
81
MESSAGE
Job stream file FileName cannot be
created (FSERR n ) (DBC 81).
MEANING
Could not create the job stream le
FileName that runs the DBAPLUS
program in batch mode.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||82
MESSAGE
This is not a data item in the
database (DBC 82).
MEANING
The specied data item does not exist in
the database or change le.
Specify the name of an existing data
item.
ACTION
||||||||||||||||||||||||||||||
|||||||||83
MESSAGE
This is not a data set in the
database (DBC 83).
MEANING
The specied data set does not exist in
the database or change le.
Specify the name of an existing data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||84
MESSAGE
This item already exists (DBC 84).
MEANING
The data item to be added already exists
in the database or change le.
Specify a new data item name.
ACTION
||||||||||||||||||||||||||||||
|||||||||85
MESSAGE
This set already exists (DBC 85).
MEANING
The data set to be added already exists
in the database or change le.
Specify a new data set name.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-15
86
MESSAGE
The device class is not configured
on the system (DBC 86).
MEANING
The device class entered for the data set
is not congured on the system.
Enter the name of a congured device
class that is valid for a disk le.
ACTION
||||||||||||||||||||||||||||||
|||||||||87
MESSAGE
Duplicate data set name (DBC 87).
MEANING
A data set cannot be renamed with the
name of an existing data set.
Specify a new data set name. To review
existing data sets, use the REVIEW
SETS command.
ACTION
||||||||||||||||||||||||||||||
|||||||||88
MESSAGE
This name cannot be blank (DBC 88).
MEANING
A required name was not specied.
Specify a name.
ACTION
||||||||||||||||||||||||||||||
|||||||||89
MESSAGE
You must logon as the database
creator (DBC 89).
MEANING
To perform any DBChange Plus
functions, you must logon as the
database creator.
Logon as the database creator.
ACTION
||||||||||||||||||||||||||||||
|||||||||90
MESSAGE
The search item of a manual master
cannot be changed (DBC 90).
MEANING
Changing the key item of a manual
master data set is not supported.
To add or delete paths to a manual
master data set, change the associated
detail data set path.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-16
DBChange Plus Messages
91
MESSAGE
This is a deleted data item (DBC 91).
MEANING
The specied data item has been
previously deleted.
Specify the name of an existing data
item.
ACTION
||||||||||||||||||||||||||||||
|||||||||92
MESSAGE
This is a deleted data set (DBC 92).
MEANING
The specied data set has been
previously deleted.
Specify the name of an existing data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||93
MESSAGE
Write to job stream file FileName
failed (FSERR n ) (DBC 93).
MEANING
Could not write to the job stream le
FileName that runs the DBAPLUS
program in batch mode.
ACTION
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
||||||||||||||||||||||||||||||
|||||||||94
MESSAGE
An automatic master search item
cannot be changed (DBC 94).
MEANING
The key item in an automatic master
data set cannot be explicitly changed.
To change an automatic master data
set key item, rst delete the automatic
master data set then re-add it with a
dierent search item.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-17
95
MESSAGE
Master data set cannot be moved
after its related details (DBC 95).
MEANING
When reordering data sets, a master
data set must be moved before any of its
associated detail data sets.
Reorder the master data set so that it is
dened before all of its associated detail
data sets.
ACTION
||||||||||||||||||||||||||||||
|||||||||96
MESSAGE
New capacity cannot be less than
number of existing entries (DBC 96).
MEANING
The specied new capacity is less than
the number of existing entries in the
data set.
Specify a capacity that is equal to or
greater than the number of existing
entries.
ACTION
||||||||||||||||||||||||||||||
|||||||||97
MESSAGE
New name does not follow TurboIMAGE
naming conventions (DBC 97).
MEANING
A data item or data set cannot be added
or renamed with an invalid name. A
data item or data set name must be
from 1 to 16 characters, and the rst
character must be alphabetic.
Specify a valid data item or data set
name.
ACTION
||||||||||||||||||||||||||||||
|||||||||98
MESSAGE
A search item name is required for a
master set (DBC 98).
MEANING
A new master data set cannot be added
without specifying the required key item.
Specify a key item when adding the
master data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-18
DBChange Plus Messages
99
MESSAGE
Detail data set cannot be moved
before its related masters (DBC 99).
MEANING
When reordering data sets, a detail
data set must be moved after any of its
associated master data sets.
Reorder the detail data set so that it is
dened after all of its associated master
data sets.
ACTION
||||||||||||||||||||||||||||||
|||||||||100
MESSAGE
The search item must be a field in
this data set (DBC 100).
MEANING
The specied search item is not a eld in
this detail data set.
Add the search item to the eld list in
the detail data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||101
MESSAGE
No more paths can be added, max. of
16 has been reached (DBC 101).
MEANING
The TurboIMAGE/XL limit of 16 paths
per data set has been reached.
To add this path, you must rst delete a
path from the data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus
Messages
(continued)
||||||||||||||||||||||||||||||
|||||||||102
MESSAGE
Detail search item (type) does not
match master key (DBC 102).
MEANING
A search item specied in the detail data
set has a dierent data type than the
key item in the related master data set.
Specify the same data type for the
search and key items that dene the
path from the detail data set to the
master data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||DBChange Plus Messages
A-19
103
MESSAGE
Detail search item (length) does not
match master key (DBC 103).
MEANING
A search item specied in the detail data
set has a dierent length than the key
item in the related master data set.
Specify the same length for the search
and key items that dene the path from
the detail data set to the master data
set.
ACTION
||||||||||||||||||||||||||||||
|||||||||104
MESSAGE
This is not a search item in the data
set (DBC 104).
MEANING
The specied search item is not a search
item in the detail data set.
Specify the name of an existing search
item.
ACTION
||||||||||||||||||||||||||||||
|||||||||105
MESSAGE
This is a search item, delete the
path first (DBC 105).
MEANING
A search item cannot be deleted from a
data set.
Delete the path to the data set rst,
then delete the item.
ACTION
||||||||||||||||||||||||||||||
|||||||||107
MESSAGE
Sub-item length for item type I or J
must be 1, 2, or 4 (DBC 107).
MEANING
The specied length is invalid for item
type I or J.
Specify a subitem length of 1, 2, or 4.
ACTION
||||||||||||||||||||||||||||||
|||||||||108
MESSAGE
Sub-item length for item type R must
be 2 or 4 (DBC 108).
MEANING
The specied length is invalid for item
type R.
Specify a subitem length of either 2 or 4.
ACTION
||||||||||||||||||||||||||||||
|||||||||A-20
DBChange Plus Messages
109
MESSAGE
Sub-item length for item type K must
be 1 or 2 (DBC 109).
MEANING
The specied length is invalid for item
type K.
Specify a subitem length of 1 or 2.
ACTION
||||||||||||||||||||||||||||||
|||||||||110
MESSAGE
Product of sub-item count and length
must be even (DBC 110).
MEANING
When adding or changing a data item of
type U or X, the product of the subitem
count and length must be an even
number.
Specify a subitem count and length for
which the product is even.
ACTION
||||||||||||||||||||||||||||||
|||||||||111
MESSAGE
Data item length cannot exceed 2047
words (DBC 111).
MEANING
The product of the subitem count and
subitem length is greater than 2047
words.
Correct the length and count.
ACTION
||||||||||||||||||||||||||||||
|||||||||112
MESSAGE
Product of sub-item count and length
must be divisible by 4 (DBC 112).
MEANING
When adding or changing a data item
type of P, the product of the subitem
count and length must be divisible by 4.
Correct the length and count.
ACTION
||||||||||||||||||||||||||||||
|||||||||113
MESSAGE
No more items to display (DBC 113).
MEANING
You have reached the beginning or end
of the data item list.
No action necessary.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-21
114
MESSAGE
The master set has to be defined
before the detail (DBC 114).
MEANING
A detail data set was added with paths
to a master data set that is dened later
in the schema.
Place the new detail data set after
all associated master data sets in the
schema.
ACTION
||||||||||||||||||||||||||||||
|||||||||115
MESSAGE
No more sets to display (DBC 115).
MEANING
You have reached the beginning or end
of the data set list.
No action necessary.
ACTION
||||||||||||||||||||||||||||||
|||||||||117
MESSAGE
No more fields to display (DBC 117).
MEANING
You have reached the beginning or end
of the eld list.
No action necessary.
ACTION
||||||||||||||||||||||||||||||
|||||||||119
MESSAGE
A value must be entered in this field
(DBC 119).
MEANING
A required value is missing.
Specify the required value.
ACTION
||||||||||||||||||||||||||||||
|||||||||120
MESSAGE
No changes have been entered in the
change file (DBC 120).
MEANING
The change le contains no changes for
DBAPLUS to process.
Enter changes before invoking the
DBAPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-22
DBChange Plus Messages
122
MESSAGE
Only `R', `W', `N', or blank is valid
(DBC 122).
MEANING
A character other than R, W, N, or
blank was specied.
Enter R for read access, W for read and
write access, N for no access, or leave
blank.
ACTION
||||||||||||||||||||||||||||||
|||||||||123
MESSAGE
Cannot open the schema file
(FSERR n ) (DBC 123).
MEANING
The MPE intrinsic FOPEN failed while
opening the schema le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||124
MESSAGE
Cannot write to the schema file
(FSERR n ) (DBC 124).
MEANING
The MPE intrinsic FWRITE failed while
writing to the schema le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||125
MESSAGE
Check file FileName exists; it will
be overwritten (DBA 125).
MEANING
ACTION
The le FileName used to hold the
events from a prior CHECK will be
purged.
If the le FileName is still needed,
rename it.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-23
125
MESSAGE
Duplicate password (DBC 125).
MEANING
The specied password already exists for
this database.
Specify a new and unique password.
ACTION
||||||||||||||||||||||||||||||
|||||||||126
MESSAGE
Change file version n not match
DBChange version n (DBC 126).
MEANING
The change le was either created
with an old version of DBChange or
with a newer version than is currently
executing. The change le may have
been created by either DBChange/V or
DBChange/CM, not by DBChange Plus.
ACTION
Verify that the version of DBChange
running on your system is the correct
one. Then purge the change le and
create a new one.
||||||||||||||||||||||||||||||
|||||||||127
MESSAGE
Database is opened exclusively by
another user (DBC 127).
MEANING
The database has been opened
exclusively by another user, during
which time no other user can access the
database.
Use DBChange Plus at a later time.
ACTION
||||||||||||||||||||||||||||||
|||||||||128
MESSAGE
Security violation (DBC 128).
MEANING
The database cannot be opened due to
MPE le system security.
Verify that you have access to the
database.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-24
DBChange Plus Messages
129
MESSAGE
The new name is the same as the old
name (DBC 129).
MEANING
The name of the database has not been
changed.
Enter a dierent name when renaming
the database.
ACTION
||||||||||||||||||||||||||||||
|||||||||130
MESSAGE
This file already exists, please
specify a new name (DBC 130).
MEANING
A le already exists with the same
database name specied for the database
copy or rename.
Enter a dierent name.
ACTION
||||||||||||||||||||||||||||||
|||||||||131
MESSAGE
Password contains invalid
characters (DBC 131).
MEANING
Invalid characters appear in the
password.
Re-enter the password using only valid
characters. Passwords must be from
1 to 8 characters. Either uppercase
or lowercase characters are allowed.
Passwords cannot contain blanks,
carriage returns, slashes (/ or n), or
semicolons (;).
ACTION
||||||||||||||||||||||||||||||
|||||||||132
MESSAGE
The password does not exist (DBC
132).
MEANING
The specied password does not exist in
the database.
Enter an existing password.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-25
133
MESSAGE
Sort item is the same as the search
item (DBC 133).
MEANING
The sort item specied is the same data
item as the search item that denes the
path.
Enter a sort item that is dierent from
the search item.
ACTION
||||||||||||||||||||||||||||||
|||||||||134
MESSAGE
Capacity/block factor should not
exceed 8388607 (DBC 134).
MEANING
The maximum size of the data set was
exceeded. This is a TurboIMAGE/XL
limitation.
Reduce the capacity or increase the
blocking factor.
ACTION
||||||||||||||||||||||||||||||
|||||||||140
MESSAGE
PASCAL `Range' error detected (DBA
140).
MEANING
While converting a data item to a new
type, a value in the original data set was
either too large or too small for the new
type specied for the data item. The
data was truncated.
The values in the original data set
should be examined before converting
a data item type to a smaller subitem
length.
ACTION
||||||||||||||||||||||||||||||
|||||||||200
MESSAGE
Set capacity must be between 1 and
2147483647 (DBC 200).
MEANING
The capacity of the data set was not
between 1 and 231 -1 (2,147,483,647).
Enter a capacity within these limits. If
the set is a master data set, the capacity
should be a prime number.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-26
DBChange Plus Messages
201
MESSAGE
Block factor must be between 0 and
255 (DBC 201).
MEANING
The blocking factor of the data set was
not between 0 and 255 inclusive. If the
blocking factor is zero, DBSCHEMA
calculates the most optimal blocking
factor for the set and then reblocks it.
Enter a blocking factor within these
limits.
ACTION
||||||||||||||||||||||||||||||
|||||||||202
MESSAGE
Invalid device class name (DBC 202).
MEANING
The device class name entered does not
follow standard naming conventions for a
device class. A logical device number is
not a valid device class name.
Enter a valid device class name.
ACTION
||||||||||||||||||||||||||||||
|||||||||203
MESSAGE
Sub-item count must be between 1 and
255 (DBC 203).
MEANING
The subitem count of the data item was
not between 1 and 255, inclusive.
Enter a subitem count within these
limits.
ACTION
||||||||||||||||||||||||||||||
|||||||||204
MESSAGE
Type must be I, J, K, P, R, U, X, or Z
(DBC 204).
MEANING
A data item type was entered that was
not I, J, K, P, R, U, X,
or Z.
Enter a valid data item type. Refer to
the TurboIMAGE/XL DBMS Reference
Manual for a list of types accepted by
TurboIMAGE/XL.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-27
205
MESSAGE
Sub-item length must be between 1
and 255 (DBC 205).
MEANING
The subitem length was not between 1
and 255, inclusive.
Enter a subitem length within these
limits.
ACTION
||||||||||||||||||||||||||||||
|||||||||206
MESSAGE
Set type must be A, M, or D (DBC
206).
MEANING
A data set type was entered that was
not A for automatic master data set, M
for manual master data set, or D for
detail data set.
Enter a valid data set type.
ACTION
||||||||||||||||||||||||||||||
|||||||||207
MESSAGE
User class must be between 1 and 63
(DBC 207).
MEANING
A user class was entered that was not
between 1 and 63, inclusive.
Enter a user class within these limits.
ACTION
||||||||||||||||||||||||||||||
|||||||||220
MESSAGE
Database has been modified since
last DBSTORE (DBA 220).
MEANING
The DBAPLUS program was run on a
database that has had modications (i.e.
adds, updates, deletes) since the last
time it was stored with DBSTORE.
Make a new backup copy of the database
using DBSTORE.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-28
DBChange Plus Messages
226
MESSAGE
Fatal error checking root file
(Internal Error n ) (DBA 226).
MEANING
Damage has occurred to the root
le which prohibits le checks from
completing.
Restore a backup copy of the root le
making sure it matches the structure of
the current database and recheck the
root le.
ACTION
||||||||||||||||||||||||||||||
|||||||||230
MESSAGE
Invalid change file structure (DBA
230).
MEANING
The change le contains inconsistent
data item and data set information.
Given the item or set number, the
corresponding item or set name could
not be found in the change le.
Run the DBCPLUS program again, and
create a new change le. If the database
is corrupt, purge the database and
restore it from a backup copy.
ACTION
||||||||||||||||||||||||||||||
|||||||||240
MESSAGE
Change file version n not match
DBAlter version n (DBA 240).
MEANING
The change le was created on a
dierent version of DBChange Plus than
is currently being run.
ACTION
Verify that the version of the DBAPLUS
program (DBAlter) is the correct one
for your system. Run the DBCPLUS
program again, and create a new change
le.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-29
250
MESSAGE
Cannot close database DatabaseName
(IMAGERR n ) (DBA 250).
MEANING
The TurboIMAGE/XL intrinsic
DBCLOSE failed while trying to close
the database DatabaseName .
Refer to the TurboIMAGE/XL DBMS
Reference Manual , where IMAGERR
n is the error number returned in the
status array. If the error was caused
by a le system error, message 410 is
printed instead.
ACTION
||||||||||||||||||||||||||||||
|||||||||252
MESSAGE
Cannot close the check file FileName
(FSERR n ) (DBA 252).
MEANING
The le FileName cannot be closed and
saved as a permanent le.
ACTION
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
||||||||||||||||||||||||||||||
|||||||||255
MESSAGE
Cannot close or purge the change
file (DBA 255).
MEANING
You do not have the le system write
capability to close or purge the change
le.
Modify the le system access capability
where the change le resides. Then
purge the change le by running the
DBCPLUS program with the PURGECF
option in the BASE command.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-30
DBChange Plus Messages
260
MESSAGE
Cannot close the root file (DBA
260).
MEANING
The MPE intrinsic FCLOSE failed while
closing the root le.
Refer to the MPE Intrinsics Reference
Manual where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||270
MESSAGE
Cannot close the data set
DataSetName (DBA 270).
MEANING
An error occurred while closing the data
set DataSetName . The MPE intrinsic
FCLOSE failed. In addition to 270,
message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||280
MESSAGE
Restructuring has not been
completed due to fatal error (DBA
280).
MEANING
A fatal error occurred during a critical
stage of restructuring the database.
If the database was modied, restore a
backup copy of the database from the
DBSTORE tape and try to restructure
it again. If the error occurs again, notify
the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||290
MESSAGE
Copying has not been completed due
to a fatal error (DBA 290).
MEANING
A fatal error occurred while copying the
database.
Try to copy the database again. If the
error occurs again, notify the system
manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||DBChange Plus Messages
A-31
310
MESSAGE
Cannot create the new root file (DBA
310).
MEANING
The new database schema contains
errors that caused DBSCHEMA to fail.
Check the new schema for errors. Run
the DBCPLUS program again with the
same change le and correct the errors.
ACTION
||||||||||||||||||||||||||||||
|||||||||320
MESSAGE
Cannot create the data set
DataSetName (DBA 320).
MEANING
One of the following MPE intrinsics
failed while creating the data
set DataSetName : FOPEN,
FCLOSE, FWRITE, FWRITEDIR,
FWRITELABEL. In addition to 320,
message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||330
MESSAGE
Cannot create the hashing database
TEMPDB (DBA 330).
MEANING
The MPE intrinsic FOPEN failed
while creating the temporary database
TEMPDB used in the conversion
process. In addition to 330, message 410
is also displayed.
Refer to the MPE Intrinsics Reference
Manual where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-32
DBChange Plus Messages
340
MESSAGE
Database has been corrupted (DBA
340).
MEANING
The database is in an inconsistent state
due to a fatal error encountered during
the restructuring process.
Restore a backup copy of the database
from the DBSTORE tape, and try the
changes again. If the error occurs again,
notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||345
MESSAGE
Set DataSetName using block factor
n exceeds blockmax m (DBA 345).
MEANING
The blocking factor n for data set
DataSetName is more than the specied
maximum block size (blockmax) of m .
ACTION
Change either the block factor or the
maximum block size.
||||||||||||||||||||||||||||||
|||||||||350
MESSAGE
Set DataSetName block size n
exceeds 2560 words (DBA 350).
MEANING
ACTION
The block size n of the data set
DataSetName exceeds 2560 words.
Run the DBCPLUS program again and
change the blocking factor.
||||||||||||||||||||||||||||||
|||||||||355
MESSAGE
Set DataSetName entry length n
exceeds 2047 words (DBA 355).
MEANING
ACTION
The entry length of the data set
DataSetName exceeds 2047 words.
Delete some elds from the data set.
||||||||||||||||||||||||||||||
|||||||||360
MESSAGE
Cannot enable library traps (DBA
360).
MEANING
The MPE intrinsic XLIBTRAP failed.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||DBChange Plus Messages
A-33
365
MESSAGE
CHECK/FIX event file damaged at
record n (DBA 365).
MEANING
The le DatabaseName RX does
not meet DBChange Plus internal
verication requirements.
Store the database and contact your HP
representative.
ACTION
||||||||||||||||||||||||||||||
|||||||||366
MESSAGE
CHECK/FIX event file misordered at
record n (DBA 366).
MEANING
The le DatabaseName RX does
not meet DBChange Plus internal
verication requirements.
Store the database and contact your HP
representative.
ACTION
||||||||||||||||||||||||||||||
|||||||||370
MESSAGE
Root condition is value (DBA 370).
MEANING
Each value of the condition word is
listed below with a meaning and action
for each.
JB
MEANING
ACTION
The database has not been created; only
the root le exists.
Run DBUTIL to nish creating the
database.
RM
MEANING
ACTION
A system failure occurred while output
deferred was enabled.
Follow the recovery procedures outlined
in the TurboIMAGE/XL DBMS
Reference Manual .
||||||||||||||||||||||||||||||
|||||||||A-34
DBChange Plus Messages
DBChange Plus
Messages
(continued)
||||||||||||||||||||||||||||||
|||||||||370
MESSAGE
Root condition is value (DBA 370).
MEANING
Each value of the condition word is
listed below with a meaning and action
for each.
ME
MEANING
ACTION
DBUTIL was interrupted while creating
the database.
Purge the database and re-create it.
MC
MEANING
ACTION
DBUTIL was interrupted while erasing
the database.
Purge the database and restore a backup
copy.
IL
MEANING
ACTION
Intrinsic Level Recovery (ILR) was
interrupted and did not complete.
Run QUERY and open the database.
DBOPEN will invoke ILR.
IE
MEANING
ACTION
DBUTIL was interrupted while the
database was being enabled for Intrinsic
Level Recovery (ILR).
Run DBUTIL to nish enabling the
database for ILR.
DBChange Plus Messages
A-35
ID
MEANING
ACTION
DBUTIL was interrupted while the
database was being disabled for Intrinsic
Level Recovery (ILR).
Run DBUTIL to nish disabling the
database for ILR.
CN
MEANING
ACTION
The database is being converted from an
IMAGE database to a TurboIMAGE/XL
database. The database conversion
process cannot be continued .
Purge the database and restore a backup
copy. Run DBCONV again.
CA
MEANING
ACTION
The database is being converted from an
IMAGE database to a TurboIMAGE/XL
database. The database conversion
process can be continued .
Run DBCONV to nish converting the
database to TurboIMAGE/XL.
MV
MEANING
ACTION
A-36
DBChange Plus Messages
DBUTIL was interrupted while a data
set was being moved to a dierent logical
device.
Purge the database and restore a backup
copy.
380
MESSAGE
DBCHGF file equate can only contain
actual file designator (DBA 380).
MEANING
The le equation for DBCHGF contains
options which are not allowed. Only the
actual le name can be specied.
Reenter the le equation and run the
DBAPLUS program again.
ACTION
||||||||||||||||||||||||||||||
|||||||||390
MESSAGE
FFILEINFO failed on data set
DataSetName (DBA 390).
MEANING
The MPE intrinsic FFILEINFO failed
when issued against the data set
DataSetName . In addition to 390,
message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||400
MESSAGE
Internal error: file FileName is not
open (DBA 400).
MEANING
ACTION
The DBAPLUS program expected the
le FileName to be open and it is not.
Notify the system manager.
||||||||||||||||||||||||||||||
|||||||||410
MESSAGE
File system error n (DBA 410).
MEANING
An MPE le system intrinsic did not
complete.
ACTION
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-37
413
MESSAGE
Damage requires manual intervention
(DBA 413).
MEANING
Database damage exists that cannot be
repaired by DBChange Plus. In addition
to 413, one of the following messages is
also displayed:
Capacity and blocking factor
recorded in root file are
inconsistent.
Data set media length recorded in
the root file is inconsistent.
Root file inconsistency detected
by DBChange (CHK 220).
ACTION
Depending on the message displayed,
take the following action:
If root le damage exists, restore a
valid copy of the root le from the
last database backup, then issue the
CHECK command. Note that a
restructure must not have occurred
since the last backup.
If MPE le characteristics do not
match root le specications, the
root le and the aected data sets
can be resynchronized. Before
resynchronizing, be sure to store the
database. After resynchronizing, issue
the CHECK BASE command, then
review the data in the database.
||||||||||||||||||||||||||||||
|||||||||415
MESSAGE
Cannot allocate n bytes of heap
space (DBA 415).
MEANING
ACTION
Native mode heap is not large enough
to accommodate DBChange Plus space
requirements.
Copy the terminal screen and notify the
system manager.
||||||||||||||||||||||||||||||
|||||||||-
A-38
DBChange Plus Messages
416
MESSAGE
Cannot return n bytes of heap space
(DBA 416).
MEANING
An internal error occurred while
deallocating memory.
Copy the terminal screen and notify the
system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||420
MESSAGE
TurboIMAGE error n (DBA 420).
MEANING
The TurboIMAGE/XL intrinsic
DBCONTROL or DBPUT failed.
ACTION
Refer to the TurboIMAGE/XL DBMS
Reference Manual , where n is the error
number returned in the status array.
||||||||||||||||||||||||||||||
|||||||||430
MESSAGE
Invalid data item number found in
the change file (DBA 430).
MEANING
An invalid data item number was found
in the change le. The change le is
corrupt.
Run the DBCPLUS program again, and
create a new change le. If the database
is corrupt, purge it and restore a backup
copy.
ACTION
||||||||||||||||||||||||||||||
|||||||||440
MESSAGE
Invalid data set number found in
change file (DBA 440).
MEANING
An invalid data set number was found
in the change le. The change le is
corrupt.
Run the DBCPLUS program again, and
create a new change le. If the database
is corrupt, purge it and restore a backup
copy.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-39
450
MESSAGE
Data item ItemNumber does not exist
in the change file (DBA 450).
MEANING
The change le contains inconsistent
data item information. The data item
number ItemNumber was not found in
the change le.
Run the DBCPLUS program again, and
create a new change le. If the database
is corrupt, purge it and restore a backup
copy.
ACTION
||||||||||||||||||||||||||||||
|||||||||460
MESSAGE
Cannot get extra data segment needed
for copy/restructure (DBA 460).
MEANING
An extra data segment is used when
copying a database and for certain
restructuring functions. The system
could not allocate one for the DBAPLUS
program.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||480
MESSAGE
Cannot obtain buffers for database
DatabaseName (DBA 480).
MEANING
The minimum number of buers
necessary to perform the restructure
could not be obtained.
Refer to message 420.
ACTION
||||||||||||||||||||||||||||||
|||||||||490
MESSAGE
Cannot enable output deferred for
database DatabaseName (DBA 490).
MEANING
The TurboIMAGE/XL intrinsic
DBCONTROL failed to enable output
deferred for the database DatabaseName .
Refer to the TurboIMAGE/XL DBMS
Reference Manual , where n is the error
number returned in the status array.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-40
DBChange Plus Messages
499
MESSAGE
Native Language Support subsystem
error n (DBA 499).
MEANING
Native Language Support is not
functioning.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||500
MESSAGE
Cannot create schema file FileName
(DBA 500).
MEANING
ACTION
The MPE intrinsic FOPEN or FCLOSE
failed while opening or closing the
schema le. In addition to 500, message
410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
||||||||||||||||||||||||||||||
|||||||||500
MESSAGE
Cannot open input file DBCIN
(FSERR n ) (DBC 500).
MEANING
The MPE intrinsic FOPEN or
HPFEQINFO failed while opening the
input le or the DBCIN equate le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from
the FCHECK intrinsic. Verify that the
input le exists, and that the le name is
correct. Rerun the DBCPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-41
501
MESSAGE
Detail set DataSetName still has n
entries (DBA 501).
MEANING
The ERASE SET command was issued
for a manual master data set that has
one or more paths linked to detail data
sets. Related detail data set entries still
exist.
Manual master data set entries cannot
be erased until all related detail data set
entries are erased. Issue the ERASE
SET command for each related detail
data set before issuing the ERASE SET
command for the manual master data
set.
ACTION
||||||||||||||||||||||||||||||
|||||||||501
MESSAGE
Cannot open output file DBCOUT
(FSERR n ) (DBC 501).
MEANING
The MPE intrinsic FOPEN or
HPFEQINFO failed while opening the
output le or the DBCOUT equate le.
Refer to the MPE Intrinsics Reference
Manual , where n FSERR n is the le
system error number returned from
the FCHECK intrinsic. Verify that
the output le exists, and that the le
name is correct. Rerun the DBCPLUS
program.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-42
DBChange Plus Messages
502
MESSAGE
Cannot erase manual set DataSetName
due to detail entries (DBA 502).
MEANING
The ERASE SET command was issued
for a manual master data set that has
one or more paths linked to detail data
sets. Related detail data set entries still
exist.
Manual master data set entries cannot
be erased until all related detail data set
entries are erased. Issue the ERASE
SET command for each related detail
data set before issuing the ERASE SET
command for the manual master data
set.
ACTION
||||||||||||||||||||||||||||||
|||||||||502
MESSAGE
Cannot write to the command output
file (FSERR n ) (DBC 502).
MEANING
The MPE intrinsic FWRITE failed
while writing to the output le or the
DBCOUT le equate.
Refer to the MPE Intrinsics Reference
Manual , where FSERR # is the le
system error number returned from
the FCHECK intrinsic. Verify that the
output le, as specied, exists, and
that the lename is correct. Rerun the
DBCPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||503
MESSAGE
Cannot allocate internal buffers
for processing master set (DBA 503).
MEANING
The DBAPLUS program allocates up to
four internal buers to process erased
entries on a master data set. This
message is displayed if four buers are
not enough to process the erased entries.
Notify your Hewlett-Packard
representative.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-43
503
MESSAGE
LP or TERM must be used for OUTPUT
command (DBC 503).
MEANING
A parameter other than LP or TERM
was specied for the OUTPUT
command.
Enter either OUTPUT LP or OUTPUT
TERM.
ACTION
||||||||||||||||||||||||||||||
|||||||||504
MESSAGE
Path search item is invalid, cannot
REPACK SET DataSetName (DBA 504).
MEANING
An incorrect search item name
was specied in the REPACK SET
command. The path may have been
deleted after the REPACK SET
command was used.
Specify the correct path to be repacked.
ACTION
||||||||||||||||||||||||||||||
|||||||||504
MESSAGE
Read input error (DBC 504).
MEANING
An error occurred while reading the
input from the terminal, the DBCIN le
equate, or the XEQ le.
Verify that the input is correctly
entered, and that the terminal, DBCIN
le, or XEQ le is in ASCII format.
ACTION
||||||||||||||||||||||||||||||
|||||||||505
MESSAGE
Cannot use a newly added path to
REPACK SET DataSetName (DBA 505).
MEANING
A new path was added to the data set
and then specied as the path for the
REPACK SET command. No chain
information exists for the new path, so
the data set cannot be repacked.
Specify the correct path to be repacked
with the REPACK SET command.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-44
DBChange Plus Messages
505
MESSAGE
Command exceeds 3 lines or 216
characters (DBC 505).
MEANING
Too many lines or characters were used
when entering a command.
Reenter the command using fewer than 3
lines or 216 characters.
ACTION
||||||||||||||||||||||||||||||
|||||||||506
MESSAGE
Cannot HPFOPEN internal map file for
set DataSetName (HPFERR n ) (DBA
506).
MEANING
The MPE intrinsic HPFOPEN failed
while opening an internal le.
Refer to the MPE Intrinsics Reference
Manual , where HPFERR n is the error
number returned from the HPFOPEN
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||506
MESSAGE
EXIT command not entered. End of
file reached. EXIT assumed (DBC
506).
MEANING
No EXIT command was entered in a
batch job or within an XEQ le.
If EXIT is desired, no action necessary;
otherwise, enter the desired DBCPLUS
commands, and run the DBCPLUS
program again.
ACTION
||||||||||||||||||||||||||||||
|||||||||507
MESSAGE
Message catalog read error (DBC
507).
MEANING
An error occurred while reading a
command from the DBChange Plus
message catalog DBCMSGC.
Verify that the correct DMCMSGC
message catalog is installed.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-45
508
MESSAGE
Invalid command (DBC 508).
MEANING
An incorrect command was entered.
Enter a valid command or use the
correct command abbreviation. Use
HELP to nd the correct command.
ACTION
||||||||||||||||||||||||||||||
|||||||||509
MESSAGE
Command valid only in session mode
(DBC 509).
MEANING
A command that is valid only during a
session (interactive) mode was entered in
a job stream le.
Delete this command from the job
stream le.
ACTION
||||||||||||||||||||||||||||||
|||||||||510
MESSAGE
Cannot open database DatabaseName
(IMAGERR n ) (DBA 510).
MEANING
The TurboIMAGE/XL intrinsic
DBOPEN failed while trying to open the
database DatabaseName .
ACTION
Refer to the TurboIMAGE/XL DBMS
Reference Manual , where IMAGERR
n is the error number returned in the
status array. If the error was caused
by a le system error, message 410 is
printed instead.
||||||||||||||||||||||||||||||
|||||||||510
MESSAGE
Incorrect command parameter or
missing parameter (DBC 510).
MEANING
A parameter was entered incorrectly for
the command, or a required parameter is
missing.
Check the syntax of the command
entered, and reenter the command using
the correct parameter. Use HELP to
verify the command syntax.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-46
DBChange Plus Messages
511
MESSAGE
Correct BASE command is required
before continuing (DBC 511).
MEANING
The BASE command was not entered
before processing the database. The only
commands that can be issued before the
BASE command are HELP, OUTPUT,
REDO, and XEQ. The BASE command
is required after issuing the PERFORM
COMMANDS command.
Enter the appropriate BASE command.
ACTION
||||||||||||||||||||||||||||||
|||||||||512
MESSAGE
Fatal error occurred. DBChange
cannot continue (DBC 512).
MEANING
This message prints immediately after
message 506 or fatal error messages.
Correct the error(s) indicated by the
messages.
ACTION
||||||||||||||||||||||||||||||
|||||||||513
MESSAGE
Old change file does not exist (DBC
513).
MEANING
In the BASE command, either OLD
was entered, or it tried to default to an
existing old change le. No old change
le exists for the database.
Correct the BASE command by
specifying NEW, then rerun the
DBCPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-47
514
MESSAGE
Old change file cannot be renamed to
be saved (FSERR n ) (DBC 514).
MEANING
The MPE intrinsic FCLOSE failed while
trying to save the old change le with
a name other than FileName CO or
FileName CF.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from
the FCHECK intrinsic. Verify that
there is sucient disk space to save the
change le and that no other CO or CF
change le exists. Rerun the DBCPLUS
program.
ACTION
||||||||||||||||||||||||||||||
|||||||||515
MESSAGE
PERFORM COMMANDS parmvalue required
in batch and jobfile (DBC 515).
MEANING
A value was not entered in the batch
job or in session mode when the JOB
parameter was specied.
Use a parameter value between 1 and
15 for the PERFORM COMMANDS
command.
ACTION
||||||||||||||||||||||||||||||
|||||||||516
MESSAGE
Parm value must be between 1 and 15
(DBC 516).
MEANING
An incorrect value was entered for the
PERFORM COMMANDS command.
Enter a parameter value between 1 and
15 for the PERFORM COMMANDS
command.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-48
DBChange Plus Messages
517
MESSAGE
Cannot PERFORM COMMANDS due to
errors (DBC 517).
MEANING
Errors were detected in the DBCPLUS
run for the database. The PERFORM
COMMANDS command cannot be
executed.
Correct the errors, then run the
PERFORM COMMANDS command.
ACTION
||||||||||||||||||||||||||||||
|||||||||518
MESSAGE
Use CHANGE PRIMARYPATH or DELETE
PATH then ADD PATH (DBC 518).
MEANING
CHANGE PATH command was entered.
No CHANGE PATH command exists.
Use other suggested commands.
ACTION
||||||||||||||||||||||||||||||
|||||||||520
MESSAGE
Cannot open the change file FileName
(DBA 520).
MEANING
ACTION
The MPE intrinsic FOPEN failed when
opening the change le. In addition to
520, message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
||||||||||||||||||||||||||||||
|||||||||520
MESSAGE
Use CHANGE BLOCKFACTOR, CHANGE
BLOCKMAX, CHANGE CAPACITY, CHANGE
DEVICECLASS, CHANGE SETSECURITY or
REORDER SET (DBC 520).
MEANING
An invalid command was entered. No
CHANGE SET command exists.
Use other suggested commands.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-49
521
MESSAGE
No recover command for field,
password, path or sort (DBC 521).
MEANING
No RECOVER command exists for
the command keywords FIELD,
PASSWORD, PATH, and SORT.
Use the ADD command to re-add elds,
passwords, paths, or sort items after
they have been deleted.
ACTION
||||||||||||||||||||||||||||||
|||||||||522
MESSAGE
Invalid XEQ file name (DBC 522).
MEANING
An incorrect XEQ le name was entered.
Enter the correct XEQ le name.
ACTION
||||||||||||||||||||||||||||||
|||||||||523
MESSAGE
Cannot open the XEQ file (FSERR n )
(DBC 523).
MEANING
ACTION
The MPE intrinsic FOPEN failed while
opening the XEQ le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic. Check that the XEQ
le name is correct and that the le
exists in the logon group and account.
||||||||||||||||||||||||||||||
|||||||||524
MESSAGE
XEQ file must be in ASCII format (DBC
524).
MEANING
The XEQ le is not in ASCII format.
Enter a correct ASCII le for the XEQ
le.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-50
DBChange Plus Messages
525
MESSAGE
File system error n opening file
FileName (DBA 525).
MEANING
The MPE intrinsic FOPEN failed while
opening the le FileName .
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||525
MESSAGE
Another XEQ file is already opened.
Nested XEQ file not allowed (DBC
525).
MEANING
A second XEQ command was issued.
Only one XEQ le can be processed at a
time.
Remove the second XEQ command.
ACTION
||||||||||||||||||||||||||||||
|||||||||526
MESSAGE
CONTROL Y internal error (DBC 526).
MEANING
An error occurred while issuing
CONTROL Y in the DBCPLUS
program.
Check your terminal conguration or
that of the MPE operating system.
ACTION
||||||||||||||||||||||||||||||
|||||||||529
MESSAGE
Security access code must be `R',
`W' or `N' (DBC 529).
MEANING
The access code entered is not R, W, or
N.
Enter R for read, W for write, or N for
no access.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-51
530
MESSAGE
Cannot open the root file (DBA 530).
MEANING
The MPE intrinsic FOPEN failed while
opening the root le. In addition of 530,
message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||530
MESSAGE
Blockmax must be between 128 and
2048 (DBC 530).
MEANING
The maximum block size entered is not
between 128 and 2048.
Enter a maximum block size between
128 and 2048.
ACTION
||||||||||||||||||||||||||||||
|||||||||531
MESSAGE
Set range must be in ascending
schema order (DBC 531).
MEANING
The set range entered for CHANGE
BLOCKMAX is not in ascending schema
order.
Verify the order of the data sets by using
the REVIEW SET command. Specify
the correct ascending data set range in
the CHANGE BLOCKMAX command.
ACTION
||||||||||||||||||||||||||||||
|||||||||532
MESSAGE
For set DataSetName using block
factor n exceeds blockmax m (DBC
532).
MEANING
ACTION
The blocking factor n exceeds the
specied blockmax m for the data set
DataSetName .
Either decrease the blocking factor or
increase the maximum block size for the
data set.
||||||||||||||||||||||||||||||
|||||||||-
A-52
DBChange Plus Messages
533
MESSAGE
For set DataSetName the block size n
exceeds 2560 words (DBC 533).
MEANING
The blocking factor for the data set
DataSetName is too large causing the
block size to exceed 2560 words.
Decrease the block factor for the data
set.
ACTION
||||||||||||||||||||||||||||||
|||||||||534
MESSAGE
For set DataSetName entry length n
exceeds 2047 words. (DBC 534).
MEANING
ACTION
The entry length for the data set
DataSetName contains too many items
or items that are too long for the set
causing the entry length to exceed 2047
words.
Check the items in the data set using
the REVIEW ITEMS command. Either
delete some items from the data set or
decrease the length of some data items.
||||||||||||||||||||||||||||||
|||||||||535
MESSAGE
Cannot open the root file for
exclusive access (DBA 535).
MEANING
The MPE intrinsic FOPEN failed. In
addition to 535, message 410 is also
displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||535
MESSAGE
Item name is required for this
command (DBC 535).
MEANING
The data item name is required but was
not entered.
Use HELP to check the command
syntax, and enter the data item name.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-53
536
MESSAGE
Set name is required for this
command (DBC 536).
MEANING
The data set name is required but was
not entered.
Use HELP to check the command
syntax, and enter the data set name.
ACTION
||||||||||||||||||||||||||||||
|||||||||537
MESSAGE
A value must be entered for a
required parameter (DBC 537).
MEANING
A required value is missing from the
command.
Use HELP to check the command
syntax, and enter the correct command.
ACTION
||||||||||||||||||||||||||||||
|||||||||538
MESSAGE
Error occurred when issuing the MPE
command (CIERR n ) (DBC 538).
MEANING
An invalid MPE command was entered
after the colon (:).
Refer to the MPE Intrinsics Reference
Manual , where CIERR n is the
error number returned from the
HPCICOMMAND intrinsic. Correct the
problem and enter a valid command.
ACTION
||||||||||||||||||||||||||||||
|||||||||539
MESSAGE
DBCIN file equate error in HPFEQINFO
(HPQERR n ) (DBC 539).
MEANING
The DBCIN le specied in the
le equation is not a valid existing
permanent le.
Enter a correct command le for the
DBCIN equation.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-54
DBChange Plus Messages
540
MESSAGE
Cannot open the data set
DataSetName (DBA 540).
MEANING
The MPE intrinsic FOPEN failed to
open the data set. In addition to 540,
message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||540
MESSAGE
DBCOUT file equate error in
HPFEQINFO (HPQERR n ) (DBC 540).
MEANING
The DBCOUT le specied in the le
equation is not $STDLIST, a temporary
disk le, a permanent disk le, or a print
le.
Enter a correct DBCOUT le equation.
ACTION
||||||||||||||||||||||||||||||
|||||||||541
MESSAGE
Password cannot exceed 8 characters
(DBC 541).
MEANING
More than eight characters were entered
for a password.
Enter up to eight characters for a
password.
ACTION
||||||||||||||||||||||||||||||
|||||||||542
MESSAGE
MaxFull or NewFull percent must be 1
to 100 (DBC 542).
MEANING
An incorrect percent number was
entered for the MaxFull or NewFull
parameter in the CONTROL command.
Enter a number between 1 and 100
inclusive for MaxFull or NewFull
percent.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-55
544
MESSAGE
Cannot open data set file FileName
(FSERR n ) (DBC544).
MEANING
The MPE intrinsic FOPEN failed while
opening the data set le FileName .
Refer to the MPE Intrinsics Reference
Manual , where FSERRn is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||545
MESSAGE
File system error 46: out of disc
space (DBA 545).
MEANING
Not enough disk space is available to
create a temporary le, most likely a
data set le, needed for the restructure.
Obtain more disk space, and rerun the
DBAPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||545
MESSAGE
Cannot read file label of data set
file FileName (FSERR n ) (DBC 545).
MEANING
The MPE intrinsic FREADLABEL
failed while attempting to read the le
label for the data set le FileName .
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||546
MESSAGE
Cannot decrease capacity. Use
REPACK SET (DBC 546).
MEANING
The CHANGE CAPACITY command
was used to decrease the capacity of a
detail data set whose delete chain count
is greater than zero. The requested new
capacity is below the high-water mark.
Use the REPACK SET command
instead of the CHANGE CAPACITY
command.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-56
DBChange Plus Messages
547
MESSAGE
No fields defined for data set
DataSetName (DBC 547).
MEANING
A data set was added without any elds
added, or all elds in the data set were
deleted.
Add at least one eld to the data set or
delete the data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||548
MESSAGE
No paths defined for auto master set
DataSetName (DBC 548).
MEANING
An automatic master data set was added
without any paths dened.
Add at least one path for the automatic
master data set, or delete the data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus
Messages
(continued)
||||||||||||||||||||||||||||||
|||||||||549
MESSAGE
No key item defined for master set
DataSetName (DBC 549).
MEANING
A master data set was added without a
key item, or the key item was deleted.
Delete the data set; or delete the data
set, and then add the set with the key
item dened.
ACTION
||||||||||||||||||||||||||||||
|||||||||550
MESSAGE
Pascal error n (DBA 550).
MEANING
A Pascal library procedure did not
complete.
ACTION
Refer to the Pascal/3000 Reference
Manual , where n is the Pascal error
number.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-57
550
MESSAGE
Set DataSetName entry length n less
than 2 words (DBC 550).
MEANING
The detail data set DataSetName has
no paths and an entry length less than
two words (MPE/V words or MPE/XL
halfwords), which is not allowed by
DBSCHEMA.
Add more elds to the data set, or
increase the item length of the existing
elds.
ACTION
||||||||||||||||||||||||||||||
|||||||||551
MESSAGE
Cannot CHECK/FIX this new set until
added by DBAlter (DBC 551).
MEANING
The CHECK or FIX command cannot
be issued for a data set that is not
actually in the database, that is, not yet
processed by the DBAPLUS program
(DBAlter).
Run the DBAPLUS program to actually
add the data set, then use the CHECK
or FIX command.
ACTION
||||||||||||||||||||||||||||||
|||||||||552
MESSAGE
Invalid search item specified for
CHECK/FIX PATH (DBC 552).
MEANING
The item name entered as a search item
for the CHECK or FIX command is not
a valid search item.
Enter a correct search item name.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-58
DBChange Plus Messages
553
MESSAGE
Cannot erase automatic master data
set (DBC 553).
MEANING
The ERASE SET command was issued
for an automatic master data set. The
data in an automatic master data set
cannot be explicitly erased.
An automatic master data set entry is
erased once the detail data set entries
are erased. Use the ERASE SET
command to erase the related detail data
sets linked to the automatic master data
set.
ACTION
||||||||||||||||||||||||||||||
|||||||||554
MESSAGE
Detail set DataSetName still has n
entries (DBC 554).
MEANING
ACTION
The ERASE SET command was issued
for a manual master data set that has
one or more paths linked to detail data
sets where related detail data set entries
still exist.
Issue ERASE SET for each of the detail
data set entries with paths linked to
the manual master data set, then issue
ERASE SET for the manual master data
set.
||||||||||||||||||||||||||||||
|||||||||555
MESSAGE
Cannot read the change file (DBA
555).
MEANING
The MPE intrinsic FREAD or
FREADDIR failed while reading the
change le. In addition to 555, message
410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-59
555
MESSAGE
Cannot erase manual set with
existing related detail entries
(DBC 555).
MEANING
The ERASE SET command was issued
for a manual master data set that has
one or more paths linked to detail data
sets where related detail data entries still
exist.
Issue ERASE SET for each of the detail
data set entries with paths linked to
the manual master data set, then issue
ERASE SET for the manual master data
set.
ACTION
||||||||||||||||||||||||||||||
|||||||||556
MESSAGE
Cannot erase data set until added by
DBAlter (DBC 556).
MEANING
ERASE SET was issued for a data set
that was not yet actually added to the
database, that is, processed by the
DBAPLUS program (DBAlter).
Verify that the data set name is correct
and exists in the database.
ACTION
||||||||||||||||||||||||||||||
|||||||||557
MESSAGE
Cannot read the check file FileName
(FSERR n ) (DBA 557).
MEANING
The MPE intrinsic FREAD or
FREADDIR failed while rading the
check le.
ACTION
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system error number returned from the
FCHECK intrinsic.
||||||||||||||||||||||||||||||
|||||||||-
A-60
DBChange Plus Messages
557
MESSAGE
ERASE SET has already been issued
for the data set (DBC 557).
MEANING
ERASE SET was issued a second time
for the same data set.
Erase the data set entries and reissue the
ERASE SET command.
ACTION
||||||||||||||||||||||||||||||
|||||||||558
MESSAGE
Data set has not been set to erase.
Cannot CANCEL ERASE (DBC 558).
MEANING
CANCEL ERASE was issued for a data
set that was not agged to be erased by
ERASE SET.
No action necessary if you do not intend
to erase the data set entries.
ACTION
||||||||||||||||||||||||||||||
|||||||||559
MESSAGE
CTL_ERASE_SETS less than zero.
Cannot CANCEL ERASE (DBC 559).
MEANING
CANCEL ERASE was issued for a data
set. CTL ERASE SETS eld in the
change le control record, which reects
the number of data set entries to be
erased, has a number less than zero.
Verify that the change le has been
correctly restored from a previous
DBCPLUS run. If not, purge the change
le and rerun the DBCPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||560
MESSAGE
Cannot read the root file (DBA 560).
MEANING
The MPE intrinsic FREADDIR failed
while trying to read the root le. In
addition to 560, message 410 is also
displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-61
560
MESSAGE
Data set has not been set to repack.
Cannot CANCEL REPACK (DBC 560).
MEANING
CANCEL REPACK was issued for a
data set without issuing a previous
REPACK SET command.
No action necessary if you do not want
to repack the data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||561
MESSAGE
CTL_REPACK_SETS less than zero.
Cannot CANCEL REPACK (DBC 561).
MEANING
CANCEL REPACK was issued for a
data set. The CTL REPACK SETS
eld in the change le control record,
which reects the number of data sets
to be repacked, has a number less than
zero.
Verify that the change le has been
correctly restored from a previous
DBCPLUS run. If not, purge the change
le and rerun the DBCPLUS program.
ACTION
||||||||||||||||||||||||||||||
|||||||||562
MESSAGE
Cannot repack a master data set (DBC
562).
MEANING
REPACK SET was issued for a master
data set.
REPACK SET can only be issued for a
detail data set.
ACTION
||||||||||||||||||||||||||||||
|||||||||563
MESSAGE
Cannot repack data set until added
by DBAlter (DBC 563).
MEANING
REPACK SET was issued for a data
set that was not yet actually added to
the database, that is, processed by the
DBAPLUS program (DBAlter).
Verify that the data set name is correct
and exists in the database.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-62
DBChange Plus Messages
564
MESSAGE
REPACK SET has already been issued
for the data set (DBC 564).
MEANING
REPACK SET was issued a second time
for the same data set.
If the repack option is to be changed for
the data set, use CANCEL REPACK
then REPACK SET with the correct
repack option. Otherwise, no action is
necessary.
ACTION
||||||||||||||||||||||||||||||
|||||||||565
MESSAGE
REPACK SET option must be serial or
chained (DBC 565).
MEANING
REPACK SET was issued with the
incorrect repack option or the repack
option was incorrectly placed in the
command syntax.
Verify the syntax of the REPACK SET
command by using HELP. Use serial or
chained as the repack option.
ACTION
||||||||||||||||||||||||||||||
|||||||||566
MESSAGE
Invalid search item specified for
REPACK SET (DBC 566).
MEANING
An incorrect or misplaced search
item was used in the REPACK SET
command.
Verify that the correct search item
name was used. Verify the syntax of
the REPACK SET command by using
HELP.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-63
567
MESSAGE
Path search item is invalid, cannot
REPACK SET DataSetName (DBC 567).
MEANING
The path specied by the search item
used in the REPACK SET command
does not exist. The path may have
been deleted after the REPACK SET
command was used.
Verify that the path still exists by using
the REVIEW PATHS command. If
not, use the CANCEL REPACK and
REPACK SET commands for another
path.
ACTION
||||||||||||||||||||||||||||||
|||||||||568
MESSAGE
Cannot use a newly added path to
REPACK SET DataSetName (DBC 568).
MEANING
A new path was added to the data set
DataSetName , and the path is being
specied for a REPACK SET command
with the chained option. No chain
information exists for the new path, so it
cannot be used to repack the data set.
Use the CANCEL REPACK and
REPACK SET commands for another
path.
ACTION
||||||||||||||||||||||||||||||
|||||||||569
MESSAGE
Duplicate schema file. Cannot
process PRINT SCHEMA (DBC 569).
MEANING
A le with the same name already exists.
Use another unique le name, or purge
the existing le and run the DBCPLUS
program again with the PRINT
SCHEMA command.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-64
DBChange Plus Messages
570
MESSAGE
Cannot read the root file label (DBA
570).
MEANING
The MPE intrinsic FREADLABEL
failed while trying to read the le label
of the root le. In addition to 570,
message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||570
MESSAGE
Cannot close the schema file (FSERR
n ) (DBC 570).
MEANING
The MPE intrinsic FCLOSE failed while
closing the schema le.
Refer to the MPE Intrinsics Reference
Manual , where FSERR n is the le
system number returned from the
FCHECK intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||571
MESSAGE
LOGON to the account where
NewBaseName will reside (DBC 571).
MEANING
When copying a database, you must be
logged on to the account where the new
database copy will reside.
Logon to the correct account.
ACTION
||||||||||||||||||||||||||||||
|||||||||572
MESSAGE
SM or (OP and PM) capabilities
required to copy across accounts
(DBC 572).
MEANING
You do not have the required MPE
capabilities to copy a database across
accounts.
Acquire SM or (OP and PM)
capabilities.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-65
573
MESSAGE
AM capability or CREATOR access
required to copy within account
(DBC 573).
MEANING
You do not have the required MPE
capabilities to copy a database within an
account.
Acquire AM capability or CREATOR
access.
ACTION
||||||||||||||||||||||||||||||
|||||||||574
MESSAGE
SF (save file) capability required
to copy a database (DBC 574).
MEANING
You do not have the required MPE
capability to copy a database.
Acquire SF capability.
ACTION
||||||||||||||||||||||||||||||
|||||||||575
MESSAGE
AM capability or CREATOR access
required to replace a database
(DBC 575).
MEANING
You do not the required MPE capability
to replace a database.
Acquire AM capability or CREATOR
access.
ACTION
||||||||||||||||||||||||||||||
|||||||||576
MESSAGE
Percentfull must be 0 < MinFull <
NewFull < MaxFull < 100 (DBC 576).
MEANING
The values entered for the CONTROL
PERCENTFULL command are
incorrect.
Re-enter the CONTROL
PERCENTFULL parameter values.
MinFull must be 0 to 100; NewFull and
MaxFull must be 1 to 100; MaxFull must
be greater than NewFull ; and NewFull
must be greater than MinFull .
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-66
DBChange Plus Messages
577
MESSAGE
Data set DataSetName has capacity
less than one (DBC 577).
MEANING
The capacity for the data set
DataSetName in the current database
is less than one. CONTROL
PERCENTFULL cannot be calculated
for the set.
Change the capacity using the CHANGE
CAPACITY command.
ACTION
||||||||||||||||||||||||||||||
|||||||||578
MESSAGE
Cannot calculate PERCENTFULL for a
new data set (DBC 578).
MEANING
The data set specied in the CONTROL
PERCENTFULL command is not yet
added to the database.
Either specify a data set that already
exists, or add the specied data set
by running the DBAPLUS program,
and then entering the CONTROL
PERCENTFULL command again.
ACTION
||||||||||||||||||||||||||||||
|||||||||579
MESSAGE
MinFull percent must be 0 to 100 (DBC
579).
MEANING
The MinFull parameter was
incorrectly entered in the CONTROL
PERCENTFULL command.
Re-enter the MinFull parameter using a
value of 0 to 100.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-67
580
MESSAGE
Cannot read the data set
DataSetName (DBA 580).
MEANING
The MPE intrinsic FREADDIR failed
while reading the data set DataSetName .
In addition to 580, message 410 is also
displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||580
MESSAGE
NewBaseName already exists and
REPLACE not requested (DBC 580).
MEANING
ACTION
Unless the REPLACE parameter is used
with the COPY command, an existing
database cannot be overwritten.
Either give the database copy a new
name, or use the REPLACE parameter.
||||||||||||||||||||||||||||||
|||||||||590
MESSAGE
Cannot read the file label of data
set DataSetName (DBA 590).
MEANING
The MPE intrinsic FREADLABEL
failed while reading the le label of data
set DataSetName . In addition to 590,
message 410 is also displayed.
Refer to message 410.
ACTION
||||||||||||||||||||||||||||||
|||||||||600
MESSAGE
Cannot rename set DataSetName1 to
DataSetName2 (DBA 600).
MEANING
The MPE intrinsic FRENAME
failed while renaming the data
set DataSetName1 to the name
DataSetName2 . In addition to 600,
message 410 is also displayed.
ACTION
Refer to message 410.
||||||||||||||||||||||||||||||
|||||||||-
A-68
DBChange Plus Messages
601
MESSAGE
Invalid characters after delete (D)
command (DBC 601).
MEANING
An invalid character or too many
characters were entered when using the
REDO command with the delete option.
Only D or I (for insert) is allowed after
the rst D in the REDO command.
Redo the command line.
ACTION
||||||||||||||||||||||||||||||
|||||||||602
MESSAGE
More than 80 characters on the line
(DBC 602).
MEANING
Too many characters were inserted when
using the REDO command.
Only 80 characters are allowed on a
command line. Redo the command line
using 80 or fewer characters.
ACTION
||||||||||||||||||||||||||||||
|||||||||603
MESSAGE
New command exceeds maximum 216
characters allowed (DBC 603).
MEANING
Too many characters were inserted when
using the REDO command.
Only 216 characters per command are
allowed. Redo the command using 216
or fewer characters.
ACTION
||||||||||||||||||||||||||||||
|||||||||610
MESSAGE
Cannot rename set DataSetName1 to
TEMPDB DataSetName2 (DBA 610).
MEANING
The MPE intrinsic FRENAME
failed while renaming the data set
DataSetName1 to DataSetName2 in
the database TEMPDB used in the
conversion process. In addition to 610,
message 410 is also displayed.
ACTION
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-69
615
MESSAGE
Cannot reset condition word or root
file label (DBA 615).
MEANING
The condition word in the root le label
could not be reset to a value that would
allow subsequent access to the database.
Run DBUTIL and purge the database.
Restore a backup copy.
ACTION
||||||||||||||||||||||||||||||
|||||||||620
MESSAGE
Cannot restructure database while
recovery in progress (DBA 620).
MEANING
Database recovery has not been
completed.
Refer to the TurboIMAGE/XL DBMS
Reference Manual for information on
DBRECOV STOP-RESTART.
ACTION
||||||||||||||||||||||||||||||
|||||||||630
MESSAGE
Database is corrupt due to prior
termination of DBAlter (DBA 630).
MEANING
The database is corrupted because the
restructuring process was not completed
during a previous run of the DBAPLUS
program (DBAlter).
Run the DBAlter program again to
nish the restructuring process.
ACTION
||||||||||||||||||||||||||||||
|||||||||640
MESSAGE
Database is not in a consistent
state (DBA 640).
MEANING
A database operation was started and
has not completed. In addition to 640,
message 370 is also displayed.
Finish the database operation before
running the DBAPLUS program.
Refer to message 370 for additional
instructions.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-70
DBChange Plus Messages
645
MESSAGE
Database contains errors and no
"FIX" requested (DBA 645).
MEANING
The database contains errors. The
DBCPLUS JCW is set to 210 so that
a batch job can detect the damaged
database.
Use the FIX command to correct errors.
ACTION
||||||||||||||||||||||||||||||
|||||||||650
MESSAGE
Security violation (DBA 650).
MEANING
Either the logon user, group, or account
do not match what is in the change le
or you do not have MPE access to the
change le.
Verify that you have logged on correctly
and have access to the change le.
ACTION
||||||||||||||||||||||||||||||
|||||||||660
MESSAGE
N existing records of data set
M exceed the capacity of cap (DBA
660).
MEANING
ACTION
The new capacity is less than the
number of existing entries in the data
set.
Run the DBChange program again and
specify a capacity that is greater than
the number of existing entries. If the
database is corrupt, purge it, and restore
a backup copy.
||||||||||||||||||||||||||||||
|||||||||663
MESSAGE
Data set DataSetName is full (DBA
663).
MEANING
ACTION
The key value cannot be added to the
master data set DataSetName because
the data set is full.
Change the data set capacity and reissue
the FIX command.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-71
670
MESSAGE
Data set DataSetNum does not exist
in the change file (DBA 670).
MEANING
The change le contains inconsistent
data set information. The data set
number DataSetNum was not found in
the change le.
Run the DBCPLUS program again and
create a new change le. If the database
is corrupt, purge it, and restore a backup
copy.
ACTION
||||||||||||||||||||||||||||||
|||||||||675
MESSAGE
Error returned from SORT subsystem
(SORTERR n ) (DBA 675).
MEANING
An error occurred in the SORT
subsystem.
Refer to the MPE XL Utilities
SORT-MERGE/3000 Reference Manual
where SORTERR n is the error number
returned from the SORT ERROR
messages.
ACTION
||||||||||||||||||||||||||||||
|||||||||680
MESSAGE
Not enough stack space to perform
operation (DBA 680).
MEANING
The stack size could not be increased
to copy the database or to create a
data set. The Pascal library procedure
GETHEAP or RTNHEAP failed.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||683
MESSAGE
Check file full. Further events
will not be recorded (DBA 683).
MEANING
All events resulting from the previously
issued CHECK command cannot be
recorded and displayed.
Use CHECK PATH/FIX PATH
commands instead of CHECK
BASE/FIX BASE commands.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-72
DBChange Plus Messages
685
MESSAGE
Unknown event number encountered in
check file (DBA 685).
MEANING
Either the le DatabaseName RX is
damaged or a DBChange Plus error
exists.
Contact your HP representative.
ACTION
||||||||||||||||||||||||||||||
|||||||||687
MESSAGE
Cannot write to the check file
FileName RX (FSERR n ) (DBA 687).
MEANING
The MPE intrinsic FWRITE failed while
writing to the check le FileName RX.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||690
MESSAGE
Cannot write to new root file (DBA
690).
MEANING
The MPE intrinsics FWRITE failed
while attempting to write to the new
root le. In addition to 690, message 410
is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||700
MESSAGE
Cannot write to the root file label
(DBA 700).
MEANING
The MPE intrinsic FWRITELABEL
failed while writing to the le label
of either the new or old root le. In
addition to 700, message 410 is also
displayed.
Refer to message 410.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-73
710
MESSAGE
Cannot write to the data set
DataSetName (DAB 710).
MEANING
The MPE intrinsic FWRITE failed while
writing to the data set DataSetName .
In addition to 710, message 410 is also
displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||720
MESSAGE
Cannot write to file label of data
set DataSetName (DBA 720).
MEANING
The MPE intrinsic FWRITELABEL
failed while writing to the le label of
the data set DataSetName . In addition
to 720, message 410 is also displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||730
MESSAGE
Cannot write to hashing database
TEMPDB (DBA 730).
MEANING
The MPE intrinsic FWRITEDIR failed
while writing to the temporary database
TEMPDB during the restructuring
process. In addition to 730, message 410
is also displayed.
Refer to message 410.
ACTION
||||||||||||||||||||||||||||||
|||||||||740
MESSAGE
MPE intrinsic SWITCHDB failure (DBA
740).
MEANING
The MPE intrinsic SWITCHDB failed
while copying or restructuring the
database.
Notify the system manager.
ACTION
||||||||||||||||||||||||||||||
|||||||||-
A-74
DBChange Plus Messages
750
MESSAGE
Cannot write to change file (DBA
750).
MEANING
The MPE intrinsic FWRITEDIR failed
while writing to the change le. In
addition to 750, message 410 is also
displayed.
Refer to the MPE Intrinsics Reference
Manual , where n is the le system error
number returned from the FCHECK
intrinsic.
ACTION
||||||||||||||||||||||||||||||
|||||||||900
MESSAGE
Data set DataSetName : expected N
entries, processed only M entries
(DBA 900).
MEANING
ACTION
An error occurred while writing to the
data set DataSetName records. N is the
number of records in the set. M is the
number of records processed successfully.
Informational message only. No action
necessary.
||||||||||||||||||||||||||||||
|||||||||910
MESSAGE
N detail records were lost in
altering DataSetName (DBA 910).
MEANING
An error occurred while writing to the
data set DataSetName records. N is the
number of records not written.
ACTION
Informational message only. No action
necessary.
||||||||||||||||||||||||||||||
|||||||||920
MESSAGE
N master records were lost in
altering DataSetName (DBA 920).
MEANING
An error occurred while writing to the
data set DataSetName records. N is the
number of records not written.
ACTION
Informational message only. No action
necessary.
||||||||||||||||||||||||||||||
|||||||||-
DBChange Plus Messages
A-75
B
ORDERS Schema
The ORDERS database schema that is used for examples throughout
this guide is reproduced below before any DBChange Plus
modications.
BEGIN DATA BASE ORDERS;
PASSWORDS:
11 CREDIT ;
12 BUYER
;
13 SHIP-REC;
14 CLERK
;
18 DO-ALL ;
ITEMS:
ACCOUNT
BINNUM
CITY
CREDIT-RATING
DATE
DELIV-DATE
DESCRIPTION
FIRST-NAME
INITIAL
LAST-NAME
LASTSHIPDATE
ONHANDQTY
PRICE
PURCH-DATE
QUANTITY
STATE
STOCK#
STREET-ADD
SUPPLIER
TAX
TOTAL
UNIT-COST
ZIP
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
I4(11,12,13,14,18/);
Z2(/13);
X12(12,13,14/11);
R2(/14);
X6(11,12,13,14,18/);
X6(/14);
X20(11,12,13,14,18/);
X10(14/11);
U2(14/11);
X16(14/11);
X6(12/);
J2(14/12);
J2(14/);
X6(11/14);
I1(/14);
X2(12,13,14/11);
U8(11,12,14,18/);
X26(12,13,14/11);
X16(12,13/);
J2(14/);
J2(11,14/);
P8(/12);
X6(12,13,14/11);
ORDERS Schema
B-1
SETS:
NAME:
DATE-MASTER
ENTRY: DATE
CAPACITY: 365(19);
,A;
(3)
$CONTROL BLOCKMAX = 640
NAME:
CUSTOMER
,M(14/11,18);
ENTRY: ACCOUNT
(1)
LAST-NAME
FIRST-NAME
INITIAL
STREET-ADD
CITY
STATE
ZIP
CREDIT-RATING
CAPACITY: 201(10);
$CONTROL BLOCKMAX = 512
NAME:
PRODUCT
,M(13,14/12,18);
ENTRY: STOCK#
(2)
DESCRIPTION
CAPACITY: 300(16);
NAME:
ENTRY:
SUP-MASTER
SUPPLIER
STREET-ADD
CITY
STATE
ZIP
CAPACITY: 201(12);
NAME:
ENTRY:
,M(13/12,18);
(1)
INVENTORY
,D(12,14/13,18);
STOCK#
( PRODUCT
ONHANDQTY
SUPPLIER
(!SUP-MASTER
UNIT-COST
LASTSHIPDATE
( DATE-MASTER
BINNUM
CAPACITY: 450(15);
B-2
ORDERS Schema
;
,
,
,
,
,
,
,
,
;
,
;
,
,
,
,
;
),
,
),
,
),
;
NAME:
ENTRY:
SALES
ACCOUNT
STOCK#
QUANTITY
PRICE
TAX
TOTAL
PURCH-DATE
DELIV-DATE
CAPACITY: 500(10);
,D(11/14,18);
( CUSTOMER (PURCH-DATE )),
(!PRODUCT
),
,
,
,
,
( DATE-MASTER
),
( DATE-MASTER
);
END.
ORDERS Schema
B-3
">
/
Pobierz
Tylko małe przypomnienie. Możesz wyświetlić dokument tutaj. Ale co najważniejsze, nasza sztuczna inteligencja już go przeczytała. Może wyjaśnić złożone rzeczy w prosty sposób, odpowiedzieć na Twoje pytania w dowolnym języku i pomóc w szybkiej nawigacji nawet po najdłuższych lub najbardziej skomplikowanych dokumentach.
Reklama