Previous Topic Next topic Print topic


Recovery example

An example run through the Indexed File Recovery utility is described in Figure 44 through Figure 47. The recovery session is started in this example by the following command:

recover1 master.inx dropout1

Figure 44 shows information about the file master.inx.

Under the name of the file to be recovered, a description of the state of the file is displayed. Any of the following messages may appear:

  • This file has not been marked as needing recovery!
  • The Open For Modify Count for this file is not zero: count
  • File has been marked as corrupted due to a previous error.
  • KIB is corrupt. Using template file: template-file
  • KIB is corrupt. Enter a template filename (press Enter for manual entry).

If the KIB is corrupt, and a template filename is not entered, recover1 will prompt the user for the required KIB information before continuing.

If more keys exist than can appear on this screen, as many as possible appear, after which you are asked if you want to see the remaining key descriptors. This continues until all keys are shown. You are then asked to verify that this is the file you want to recover. Entering N terminates the program. Entering Y continues the program.

Figure 44: Indexed File Recovery Utility: File Recovery Verification

                 Indexed File Recovery Utility
                   Recover1 for Visual COBOL
Indexed File: master.inx

This file has not been marked as needing recovery!

Disk Block Size:        1024   Minimum Record Length:  80
Disk Block Increment:   1024   Maximum Record Length:  80
Number of Index Blocks:  170   Number of Records:     150

  Key  Position Size Remarks
PRIME     1      8
    1     9      8 
    2     17     8   duplicates allowed

Is this the file you wish to recover (y/n)?

Figure 45 shows a summary of the information that is gathered during the file integrity scan.

You are then asked if you would like to proceed with the recovery process. Entering N terminates the program. Entering Y continues the program. The “Average record length” is computed by adding the length of all the records in the file and dividing by the number of records. The “Average data size” is computed by adding the size that the record actually occupies in the file and dividing by the number of records. This size allows you to determine how much your data can be compressed.

Figure 45: Indexed File Recovery Utility: recover1 Summary

                Indexed File Recovery Utility
                  Recover1 for Visual COBOL
Indexed File: master.inx

Drop File: dropout1

This file has not been marked as needing recovery!

Disk Block Size:        1024 Minimum Record Length:  80
Disk Block Increment:   1024 Maximum Record Length:  80
Number of Index Blocks:  170 Number of Records:     150
Phase: Integrity Scan        Estimated Recoverable: 150

           |   Total |   Total |   First |   Last  |
Block Type | Found   | Corrupt | Corrupt | Corrupt |
KIB        |     1   |       0 |         |         |
Data       |   102   |       0 |         |         |
Node       |    61   |       0 |         |         |
Empty      |     6   |       0 |         |         |
Invalid    |     0   |       0 |         |         |
Unreadable |     0   |       0 |         |         |

Average data size: 14, Average record length: 80
Do you wish to proceed with recovery (y/n)?

Figure 46 shows the information that is displayed while recover1 is rebuilding the node blocks for the prime key.

Figure 46: Indexed File Recovery Utility: recover1 Statistics

                Indexed File Recovery Utility
                  Recover1 for Visual COBOL
Indexed File: master.inx

Drop File: dropout1

This file has not been marked as needing recovery!
	
Disk Block Size:        1024 Minimum Record Length:  80
Disk Block Increment:   1024 Maximum Record Length:  80
Number of Index Blocks:  170 Number of Records:     150
Phase: Build Node Blocks     Estimated Recoverable: 150
 
Key being processed:                        PRIME
Records recovered:                            100
Records written to drop file:
Block being processed:                         13
Number of data blocks moved (for truncate):     5

Figure 47 shows the information that is displayed after recover1 terminates successfully. The two lines regarding truncation are shown only when the T option is specified.

Figure 47: Indexed File Recovery Utility: recover1 Finished Successfully

             Indexed File Recovery Utility
               Recover1 for Visual COBOL
Indexed File: master.inx 

Drop File: dropped

This file has not been marked as needing recovery!	 

Disk Block Size:        1024 Minimum Record Length: 126
Disk Block Increment:   1024 Maximum Record Length: 126	 
Number of Index Blocks:  120 Number of Records:     100
Phase: Build Node Blocks     Estimated Recoverable: 100

Key being processed:                        PRIME	 	 
Records recovered:                            100
Records written to drop file:
Block being processed:                        120
Truncate option specified - number of data blocks moved:   4
Truncate action successful - new Number of Index Blocks: 112

Recovery successful.

In the example shown in Figure 48, the KIB of the file has been corrupted, and key information must be entered for the file to be recovered. This example shows manual entry of KIB information, however, it is recommended that a template file be used with the -K option to recover the KIB information. Underlined characters have been entered by the user.

The recovery session is started by the following command:

recover1 master.inx dropout1 -k
Note: Entering incorrect information about how many keys, or which keys, can have duplicate values may cause unpredictable results.

Figure 48: Indexed File Recovery Utility: Entering Key Information

             Indexed File Recovery Utility
                Recover1 for Visual COBOL
Indexed File: master.inx

Last error was 98,38 at 9:29 on 03-21-2008	
 
Are any of the keys in this file segmented (split) (y/n)? y
Key #: PRIME Segment #: 2 Starting Position? 10 Length? 5
             Another Segment (y/n)? n
             Total Key Length = 13 Duplicates Permitted (y/n)? n
Another Key (y/n)? n

Figure 49 shows an example of entering the remainder of the KIB information. Underlined characters have been entered by the user.

Figure 49: Indexed File Recovery Utility: Entering KIB Information

              Indexed File Recovery Utility
                 Recover1 for Visual COBOL
Indexed File: master.inx

Last error was 98,38 at 9:29 on 03-21-2008

Minimum Record Length (in bytes)? 80
Maximum Record Length (in bytes)? 80	 	 	 
Disk Block Size (in bytes)? 1024
User Block Size (1=none/2=in bytes/3=in records)? 1	 
Data Compression (y/n)? y    Space Character Value? 32   Zero Character Value? 48
Key Compression  (y/n)? y    Space Character Value? 32
File Version Number (0/2/3/4)? 4   Atomic I/O Enabled (y/n) y	 	 
File Lock Limit (in GB)? 2
Disk Block Increment (in bytes)?  1024	 
Allocation Increment (in blocks)? 8
Force Write Data Blocks (y/n)? n    Force Write Index Blocks (y/n)? n	 
Force to Disk (y/n)? n              Force File Closed (y/n)? n
Code Set (1=none/2=ASCII/3=EBCDIC)? 1
Collating Sequence (1=none/2=ASCII/3=EBCDIC)? 1	 
	 
Is this information correct (proceed with recovery) (y/n)? y

After the key and KIB information has been successfully entered, the recovery process proceeds the same as before, beginning with Figure 44. If a template file had been specified on the command line or a template filename had been entered when prompted, the screens prompting for the key and KIB information would not have been displayed. A template file must be specified if the KIB is corrupt and the file uses either an enumerated code set or an enumerated collating sequence.

Previous Topic Next topic Print topic