Restore skeletons

When a backup is originally registered through the file copy notification service, a five character product identifier is associated with the backup.

The product identifier is a concatenation of the three character backup_product and two character backup_type parameters that are specified when the service is called. For example, you can specify a product identifier of 'REPRO' when notifying CICS® VR of backups made using the IDCAMS REPRO utility.

Prior to selecting a registered backup for restore, a restore skeleton must be defined to CICS VR for the product identifier associated with the selected backup. The restore skeleton must either be added as a member to the SDWWSENU data set, using the characteristics of this PDS, or as a member of another PDS allocated to the DWWSLIB ddname. The restore skeleton member name must follow this naming convention:

DWWxxxxx (where xxxxx is the product identifier)

For example, a restore skeleton that was created for the backups registered with the 'REPRO' product identifier must be defined with the DWWREPRO member name.

Note: CICS VR provides a sample DWWREPRO restore skeleton in the SDWWSENU data set.

The restore skeleton must contain the commands required to restore the associated backup type. For example, if the target data set already exists, the restore skeleton associated with backups created by IDCAMS REPRO might contain commands to call REPRO to copy records from the backup data set into the target data set.

To make a restore skeleton usable with all backups of the same type registered for various VSAM spheres, you can include variables within the skeleton. CICS VR supports a number of variables that can be used to retrieve information about the backup and VSAM data set that is stored in the RCDS, such as backup name and data set name, along with parameters specified during recovery creation through the CICS VR panel interface, such as new target data set name, volume, and unit. For example, in the REPRO skeleton, you might include the &CBUDSN variable name to retrieve the original backup data set name that is stored in the RCDS, along with other variables.

When a backup that was registered through the file copy notification service is selected for restore through the CICS VR panel interface, CICS VR adds the associated restore skeleton as a step in the produced recovery job. All variables specified in the restore skeleton are substituted with their associated values. For example, when a backup data set that is named 'EXAMPLE.REPRO' is selected for restore, the &CBUDSN variable name is substituted with the value EXAMPLE.REPRO.

This table lists all restore skeleton variables that are supported by CICS VR. When specifying a variable in a restore skeleton, be sure to precede the variable name with an ampersand (&).

Table 1. Restore skeleton variables supported by CICS VR
Variable name Format Length (Bytes) Description Source
CBUDSN Char 44 Backup data set name. RCDS
CSPH Char 44 Name of the original VSAM data set for which the backup was created. RCDS
CBPROD Char 3 Backup product identifier as specified in the backup_product parameter during notification. RCDS
CBTYPE Char 2 Backup type identifier as specified in the backup_type parameter during notification. RCDS
CNEWQ Char 3 Indicates if a new target data set name was entered for restore and recovery through the CICS VR panel interface during recovery construction. This variable contains one of the following values:

YES - A new data set name was specified through the panel interface.

NO - A new data set name was not specified through the panel interface.

Generated by CICS VR
CNEWDSN Char 44 New target data set name entered through the CICS VR panel interface for restore and recovery. Panel interface
CTODSN Char 44 The data set name that is used for restore and recovery. If a new data set name was entered through the CICS VR panel interface, this variable contains the new data set name. If a new data set name was not entered through the CICS VR panel interface, this variable contains the original name of the VSAM data set for which the backup was created. Panel interface or RCDS
CNEWVOLQ Char 3 Indicates if a new volume and unit was specified for restore through the CICS VR panel interface during recovery construction. This variable contains one of the following values:

YES - A new volume and unit was specified for restore processing through the CICS VR panel interface.

NO - A new volume and unit was not specified for restore processing through the CICS VR panel interface.

