Changing a Data Item [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
Changing a Data Item
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 ACCOUNT I4 (11,12,13,14,18/)
2 BINNUM Z2 (/13)
3 CITY X12 (12,13,14/11)
4 CREDIT-RATING R2 (/14)
5 DATE X6 (11,12,13,14,18/)
6 DELIV-DATE X6 (/14)
7 DESCRIPTION X20 (0,11,12,13,14,18/)<---- data item to be changed
8 FIRST-NAME X10 (14/11)
9 INITIAL U2 (14/11)
10 LAST-NAME X16 (14/11)
11 LASTSHIPDATE X6 (12/)
12 ONHANDQTY J2 (14/12)
13 PRICE J2 (14/)
14 PURCH-DATE X6 (11/14)
15 QUANTITY I1 (/14)
16 STATE X2 (12,13,14/11)
17 STOCK# U8 (11,12,14,18/)
18 STREET-ADD X26 (12,13,14/11)
19 SUPPLIER X16 (12,13/)
20 STORE# 8J2 (11,12/14)
21 TAX J2 (14/)
22 TOTAL J2 (11,14/)
23 UNIT-COST P8 (/12)
24 ZIP X6 (12,13,14/11)
NOTE 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 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 confirming that the changes are
accepted.
>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.
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 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 ACCOUNT I4 (11,12,13,14,18/)
2 BINNUM Z2 (/13)
3 CITY X12 (12,13,14/11)
4 CREDIT-RATING R2 (/14)
5 DATE X6 (11,12,13,14,18/)
6 DELIV-DATE X6 (/14)
7 FIRST-NAME X10 (14/11)
8 INITIAL U2 (14/11)
9 LAST-NAME X16 (14/11)
10 LASTSHIPDATE X6 (12/)
11 ONHANDQTY J2 (14/12)
12 DESCRIPTION 4U25 (11,14/18) <---- data item changed
13 PRICE J2 (14/)
14 PURCH-DATE X6 (11/14)
15 QUANTITY I1 (/14)
16 STATE X2 (12,13,14/11)
17 STOCK# U8 (11,12,14,18/)
18 STREET-ADD X26 (12,13,14/11)
19 SUPPLIER X16 (12,13/)
20 STORE# 8J2 (11,12/14)
21 TAX J2 (14/)
22 TOTAL J2 (11,14/)
23 UNIT-COST P8 (/12)
24 ZIP X6 (12,13,14/11)
MPE/iX 5.0 Documentation