Recovering a Data Item [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
Recovering a Data Item
In the previous section, you deleted the data item LASTSHIPDATE from the
ORDERS database. Because DBChange Plus stored this deletion in the
change file, 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 field was changed between the time
the data item was deleted and then recovered, you must explicitly
replace the field 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.
In the following example, the data item LASTSHIPDATE is recovered. The
DBCPLUS program returns a message confirming 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.
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 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 (11,12,13,14,18/)
8 FIRST-NAME X10 (14/11)
9 INITIAL U2 (14/11)
10 LAST-NAME X16 (14/11)
11 LASTSHIPDATE X6 (12/) <---- data item recovered
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)
Before it was deleted, LASTSHIPDATE was also a field 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
field 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 STOCK# Y PRODUCT
2 ONHANDQTY
3 SUPPLIER Y Y SUP-MASTER
4 UNIT-COST
5 LASTSHIPDATE Y DATE-MASTER <---- field recovered
6 BINNUM
MPE/iX 5.0 Documentation