Using RUV for forward recovery


To run the RUV forward recovery process in batch, execute the RUV utility (program RUVZSM0). For general information about the RUV utility, see Using-the-RUV-batch-interface.

You can use the ISPF interface to generate recovery JCL. For more information, see Using-the-ISPF-interface-for-recovery.

This topic contains the following information:

Running a RUV forward recovery

To run a RUV forward recovery, perform the following steps:

  1. Determine the VSAM file or files to include for forward recovery.
  2. Build the JCL with the correct space allocation.
  3. Build the RECOVER FORWARD command to specify the files to recover and the options to use. Specify the setting for incremental backups.
  4. Run the recovery job or jobs.

Using the RECOVER FORWARD command

To perform forward recovery for one or more files in batch, use the RECOVER FORWARD command. All keywords on the command correspond to options you can control.

Coding RECOVER FORWARD statements

To code a RECOVER FORWARD statement, use the following syntax:

RECOVER FORWARD
    { INVENTORY_ONLY(NO | YES) }
    VSAM_FILE(dsn44
        { NEW_NAME(dsn44) }
        { START_TIME(yyyyjjjhhmmsst) }
        { STOP_TIME(yyyyjjjhhmmsst) }
        { RECOVERY_MODE(NIS | SIS)}
        { BUFND(nnn)}
        { BUFNI(nnn)}
        { LSR_POOL(YES | NO) }
        { BACKUP_IN
           (CURRENT_BACKUP) | (ddn8_or_dsn44) }
        { SELECTION_EXIT(program8) }
        )
    { VSAM_FILE(dsn44 ... ) }
    VSAM_GROUP ( name32, *, …
        { START_TIME ( yyyyjjjhhmmsst | Xhhhhhhhhhhhhhhhh ) }
        { STOP_TIME ( yyyyjjjhhmmsst | Xhhhhhhhhhhhhhhhh ) }
        { SELECTION_EXIT ( program8 ) }
    )
    { VSAM_GROUP ( ... )
    { ARCHIVE_IN(ddn8_or_dsn44, ...) }
    ;

The following examples show a forward recovery of two files in a general ledger application. RUV can invoke a user exit routine during processing of the files.

Example 1

In Example 1, when the CURRENT_BACKUP keyword is used, RUV identifies the input backup and VSAM files for recovery with no additional input from the user.

RECOVER FORWARD
    VSAM_FILE(GNL.LEDGER
        BACKUP_IN(CURRENT_BACKUP)
        SELECTION_EXIT(GNLEXIT)
       )
    VSAM_FILE(GNL.PAYROLL
       )
    ;

Example 2

In Example 2, the control statements specify the input backups and VSAM file to use and provide a stop time of 2:00 PM on September 15, 2009 (Julian Day 2009.258).

RECOVER FORWARD
    VSAM_FILE(GNL.LEDGER
        STOP_TIME(20092581400000)
        BACKUP_IN(GNL.LEDGER.BKUP)
        SELECTION_EXIT(GNLEXIT)
        )
    VSAM_FILE(GNL.PAYROLL
        STOP_TIME(20092581400000)
        BACKUP_IN(GNL.PAYROLL.BKUP)
        SELECTION_EXIT(GNLEXIT)
        )
    ARCHIVE_IN(GNL.ACCUMARC)
    ;
Error
Warning

The LSR_POOL, BUFNI, BUFND, and RECOVERY_MODE parameters can greatly affect the performance of a RECOVER.

Before you change from the defaults, it is strongly recommended that you test the effects of changing these parameters before implementing them in production environments.

Using the AIX keyword

Use the optional AIX keyword with the RECOVER FORWARD command to rebuild alternate indexes (AIXs) and PATHs that were deleted by the recovery. If YES is selected, any deleted AIXs are rebuilt at the end. If NO is selected, the AIXs are not rebuilt.

If the AIX keyword is used on the RECOVER FORWARD command, it is applied globally to all VSAM files processed. If the AIX keyword is used locally for a single VSAM file, it overrides the global value for that VSAM file only.

Set one of the following values for the AIX keyword. The default value is YES.

  • YES
    Rebuild all AIXs and PATHs that were deleted.
  • NO
    Do not rebuild the AIXs and PATHs.
Warning

Note

AIXs that were not deleted are not affected by the AIX keyword. If you specify AIX(NO), an AIX that would not have been deleted otherwise is not deleted during the recovery.

RUV will delete AIXs and PATHs only if the AIX has both UNIQUEKEY and UPGRADE or when a file is restored during a recovery. Otherwise, the AIX is not deleted and the AIX keyword is ignored.

Using the ARCHIVE_IN keyword

You can use the optional ARCHIVE_IN keyword on the RECOVER FORWARD command to identify an archive data set to use as input to the recovery process.

It is recommended that you let RUV automatically select the archive files for use. When you specify the archive files, you override the normal selection mechanism of RUV. If multiple archive files have active statuses, RUV selects them all for recovery and archive processing, even if they are copies of the same archive file.

If you specify the input archives with the ARCHIVE_IN keyword, you are responsible for providing enough sort work space for sorting the number and size of input archive records. If RUV selects the archives (you omit the ARCHIVE_IN keyword), RUV automatically requests the appropriate amount of sort work space.

To specify the value of the ARCHIVE_IN keyword, use the ddname of the DD statement that describes the archive data set in the JCL, or specify the fully qualified data set names of the archive data sets to have RUV allocate the data set dynamically.

Warning

Note

If you specify an ARCHIVE_IN value for an existing data set you may get unexpected results. RUV assumes that you have verified the accuracy of the data set and the archive names, and it will attempt to apply the data even if it is incorrect.

Using the BACKUP_IN keyword

You can use the optional BACKUP_IN keyword on the RECOVER FORWARD command to identify the backup data set that you want RUV to recover. The value can be set to one of the following:

  • CURRENT_BACKUP (which will select the latest active backup registered in the repository)
  • the ddname of the JCL statement that describes the backup data set
  • the fully qualified data set name of the backup data set (RUV dynamically allocates the data set)

When the CURRENT_BACKUP value is selected, the recovery utility determines the time range of transactions. Therefore it is not necessary to specify START_TIME or STOP_TIME keyword.

When the CURRENT_BACKUP value is selected, the recovery utility checks for both RUV and SMS backups. If both types of backups exist, the backup with the latest timestamp is used in the recovery. If you do not want to use a particular backup, the BACKUP_METHOD keyword can control which backup methods are used or ignored. See Using-the-BACKUP_METHOD-keyword for addition information.

For more information, see Restoring-files-from-backups.

Using the BUFND keyword

You can use the optional BUFND keyword on the RECOVER FORWARD command to specify the number of data buffers to use. The default is 16, but you can change it to any desired value from 2 through 255. Values beyond 255 will be ignored. VSAM may override invalid combinations of BUFNI/BUFND.

Using the BUFNI keyword

You can use the optional BUFNI keyword on the RECOVER FORWARD command to specify the number of index buffers to use. The default is 5, but you can change it to any desired value from 2 through 255. Values beyond 255 will be ignored. VSAM may override invalid combinations of BUFNI/BUFND.

Using the INVENTORY_ONLY keyword

You can use the optional INVENTORY_ONLY keyword on the RECOVER FORWARD command to show a listing of VSAM files that will be RECOVERED FORWARD, and the name of each RECOVER FORWARD file if it was created by this job. If YES is selected, RECOVER FORWARD processing will not occur but a report will be issued. The INVENTORY_ONLY keyword does not simulate the complete performance of the command, it just reports on what it would have tried to do.

Set one of the following values for the INVENTORY_ONLY keyword. The default value is NO.

  • YES
    Prevent RECOVER FORWARD processing and issue a preliminary report on files that will be recovered.
  • NO
    Allow RECOVER FORWARD processing.

Using the LSR_POOL keyword

You can use the optional LSR_POOL keyword on the RECOVER FORWARD command to specify whether or not to use LSR POOLS (Local Shared Resource Pools designed to improve performance). The default is YES for KSDS and RRDS data sets. ESDS and IAM data sets do not use LSR POOLS, regardless of how the keyword is set.

Error
Warning

In most cases, setting LSR_POOL to NO will cause severe performance degradation.

Therefore, this setting is not recommended unless you use some other product to enhance your VSAM performance.

Using the NEW_NAME keyword

Use the optional NEW_NAME keyword to recover a VSAM file to a new name. With an alternative VSAM data set name, you can copy production files to test and audit production recovery environments. You may perform many recoveries against the VSAM file without risking damage to an actual production file.

Warning

Note

The NEW_NAME value recovers a data set only to a different VSAM cluster. You must rebuild alternative indexes to recreate a complete data set structure.


Error
Warning

Do not use the NEW_NAME feature with SMS backups that have paths. Use SMS facilities to restore and rename those data sets.

Using the RECOVERY_MODE keyword

You can use the optional RECOVERY_MODE keyword on the RECOVER FORWARD command to specify the Insertion Strategy for RUV to use when the RECOVER might cause inserts to the VSAM data set that create CI/CA splits. This keyword allows you to control the Insertion Strategy.

The default is NIS (Normal Insertion Strategy), which is good for most files. Files that have a large number of records inserted at one spot might benefit from the RECOVERY_MODE being set to SIS (Sequential Insertion Strategy). Before changing this parameter setting, see the Warning.

Using the SELECTION_EXIT keyword

You can use the SELECTION_EXIT keyword on the RECOVER FORWARD command to have RUV invoke a user exit routine for each record that it processes during the recovery. It can also be used to override a user exit selection name defined during an ADD or UPDATE VSAM_FILE. See Using-the-SELECTION_EXIT-user-exit. As the value of the SELECTION_EXIT keyword, specify the program name of the exit routine.

Using the START_TIME keyword

Use the optional START_TIME keyword on the RECOVER FORWARD command to specify the start (earliest) timestamp of the range of journal records to include in the recovery process.

For a RECOVER FORWARD, this timestamp is required if you are using a backup that was not produced by RUV. The timestamp may be required for a point-in-time recovery, depending on the recovery situation. It is not necessary to specify a START_TIME when using the BACKUP_IN(CURRENT_BACKUP) keyword.

Time inputs for RECOVER will accept inputs that go to 5 characters past the decimal of seconds, as in yyyyjjjhhmmssthtth.

For more information, see Using-the-START_TIME-keyword.

Using the STOP_TIME keyword

You can use the optional STOP_TIME keyword on the RECOVER FORWARD command to specify the stop (latest) timestamp of the range of journal records to include in the recovery process. The timestamp may be required when recovering to a specific point in time, depending on the recovery situation. It is not necessary to specify a STOP_TIME when using the BACKUP_IN(CURRENT_BACKUP) keyword.

Time inputs for RECOVER will accept inputs that go to 5 characters past the decimal of seconds, as in yyyyjjjhhmmssthtth.

For more information, see Using-the-STOP_TIME-keyword.

Using the SUPPRESS_RECOVERY_ERROR keyword

Use the optional SUPPRESS_RECOVERY_ERROR keyword with the RECOVER FORWARD command to recover to a data set that cannot be set to a correct initial state.

Error
Warning

This feature can lead to invalid recoveries by hiding recovery errors, if SUPPRESS_RECOVERY_ERROR is set to YES. You must be careful using this keyword.

You might want to use this keyword in the following scenario:

The data set backups for a particular data set were damaged and cannot be restored, but you still must know what changes were made to the file. You can create an empty data set and try to recover to that specified data set. You will not obtain a good data set with this process, but you will obtain all ADD and UPDATE changes that were made to the data set during the archive process. (You will also obtain the DELETE changes that were applied, but because no records were in this empty data set that you created, you must print the archive and check for DELETE to see each change.)

Although the archive contains the changes, if the recovery runs into an error (for example, the recovery tries to update a record that does not exist), the recovery process usually terminates at this point. The SUPPRESS_RECOVERY_ERROR(YES) keyword instructs RUV to continue the recovery process despite the error.

Warning

Note

In most cases, if the data set was not set to a valid initial state before the recovery, it is not valid after the recovery.

Using the VSAM_FILE keyword

Use the required VSAM_FILE keyword on the RECOVER FORWARD command to specify the data set to be recovered. Specify the fully qualified data set name that identifies the file as the value of the keyword. You cannot specify masking characters in the value. You can code multiple VSAM_FILE keywords on the command.

If you use any of the optional keywords (such as START_TIME and STOP_TIME), you must code the optional keywords and their values after the DSN of the VSAM_FILE keyword but before the closing parenthesis.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Recovery for VSAM 4.1