DB2 Cloning Tool: Enabling Db2 for z/OS Provisioning (PH00169)
Are you looking for a way for Db2 for z/OS to participate in your company’s DevOps processes? Have the requests for test object and data creation, and refreshes, in support of Agile sprints, increased as developers strive to meet business demands?
The Cloning Tool stands ready to help.
Sure, the IBM Db2 Cloning Tool can create test environments, QA environments, and satisfy forensics and auditing use cases. But this blog is focused on DB2 for z/OS DevOps provisioning.
PH00169 delivers the z/OSMF workflow artifacts needed to enable REST calls to invoke Application Cloning to create Db2 objects selectively and copy data to meet these demands.
After applying PH00169, you’ll find 5 CKZWF* members in the SCKZJCL library, and a full set of instructions in Ch. 23 of the current User’s Guide.
- CKZWFCPY is the job to set up the following artifacts for use.
- CKZWFXML provides the z/OSMF Workflow Definition File, which defines the necessary variables and steps to perform a provisioning service via z/OSMF.
- CKZWFVAR is a text file of the variables defined in the XML file (described above) and the variable default values.
- CKZWFSRJ is the template for the Cloning Tool source job. This set of JCL, and parameters, are customized with the value from the above mentioned variables and submitted to complete step 1 of 2 for application clone (provisioning).
- CKZWFTRJ is the template for the target job. As with CKZWFSRJ, this is customized and submitted after the Source job to complete step 2 of 2.
Workflows in z/OSMF must first be created, and then invoked. For each provisioning request, create the customized workflow, and then invoke it. Both of these operations can be accomplished via REST calls, allowing them to fit into your DevOps pipeline of choice. See the section titled, “Running workflow via REST services” in Ch. 23 of the User’s Guide.
- The POST command (under Procedure, item 1) shows how to create an instance of a provisioning workflow via REST. The attributes that define the workflow to z/OSMF and the option to substitute values for the variables defined within the workflow are part of this call. Note the “variables” array. Each of those variables are defined in the Workflow Definition File, likely have defaults defined in the Variable Input File, and can be customized during the definition in this call. This call will return a Workflow Key Value, which is the key to invoke the created workflow.
- The PUT command (under Procedure, item 2) includes the Workflow Key, noted above, to invoke the workflow.
Output from this execution will reside in z/OSMF within the workflow step, under the Status tab, and in the z/OS job output queue.
The next time you are asked if Db2 for z/OS can participate in DevOps for provisioning Db2 objects and data, this is one of the options at your disposal.
If you still have questions, I can help. Contact me at firstname.lastname@example.org. If you found this blog helpful, please share it or leave a comment.