This topic describes how to use two different projects to generate the rollback CDL file and the other rollback artifacts respectively.
This topic describes how:
Important
If you are using plug-in variables file-based symbolic variables when specifying the PDS and member that contains rollback artifacts, you must specify the corresponding variable from the Data Set Names for Rollback section of the plug-in variables file. For more information, see Sample-plug-in-variables-file-AMI_DevOps-properties.
Use the following procedure to generate the rollback CDL file for your project.
- Create a project or open an existing project for configuration. For more information, see the following topics:
Add the following build steps sequentially and configure them:
| |
---|
| BMC AMI DevOps Common - Authentication |
| BMC AMI DevOps Schema Mgmt for Db2 - Schema Change Migration |
| BMC AMI DevOps Schema Mgmt for Db2 - Output Transmission |
| BMC AMI DevOps Common - JCL Execution |
| BMC AMI DevOps Common - Clean Up |
When configuring the BMC AMI DevOps Schema Mgmt for Db2 - Schema Change Migration build step, do the following:
- In the Before Making Schema Changes section, do the following:
- In the Select Baseline Type Before Execution field, select one of the following baseline types:
- Pre-Execution Baseline (baseline created with database structures only)
- Full-Recovery Baseline (baseline created with database structures and data)
- Enter the baseline profile name in the Baseline Profile Name (before execution) field.
- Enter the baseline name in the Baseline Name (before execution) field.
- In the Rollback Compare section, do the following:
Select the Generate CDL to Rollback Schema Changes check box.
Important
You can only select the Generate CDL to Rollback Schema Changes check box if you have also selected a value other than None in the Select Baseline Type Before Execution field.
- Enter a partitioned data set (PDS) and member name in the Rollback PDS and Member Name (CDL) field.
- Save your configuration.
- Build the project. For more information, see To build a project .
This implements the defined schema changes and also generates the rollback CDL file.
After generating a rollback CDL file for your project, you can use the following procedure to generate the other rollback artifacts, which can be used to roll back the implemented schema changes.
- Create a project or open an existing project for configuration.
Add the following build steps sequentially and configure them:
| |
---|
| BMC AMI DevOps Common - Authentication |
| BMC AMI DevOps Schema Mgmt for Db2 - Schema Change Migration |
| BMC AMI DevOps Schema Mgmt for Db2 - Output Transmission |
| BMC AMI DevOps Common - Clean Up |
When configuring the BMC AMI DevOps Schema Mgmt for Db2 - Schema Change Migration build step, do the following:
In the General Input Fields section, enter a different work ID in the Work ID Name field from the one you entered when configuring the project that generated the rollback CDL file.
Tip
We recommend adding a _RB suffix to the work ID you entered when configuring the project that generated the rollback CDL file.
Example
In the Work ID Name field, if you entered ${Job_ID} when configuring the project that generated the rollback CDL file, you can enter ${Job_ID}_RB when configuring the project that generates the other rollback artifacts.
- Select the Skip Comparison check box.
- In the Import Input Fields section, in the CDL PDS and Member Name field, enter the PDS and member name of the rollback CDL file.
- In the Analysis Input Fields section,
- In the Worklist PDS and Member Name field, enter the PDS and member name of the rollback worklist.
- In the Impact Report PDS and Member Name field, enter the PDS and member name of the rollback impact report.
- In the Execution JCL Generation Input Fields section, in the Execution JCL PDS and Member Name field, enter the PDS and member name of the rollback execution JCL.
(optional) In the Job Information section, in the Analysis Input Stream field, add the following lines if you are rolling back schema changes using a full-recovery baseline that you created using the work ID of the project that generated the rollback CDL file:
BLNAME baselineName
BLRECOVER
The baselineName variable represents the baseline name of the full-recovery baseline.
See the following sample value of the Analysis Input Stream field:
//*Analysis Input
//ANALYSIS.ALURPT DD DISP=SHR,
// DSN=&IMPRPT
//ANALYSIS.ALUIN DD *
SSID ${SSID}
WORKID ${Work ID Owner}.${Work ID Name}
INCLUDE (DATA AMS SQL )
BLNAME baselineName
BLRECOVER
When configuring the BMC AMI DevOps Schema Mgmt for Db2 - Output Transmission build step, do the following:
Important
The BMC AMI DevOps Schema Mgmt for Db2 - Output Transmission build step lets you download any or all of the rollback artifacts to the destination directory. To download a rollback artifact, enter its respective source PDS name.
You must enter the source PDS name for at least one rollback artifact.
- In the Source PDS Name (CDL) field, enter the PDS of the rollback CDL file.
- In the Source PDS Name (WORKLIST) field, enter the PDS of the rollback worklist.
- In the Source PDS Name (EXEC_JCL) field, enter the PDS of the rollback execution JCL.
- In the Source PDS Name (IMPACT REPORT) field, enter the PDS of the rollback impact report.
- In the Source Member Name field, enter the file name of the rollback member on the mainframe.
- In the Destination Directory Name field, enter the directory into which you want to download all the rollback artifacts.
- In the Destination File Name field, enter a value that can be used to generate the file names for all the rollback artifacts.
- Save your configuration.
- Build the project.
This generates the rollback execution JCL.