Navigating around the database

Use the Segment Prefix panel to navigate around the database and to request the display of a segment prefix, segment data, or block in order to zap it.

About this task

The Segment Prefix panel can be used to navigate through the database and to view and update the segment prefix. To view or update the segment prefix, see Viewing and updating segment prefix. In the following procedure and example, learn how to navigate through the database to locate specific data.

Procedure

In the Segment Prefix panel, several options are provided to help you navigate around the database or display data that pertains to the database.
Figure 1. Segment Prefix panel
                                                                                
                              Segment Prefix                                    
 Option ===>                                                                        
                                                                                
 Choose an option, or select a Ptr,then ENTER to navigate.  END to exit         
 Or, update highlighted fields, then ENTER to commit changes in DB.             
 Note: Ptr=pointer, Tgt=target, Src=source, SC=segment code, Seq=sequence       
                                                                                
 Options:                                                                       
  F Follow PTF ptr        P Display prefix   C Display block/CI                 
  B Follow PTB ptr        D Display data     U Follow PP ptr                    
                                                                                
 DBD: DSFACHON  DSG: 01  DBORG: HIDAM   DSORG: OSAM                             
 DS name: GKRAUSE.HPPC.DB.DSFACHO0                                              
 Segment name: SSFACP00 RBA: 00000D3C >4G: N SrcPtr: Int SrcSC:                 
                                                                                
 Segment code . . 01   Delete byte  . . 00                                      
                                                                                
   Ptr Seq  Tgt-SC Tgt-DG Tgt-RBA  >4G  Position                                
 _ CTR                    00000002                                              
 _ PTF        01          00000000  N     <====                                 
 _ PCF  1     02     01   00001190  N                                           
 _ PCF  2     03     01   00000D70  N                                           
 _ PCF  3     04     01   00001222  N                                           

IMS Database Repair Facility supports two methods for navigating through the database. One method is to use navigate options (Forward (F), Backward (B), and Up (U) options). The other method is to select a PTF, PTB, PCF, or PP pointer in the segment prefix. For example, you can follow the PTF or PTB chains until you reach the point where you want to go a level lower where you then select a PCF. When you find the pointer for the segment you want, you have a choice of displaying the segment prefix, segment data, or control interval/block data with display options.

If you select a pointer or choose one of the navigate options, Segment Prefix panel shows the pointers that are related to the selected segment.

Using navigate options
F Follow PTF ptr
Enter F to move forward in the twin chain of segments, following the PTF pointer. If the PTF pointer does not exist, a message is displayed.
B Follow PTB ptr
Enter B to move backward in the twin chain of segments, following the PTB pointer. If the PTB pointer does not exist, a message is displayed.
U Follow PP ptr
Enter U to follow the PP pointer. If the PP pointer does not exist, a message is displayed.
Selecting a pointer
The selection option is an alternative to the navigate options.

The arrow (<====) in the Position field shows which twin chain (forward or backward) you are processing. To change from one chain to another, select PTF or PTB by entering an S to the left of a pointer.

Display options
P Display prefix
Enter P to display the segment prefix. The Segment Prefix Dump panel is displayed.
D Display data
Enter D to display the segment data. The Segment Data panel is displayed.
C Display block/CI
Enter C to display the contents of the current control interval or database block. The Block/CI data panel is displayed.
Tips:
  • After you make a selection, a message might be displayed. The message partly obscures the panel. To see the panel without the message, press PF8 and then PF7. Depending on the type of message, pressing Enter might refresh the panel.
  • Each time that you navigate to another segment in the database, an entry is made in the audit history file. You can view this file by selecting option 4. View audit history of processed segments from the Main menu.

