Undoing changes

Select option 3. Undo changes to undo the changes you made to the database.

About this task

As soon as changes are made to the database, they are entered in the UNDO tables. If IMS Database Repair Facility ends for any reason, upon restart of IMS Database Repair Facility these UNDO entries are visible and you can execute them to reverse the original change to the database. However, after the restart of IMS Database Repair Facility, the UNDO tables for a particular DBD are reallocated when you enter option 2. View/Update database to work with that DBD again.

Therefore, it is recommended that after you make pointer changes with IMS Database Repair Facility, you run the Pointer Checker utility to determine if any errors were introduced. If errors occur, restart IMS Database Repair Facility and immediately select option 3. Undo changes from the Main menu.

Procedure

  1. Select option 3. Undo changes in the Main menu and press Enter.
  2. In the Select IMS system panel, select the IMS system ID that is associated database changes that you want to undo.

    Enter an S in the input field that corresponds to the IMS system ID. Then, press Enter.

    Figure 1. Select IMS system panel
                                   Select IMS system  
     Command ===>
    
     S Select IMS system ID.  END to exit
    
       IMS ID  Release
     _ IMSA      15.1
     _ IMSB      14.1
     _ IMSC      14.1
     ******************************* Bottom of data *******************************
  3. In the Specify database panel, specify the database name or, for a partitioned database, the master DBD name in the DBD name field. Then, press Enter.
    Figure 2. Specify database panel
                                    Specify database
     Command ===>
    
     Specify field.  END to exit 
    
     IMS ID             . . IMSA
     IMS release        . . 15.1
    
     DBD name           . . SMPORDP1

    If you specify the master DBD name of a partitioned database, Partition Selection List panel is displayed. Select a partition in the panel by entering an S for the partition. Then, press Enter.

  4. In the Undo changes panel, locate the change that you want to undo.

    This panel lists the changes that were made to the database. The most recent change is listed first (before the Previous updates section) and the other changes are listed in the Previous updates section. The changes are shown in LIFO order, that is, the more recent changes are at the top of the list, and the oldest changes are at the bottom of the list. Use PF8 and PF7 to scroll through the list.

    You can undo only the change that is shown above the Previous updates section. To undo a change, enter an S in the input field of a data line, and then press Enter. If you undo a change, the After and Before data lines of the next most recent change are moved to the current area. Because you can undo only the current and most recent changes, you must undo the changes in the order they were performed. However, by specifying the block RBA or data set group, you can limit yourself to undoing the changes for just one block address or one data set group even if you made changes to multiple blocks or data set groups. You can locate the block RBA or data set group by scrolling through the list of previous updates.

    If the same area was modified several times, it is listed once for each change in the list in the Previous updates section. To reverse one of these changes, you must reverse the most recent changes until you reach the data line you want to undo.

    Figure 3. Undo changes panel
                                    Undo changes                             
     Command ===>                                                                   
      S Select from list then ENTER to undo that change in database.                
                                                                                    
     DBD: SMPORDP1  DBORG: HIDAM    DSORG: OSAM  Lrecl: 1690   CI-Size: 1690        
                                                                                    
     Specify DSG     . .           Blk RBA .                             
     S Select     DSG  Offset  Seg.code  Seg.name  Update time                      
                   01   0020      01     SMP00210  20/07/29 13:25:33          
         Blk RBA . D34                                                              
         Current : F9C8E4E8C2C1D9C46B40C7C5D6D9C7C540404040404040404040404040404040 
         Before  : F9C8E4E7C2C1D9C46B40C7C5D6D9C7C540404040404040404040404040404040 
     ----------------------------- Previous updates -------------------------------  
                  DSG  Offset  Seg.code  Seg.name  Update time                       
                   01   0160      01               20/07/29 13:12:24                 
         Blk RBA . 13CE                                                              
         After   : 40404040404002000000000000000000D2C5E7F0F0F0F0F0F0F640C4C5D7F140  
         Before  : 40404040404002000000000000000000D2C5E8F0F0F0F0F0F0F640C4C5D7F140  
                                                                                     
                   02   0000      01               20/07/29 13:10:52                 
         Blk RBA . D34                                                               
         After   : 03A400000100000008EC000000000000087E0000080400000804D2C4E8F0F0F0  
         Before  : 03A400000100000008EC000000000000087E0000080400000804D2C5E8F0F0F0  
                                                                                     
     ******************************* Bottom of data ******************************** 
    This panel contains the following fields:
    DBD
    The name of the database, or for a partitioned database, the name of the partition.
    DBORG
    The database organization type.
    DSORG
    The organization type of the data set.
    Lrecl
    The record length.
    CI size or Blk size
    The size of the control interval or block.
    Specify DSG
    If you specify a data set group number or an area number on this line, only changes from that data set group or area are displayed. If you want to undo only the changes in one data set group or one area, specify a DSG.

    You can determine the data set group number or the area number by checking the value that is shown for DSG in the list of changes that are shown in the Previous updates section.

    Specify Blk RBA or Specify CI RBA
    If you specify a block RBA on this line, only changes from that block are displayed. If you made changes to multiple blocks but want to undo only the changes in one block, specify an RBA.

    You can determine the block address by checking the value that is shown for Blk RBA in the list of changes that are shown in the Previous updates section.

    Select (S)
    Enter an S to undo the change that is displayed. You can undo only the current change.
    DSG
    The data set group number or, for a DEDB, the area number.
    Offset
    The offset of the change from the beginning of the segment.
    Seg.code
    The code of the active segment.
    Seg.name
    The segment name.
    Update time
    When the change was made. Both a date and a timestamp are displayed.
    Blk RBA or CI RBA
    The relative byte address of the block.
    Current
    The changed value of the data. For the most recent change, this field is labeled Current. You can undo only the change in the Current line. For each block, changes must be undone in the reverse order they were performed. That is, the most recent change must be undone before you can undo the change that preceded it.
    Before
    The former value of the data at the same location. The data content shows the data before it was replaced by what is shown on the Current or After line.

What to do next

After the change is undone, the panel is refreshed, and contains a message that the database was successfully updated. The Current line now shows the present status of the database.

To return to the Main menu, press END several times until the Main menu is displayed.