• August 15, 2022

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 pbartak@rocketsoftware.com. If you found this blog helpful, please share it or leave a comment.

Happy cloning!

Paul Bartak 7 Posts

Paul Bartak has been working with IBM databases since 1985, including the first version of DB2 on MVS. As an IBM customer for 14 years Paul worked in Application Development, Database Administration, and DBA. He joined IBM in 1999 as an Information Management Technical Specialist, teaming with the Sales force to present, design, install, demonstrate, and evaluate IBM Information Management solutions in a pre-sales environment; gaining multiple certifications in Database Administration, Data Replication, Blockchain, and Cloud Computing. Paul developed the four generations of the DB2 Migration Planning Workshops from DB2 V8 for z/OS, to DB2 11 for z/OS; and enablement for Db2 for z/OS pureXML and Temporal features. Currently, as a Distinguished Engineer with Rocket Software, Paul is focused on the tools used to maximize DB2 for z/OS value, with emphasis in database cloning and DevOps processes. He supports multiple Db2 User Groups, has been a speaker at several IDUG and Insight/Think conferences, is a Redbook/Redpaper author, and IBM Champion.


  • Leesa Reply

    May 4, 2021 at 5:54 am

    Thanks for sharing

Leave a Comment

Your email address will not be published.