IMS Database Repair Facility follows these conventions when it evaluates entries on the Segment Prefix panel.

  • If navigate option F or B is specified, and a PTF, PTB, or PCF is selected, error message FABZ002W is displayed indicating that a conflicting selection was made.
  • If navigate option U, display option P (segment prefix), D (segment data), or C (Control Interval) is specified, and a PTF, PTB, or PCF is selected, the following error message is displayed:
    FABZ002W: CONFLICTING SELECTION. SELECTED FIELDS WERE:
    NAVIGATE OPTION, POINTER TYPE
  • If a PTF, PTB, or PCF with a zero RBA is selected, the following error message is displayed:
    FABZ001W: END OF xxx POINTER CHAIN HAS BEEN REACHED.
  • If you select a PTF with a zero RBA in an HDAM database, the following error message is displayed:
    FABZ047W: END OF SYNONYM (PTF) POINTER CHAIN HAS BEEN REACHED.
  • If neither a navigate option nor a PTR option is selected, and no zap of a pointer is entered, the following error message is displayed:
    FABZ000W: SELECT A POINTER TYPE OR A NAVIGATE OPTION.
  • If a modification to the segment code, delete byte, or target RBA is entered, and a navigate option is entered at the same time, the following error message is displayed:
    FABZ002W: CONFLICTING SELECTION. SELECTED FIELDS WERE:
    NAVIGATE OPTION, POINTER ZAP.

Example of navigation

The following simplified database diagram can help you to understand the navigation concepts. Each box represents a database segment. In each box, the segment code is shown as the SC value and the relative byte address as the RBA value. In addition, the PTF, PTB, and PCB pointers are shown.

Figure 2. Sample database diagram
This diagram shows a sample database diagram. The detail of this diagram is described in the surrounding text.

The starting point for this diagram is the segment at location (RBA) 2308. The segment prefix that is shown in Figure 1 represents this block. In the diagram, the blocks to the left, right, and below the starting block correspond to the PTB pointer, PTF pointer, and PCF pointer that are listed in the Segment Prefix panel.

If the physical child pointer is selected, the program moves to the segment at RBA 260C, and the next Segment Prefix panel looks like the Segment Prefix panel that is shown in the following figure.

Figure 3. Sample panel after PCF pointer is selected
                                 Segment Prefix                  
 Option ===>                                                                        
                                                                                
 Choose an option, or select a Ptr,then ENTER to navigate.  END to exit         
 Or, update highlighted fields, then ENTER to commit changes in DB.             
 Note: Ptr=pointer, Tgt=target, Src=source, SC=segment code, Seq=sequence       
                                                                                
 Options:                                                                       
  F Scan chain forward    P Display prefix   C Display block/CI
  B Scan chain backward   D Display data     U Go up one level

 DBD: SMPORDP1  DSG: 01  DBORG: HIDAM   DSORG: OSAM
 DS name: IDL.DB.SMPORD1P.HIDAM.OSAM.0100
 Segment name: SMP00212 RBA: 0000260C >4G: N SrcPtr: PCF SrcSC: 01 Level: 1

 S Select pointer type or update highlighted fields below

 Segment code . . 02   Delete byte  . . 00

   Ptr Seq  Tgt-SC Tgt-DG Tgt-RBA  >4G  Position
 S PTF        02          00002A8E  N     <====
 _ PTB        02          00000000  N
 _ PCF        04     01   00002910  N

The information in this panel that is related to the database and data set remain unchanged. However, the following fields that are related to the segment have changed:

  • Segment name
  • RBA has changed to a different segment
  • SrcPtr explains that we got here by a PCF
  • SrcSC shows the segment code of the source segment
  • Level has changed from 0 to 1, since this segment is a child to the previous segment
  • Segment code, the current segment code has a value of 02

The information found in the segment prefix has also changed.

  • The counter (CTR) is no longer displayed because it is not defined in the DBD for this segment.
  • The target segment codes for the PTF and PTB pointers now reflect the segment code of the current segment. The target segment code of the PCF pointer reflects the segment code of the (grand) child segment.
  • The RBA of the PTF has changed to reflect this segment's forward chain.
  • The RBA of the PTB is zero, since this is the end of the PTB chain.
  • The RBA of the PCF has changed and now points to the grandchild of the original segment.
Navigation possibilities
The navigate options on this panel differ slightly from the options that are shown on the Segment Prefix panel in Figure 1.

It is valid to go up a level. Enter a U on the Options line to move up a level. However, since this segment is at the beginning of a chain, neither B (Backward) nor PTB is a valid choice.