Generated by CICS VR
CNEWUNIT Char 8 New unit for restore entered through the CICS VR panel interface during recovery construction. Panel interface
CNEWVOL Char 6 New volume for restore entered through the CICS VR panel interface during recovery construction. Panel interface
CBVOLTBL Char 8 Table that contains the volumes on which the backup resides, as entered in the optional volume_list_area parameter during notification. This table can be used to reference each volume using the CBVOL variable. Generated by CICS VR
CBVOLNUM Char 3 Number of volumes on which the backup resides, as specified in the optional number_of_volumes parameter during notification. RCDS
CBVOL Char 6 Volume on which the backup resides, as specified in the optional volume_list_area parameter during notification. Use this variable with the CBVOLTBL variable to reference each volume name individually. RCDS
CBUNIT Char 8 Unit (device type) of the volume(s) on which the backup resides, as specified in the optional device_type parameter during notification. RCDS
CBSEQNUM Char 4 Sequence number of the backup, as specified in the optional sequence_number variable during notification. RCDS
CBLOCAL Char 15 Backup date and time in local format, as specified in the backup_date_local and backup_time_local parameters during notification. The output format of this variable is yy.ddd hh:mm:ss RCDS
CBDATEL Char 6 Backup date in local format, as specified in the backup_date_local parameter during notification. The output format of this variable is yy.ddd RCDS
CBTIMEL Char 8 Backup time in local format, as specified in the backup_time_local parameter during notification. The output format of this variable is hh:mm:ss RCDS
CBGMT Char 15 Backup date and time in GMT format, as specified in the backup_date_GMT and backup_time_GMT parameters during notification. The output format of this variable is yy.ddd hh:mm:ss RCDS
CBDATEG Char 6 Backup date in GMT format, as specified in the backup_date_GMT parameter during notification. The output format of this variable is yy.ddd RCDS
CBTIMEG Char 8 Backup time in GMT format, as specified in the backup_time_GMT parameter during notification. The output format of this variable is hh:mm:ss RCDS
CBPMODE Char 1 The processing mode of the notification service, as requested in the PROCESSING MODE bit of the optional operation_flags parameter during notification. The value of this variable is one of the following:

A - Asynchronous processing mode requested

S - Synchronous processing mode requested

RCDS
CBPBWO Char 1 The value of the PROCESS BWO bit of the optional operation_flags parameter specified during notification. The value of this variable is one of the following:

Y - Bit was set on during notification

N - Bit was set off during notification

RCDS
CBSONWT Char 1 The value of the SHARP ONLINE BACKUP WITH TIEUP LOG RECORD bit of the optional status_flags parameter specified during notification. The value of this variable is one of the following:

Y - Bit was set on during notification

N - Bit was set off during notification

RCDS
CBFONWT Char 1 The value of the FUZZY ONLINE BACKUP WITH TIEUP LOG RECORD bit of the optional status_flags parameter specified during notification. The value of this variable is one of the following:

Y - Bit was set on during notification

N - Bit was set off during notification

RCDS
CBSONWOT Char 1 The value of the SHARP ONLINE BACKUP WITHOUT TIEUP LOG RECORD bit of the optional status_flags parameter specified during notification. The value of this variable is one of the following:

Y - Bit was set on during notification

N - Bit was set off during notification

RCDS
CBFONWOT Char 1 The value of the FUZZY ONLINE BACKUP WITHOUT TIEUP LOG RECORD bit of the optional status_flags parameter specified during notification. The value of this variable is one of the following:

Y - Bit was set on during notification

N - Bit was set off during notification

