Changing Data Item Attributes [ DBChange Plus Technical Addendum for MPE/iX Release 4.0 ] MPE/iX 5.0 Documentation
DBChange Plus Technical Addendum for MPE/iX Release 4.0
Changing Data Item Attributes
In this section, two data items of different 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. 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. Before changing the data items,
the REVIEW ITEMS output looks like this:
Itm No. Item Name Attrib Security
------------------------------------------
1 ACCOUNT I4 (11,12,13,14,18/)
2 BINNUM Z2 (/13)
3 CITY X12 (12,13,14/11)
4 CREDIT-LIMIT I2 (/14) <== data item to be changed
5 CREDIT-RATING R2 (/14)
6 DATE X6 (11,12,13,14,18/)
7 DELIV-DATE X6 (/14)
8 DESCRIPTION X20 (11,12,13,14,18/)
9 FIRST-NAME X10 (14/11)
10 INITIAL U2 (14/11)
11 LAST-NAME X16 (14/11)
12 LASTSHIPDATE X6 (12/)
13 ONHANDQTY J2 (14/12)
14 PRICE J2 (14/)
15 PURCH-DATE X6 (11/14)
16 QUANTITY I1 (/14)
17 SCRAP-FACTOR R4 (/12) <== data item to be changed
18 STATE X2 (12,13,14/11)
19 STOCK# U8 (11,12,14,18/)
20 STREET-ADD X26 (12,13,14/11)
21 SUPPLIER X16 (12,13/)
22 STORE# 8J2 (11,12/14)
23 TAX J2 (14/)
24 TAX-RATE E2 (14/)
25 TOTAL J2 (11,14/)
26 UNIT-COST P8 (/12)
27 YIELD E4 (/12)
25 ZIP X6 (12,13,14/11)
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 confirming 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.
CAUTION If the data item length is changed to a smaller number than the
original data item length, the data may truncate or overflow the
new field.
Refer to "CHANGE ATTRIBUTES" in chapter 3, "Revised Command
Descriptions," for a detailed description of the command syntax and
parameters.
If you want to verify that the modifications to the data items
CREDIT-LIMIT and SCRAP-FACTOR are in the change file, use the REVIEW
ITEMS command. You can see that the attributes for data items
CREDIT-LIMIT and SCRAP-FACTOR are changed.
>review items
REVIEW ITEMS:
Itm No. Item Name Attrib Security
------------------------------------------
1 ACCOUNT I4 (11,12,13,14,18/)
2 BINNUM Z2 (/13)
3 CITY X12 (12,13,14/11)
4 CREDIT-LIMIT E2 (/14) <== data item changed
5 CREDIT-RATING R2 (/14)
6 DATE X6 (11,12,13,14,18/)
7 DELIV-DATE X6 (/14)
8 DESCRIPTION X20 (11,12,13,14,18/)
9 FIRST-NAME X10 (14/11)
10 INITIAL U2 (14/11)
11 LAST-NAME X16 (14/11)
12 LASTSHIPDATE X6 (12/)
13 ONHANDQTY J2 (14/12)
14 PRICE J2 (14/)
15 PURCH-DATE X6 (11/14)
16 QUANTITY I1 (/14)
17 SCRAP-FACTOR E4 (/12) <== data item changed
18 STATE X2 (12,13,14/11)
19 STOCK# U8 (11,12,14,18/)
20 STREET-ADD X26 (12,13,14/11)
21 SUPPLIER X16 (12,13/)
22 STORE# 8J2 (11,12/14)
23 TAX J2 (14/)
24 TAX-RATE E2 (14/)
25 TOTAL J2 (11,14/)
26 UNIT-COST P8 (/12)
27 YIELD E4 (/12)
25 ZIP X6 (12,13,14/11)
MPE/iX 5.0 Documentation