TurboIMAGE/XL Database Management System DBChange Plus Technical Addendum for MPE/iX Release 4.0 ABCDE HP Part No. 36386-90005 Printed in U.S.A.
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 or tness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for direct, indirect, special, incidental or consequential damages in connection with the furnishing or use of this material.
Printing History 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 June 1992 36836-A.01.
Preface With this release of DBChange Plus, you are introduced to a new document type called a technical addendum. This document exists to introduce the new functionality contained in this version of the product. It is meant to supplement the DBChange Plus User's Guide . The information contained in this document will be incorporated into the next edition of the manual.
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 Command COMMAND It cannot, however, be entered as: comm italics comamnd In a syntax statement or an example, a word in italics represents a parameter or argument that you must replace with the actual value.
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][...
Contents 1. Introduction 2. Adding and Changing Data Items 3. 4. Managing Items and their Data Types . . . Data Conversion Rules . . . . . . . . Comparing IEEE and HP 3000 Real Formats Purging a Change File . . . . . . . . . . Helpful TurboIMAGE/XL Information Item Type Conversions . . . . . . . Adding Data Items . . . . . . . . . Changing a Data Item . . . . . . . . Changing Data Item Attributes . . . . Revised Command Descriptions ADD ITEM . . . . . . BASE . . . . . . . . .
Tables 2-1. DBChange Plus Supported Item Type Conversions . . . . . . . . . . . 3-1. DBChange Plus Supported Item Type Conversions . . . . . . . . . . .
1 Introduction You can store real ( oating-point) numbers in MPE/iX using one of two formats: IEEE or HP 3000. Until now, only an R data type was available for you to store just your TurboIMAGE HP 3000 reals. Some users may have stored their IEEE reals using either the K or R data type. An E data type is now available to distinguish the two formats available on MPE/iX and is especially important for users who take advantage of the math coprocessor.
Data Conversion Rules For data to be converted to IEEE data format, the original type of the data item must be I, J, K, or R. Other types (P, U, X, and Z) cannot be converted and attempts to do so result in an error for each command. The no-conversion option is only available with type E. It means simply that the data is already stored in IEEE format, and only the type needs to be changed. Any attempts to use this option with other types result in an error.
Purging a Change File If you want to purge any existing change les, you can specify the NEW or PURGECF options with the BASE command; if you do not specify an option, NEW is assumed by default. The NEW and PURGECF options purge any existing change les. In interactive mode, however, before any le is purged you are prompted to verify that this is indeed the action you wish to take. In batch mode, a NEW or no option automatically purges the change le.
2 Adding and Changing Data Items This chapter explains how to add data items of type E to a TurboIMAGE/XL database, and how to change data items to type E. It provides instructions for and examples of the various commands used to change data items. Helpful TurboIMAGE/XL Information 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.
The subitem length must be from 1 to 255, depending on the type designator as follows: Type Length E, R Must be 2 or 4 halfwords. I, J Must be 1, 2, or 4 halfwords. K Must be 1 or 2 halfwords. P Maximum is 255 nibbles. U, X, Z Maximum is 255 bytes. 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.
Table 2-1. DBChange Plus Supported Item Type Conversions New Item Type Current Item Type E2,E4 y I1,I2 J1,J2 K1 P R2,R4 U X Z E2,E4 x x x x I1,I2 x x x x x x x x x J1,J2 x x x x x x x x x K1 x x x x x x x x x x x x x x x x x x x U x x X x x x x P R2,R4 Z y x x x x x x x x !E2 or !E4 assumes a current data type of E. The length must be equivalent to 2 or 4 halfwords.
Adding Data Items In this section, several data items of various data types are added to the ORDERS database. TAX-RATE is used to illustrate adding a data item of type E. CREDIT-LIMIT is added as a type I and is converted to a type E in a later section. SCRAP-FACTOR and YIELD are both added as items of type R; when these are later converted to type E, one is assumed to contain data already in IEEE format while the other contains data in HP 3000 real format.
In the example below, the data items TAX-RATE, CREDIT-LIMIT, SCRAP-FACTOR, and YIELD are added using the ADD ITEM command. They should appear in the data item list before the data items identi ed inside parentheses on each command line below. The sub-count for all of these data items is assumed to be 1 by default. For TAX-RATE, the type is E, the length 2; and user class 14 has read access to it. For CREDIT-LIMIT, the type is I, the length 2; and user class 14 has write access to it.
>review items REVIEW ITEMS: Itm No.
Changing a Data Item In this section, the YIELD data item in the ORDERS database is changed to type E. YIELD is changed from a type R to a type E, although the data already is stored in IEEE data format. The length and security are also changed. Use the CHANGE ITEM command to change the data item YIELD in the ORDERS database. Before changing the data item, the REVIEW ITEMS output looks like this: Itm No.
Changing Data Item Attributes In this section, two data items of di erent data types in the ORDERS database are changed to type E. CREDIT-LIMIT is changed from a type I to a type E, which converts the data to IEEE data format. SCRAP-FACTOR is changed from a type R to a type E without the no-conversion option, because the data in SCRAP-FACTOR is stored in HP 3000 real format. To change the subitem count, the type, and the length of a data item, use the CHANGE ATTRIBUTES command.
Note Refer to Table 2-1 for information about data item type conversions supported by DBChange Plus. In the example below, the CHANGE ATTRIBUTES command is used to change the data items CREDIT-LIMIT and SCRAP-FACTOR to type E. The DBCPLUS program displays messages con rming that the changes are accepted. >change attributes credit-limit e Change of item attributes accepted. >change attributes scrap-factor e Change of item attributes accepted.
>review items REVIEW ITEMS: Itm No.
3 Revised Command Descriptions ADD ITEM Adds a data item to the database. Syntax A[DD] ITEM ItemName [(NextItem)] [SubitemCount] [([ReadClassList]/[WriteClassList])] SubitemType SubitemLength Parameters ItemName (NextItem) SubitemCount SubitemType SubitemLength (ReadClassList/ WriteClassList) 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.
ADD ITEM 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. is a list of the user classes that have write (and implied read) access to the data item.
ADD ITEM After the addition, the ITEMS part of the schema looks like this: ITEMS: ACCOUNT BINNUM . . .
BASE Speci es the database to be modi ed. Syntax 2 2 B ASE 3 DatabaseName 3 NEW 4 OLD 5 PURGECF Parameters DatabaseName NEW OLD PURGECF is the name of the database to be modi ed. It cannot be quali ed 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.
BASE Example >base orders purgecf To purge change file, confirm purge [y/N] ? y Change file ORDERSCF has been purged. 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.
CHANGE ATTRIBUTES Changes the subitem count, type, and/or length of a data item. (For information about supported item type conversions, refer to Table 3-1 later in this section.) Syntax CHA[NGE] A[TTRIBUTES] DataItemName [SubitemCount] SubitemType SubitemLength Parameters DataItemName SubitemCount SubitemType SubitemLength Note is the name of the data item whose attributes are changed. Each data item within the database must have a unique name.
CHANGE ATTRIBUTES Example >change attributes store# X 4 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 speci ed, the subitem count does not change.
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# 3-8 , , , , , , , , , , , , , , , , , , , , , , , , 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(1
CHANGE ITEM 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 3-1 later in this section.) Syntax CHA[NGE] ITEM DataItemName [(NextItem)] [SubitemCount] [([ReadClassList]/[WriteClassList])] SubitemType SubitemLength Parameters DataItemName (NextItem) SubitemCount SubitemType SubitemLength is the name of the data item to be changed. It must be an existing data item in the database.
CHANGE ITEM length must be an even number. If this parameter is selected, the SubitemType parameter is also required. If this parameter is omitted, the subitem length remains unchanged. Note When specifying type E with the no-conversion option (!E), if the subitem length is changed from 2 to 4, or 4 to 2, the data has to be converted to t into the new eld size with the assumption it is already in IEEE format. (ReadClassList/ WriteClassList) de nes user class access to the data set.
CHANGE ITEM Table 3-1. DBChange Plus Supported Item Type Conversions New Item Type Current Item Type E2,E4 y I1,I2 J1,J2 K1 P R2,R4 U X Z E2,E4 x x x x I1,I2 x x x x x x x x x J1,J2 x x x x x x x x x K1 x x x x x x x x x x x x x x x x x x x U x x X x x x x P R2,R4 x Z y x x x x x x x !E2 or !E4 assumes a current data type of E. The length must be equivalent to 2 or 4 halfwords.
CHANGE ITEM FIRST-NAME INITIAL LAST-NAME LASTSHIPDATE ONHANDQTY PRICE PURCH-DATE QUANTITY STATE STOCK# STREET-ADD SUPPLIER TAX TOTAL UNIT-COST ZIP , , , , , , , , , , , , , , , , 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 DESCRI
4 Revised DBChange Plus Messages 70 MESSAGE New item type cannot be converted from current item type/len (DBC 70). MEANING When changing data item attributes, the new data item type must be able to convert from the existing data item type, or the length must be equivalent to 2 or 4 halfwords when using !E. Refer to Table 2-1 or Table 3-1 for information on available type conversions between di erent item types. ACTION 108 204 MESSAGE Sub-item length for item type E or R must be 2 or 4 (DBC 108).