RCDS
CBWOTIME Char 15 The value of the optional BWO_timestamp parameter as specified during notification. The value of the variable, if a value exists, is in the format: yy.ddd hh:mm:ss RCDS
CBRECLOC Char 15 The value of the optional recovery_timestamp_local parameter as specified during notification. The value of the variable, if a value exists, is in the format yy.ddd hh:mm:ss RCDS
CBRECGMT Char 15 The value of the optional recovery_timestamp_GMT parameter as specified during notification. The value of the variable, if a value exists, is in the format yy.ddd hh:mm:ss RCDS
CBOPTTBL Char 8 Table that contains the value specified for the optional optional_information parameter during notification. The specified optional information can contain a maximum of 256 bytes that CICS VR divides into four rows of 64 bytes in this table. This table can be used to reference each 64 bytes of optional information with the CBINFO variable. Generated by CICS VR
CBINFO Char 64 Use this variable with the CBOPTTBL variable to reference each row of 64 bytes of the value specified for the optional optional_information parameter during notification. RCDS
CBDDNTBL Char 8 Table that contains the ddnames, with corresponding APPLIDs, associated with the VSAM data set, as specified in the optional ddname_and_APPLID parameter during notification. This table can be used to reference each ddname and associated APPLID using the CBDDN and CBAPPLID variables. Generated by CICS VR
CBNUMDDN Char 3 Number of DDNAME/APPLID pairs associated with the VSAM data set, as specified in the optional number_of_ddnames parameter during notification. RCDS
CBDDN Char 8 DDNAME associated with the VSAM data set, as specified in the optional ddname_and_APPLID parameter during notification. Use this variable with the CBDDNTBL variable to reference each ddname individually. RCDS
CBAPPLID Char 8 APPLID associated with the VSAM data set, as specified in the optional ddname_and_APPLID parameter during notification. Use this variable with the CBDDNTBL variable to reference each APPLID individually. RCDS
CBLSNAME Char 26 Forward recovery log stream associated with the VSAM data set, as specified in the optional log_stream_parameter during notification. RCDS
CBDSTYPE Char 1 VSAM data set type, as specified in the optional data_set_type parameter during notification. The value of this variable, if a value exists, is one of:
K = KSDS
E = ESDS
R = RRDS
V = VRRDS
RCDS
CBCISIZE Char 6 Control interval size of the VSAM data set, as specified in the optional CI_size parameter during notification. RCDS
CBMAXREC Char 6 Maximum record length of the VSAM data set, as specified in the optional maximum_record_length parameter during notification. RCDS
CBKEYPOS Char 6 Key position of the VSAM data set, as specified in the optional key_position parameter during notification. RCDS
CBKEYLEN Char 6 Key length of the VSAM data set, as specified in the optional key_length parameter during notification. RCDS
Null variable value
CICS VR allows any of the variables described in the table Table 1 to be coded in a restore skeleton. However, CICS VR might not contain information about a specified variable in the RCDS. For example, control_interval_size is an optional input parameter of the file copy notification service. The CICS VR RCDS does not contain a value for the control interval size associated with a backup if it was not specified during notification. CICS VR substitutes a null string for all specified restore skeleton variables about which CICS VR does not contain information.
Restore skeleton logic
In most cases, restore skeleton variables can simply be placed within the commands and keywords required to restore the selected backup type. For example, a REPRO skeleton might contain the following statement to include the target data set name within the OUTDATASET keyword:
OUTDATASET(&CTODSN.)
However, some additional logic might be required within your skeleton to:
  • Traverse through a table of similar items, such as volume names.
  • Verify the existence of a variable before including it within a command or keyword.

Logic can be coded within your restore skeletons using the statements defined in the ISPF Dialog Developer's Guide and Reference. Below are a few examples of the most common logic that can be added to restore skeletons:

Table processing

CICS VR allows a few repeatable parameters, volume list, optional information, and ddname and APPLID list, to be specified to the file copy notification service. CICS VR stores these repeatable values in the RCDS and allows them to be retrieved from a table by a restore skeleton. To process a table within a restore skeleton, use the )DOT and )ENDDOT statements:

Figure 1. Table processing restore skeleton sample
)DOT tablename
         additional statements
)ENDDOT

Any statements between the )DOT and )ENDDOT statements are processed for each row in the specified table. See Example using the CICS VR NOTIFY utility and restore skeletons for an example of using the )DOT and )ENDDOT statements.

Variable existence testing

As previously mentioned, information for some optional parameters of the file copy notification service might not have been specified during notification. Therefore, CICS VR might not contain values in the RCDS for all available restore skeleton variables.

To verify the existence or value of a variable before including it in your JCL or commands and keywords, you can use the )SEL and )ENDSEL statements, as shown:

Figure 2. Variable existence restore skeleton sample
)SEL &varname NE &Z
         additional statements
)ENDSEL

Note: &Z is the null string system variable.

The relational expression (&varname NE &Z) is evaluated for a true or false condition. If the condition is true, the skeleton input records between the )SEL and the corresponding )ENDSEL are processed. If the condition is false, these records are skipped. See Example using the CICS VR NOTIFY utility and restore skeletons for an example of using the )DOT and )ENDDOT statements.

Testing for new information

Code your restore skeletons so that they can process any new information, such as target data set name, volume, and unit, that might have been specified through the CICS VR panel interface during recovery construction. To help simplify the this logic, a few additional variables are provided by CICS VR. CNEWQ and CNEWVOLQ contain a value of 'YES' if a new value has been specified for either the target data set name or volume and unit respectively though the panel interface. Optionally, you can also use the CTODSN variable. CTODSN contains the new target data set name if it was specified through the panel interface, otherwise it contains the original data set name.

For example, you can code the following select statement to check if a new volume and unit was specified during recovery construction.

Figure 3. Example of using &CNEWVOLQ in a restore skeleton
)SEL &CNEWVOLQ=YES
         volume and unit processing statements
)ENDSEL

In this example , the processing statements within the )SEL and )ENDSEL statements are only processed if a new volume and unit was specified through the CICS VR panel interface during recovery construction.

See the ISPF Dialog Developer's Guide and Reference for further details about coding statements within an ISPF skeleton.