Automating Db2 migration by using z/OS Management Facility

You can use z/OSMF to automate the process of migrating Db2 subsystems to Db2 12 for z/OS.

Before you begin

For migrations to Db2 12, this process uses new and modified panels for the installation CLIST. The panels reside in the Db2 12 SDSNSPFP library. You must make the panels available to TSO, ISPF, and the Db2 12 installation CLIST. For more information, see Generating tailored Db2 12 installation, migration, or function level activation jobs.

You must have appropriate authority to complete this task. For details, see Required authorization for installation or migration.

You must use SMP/E to load the required Db2 12 libraries, as described in Making the Db2 product code available. At minimum, generating Db2 installation, migration, or function level activation jobs requires the following Db2 load libraries:
  • prefix.SDSNCLST
  • prefix.SDSNSPFM
  • prefix.SDSNSPFP
  • prefix.SDSNSAMP
  • prefix.SDSNIVPD (only if generating z/OSMF artifacts)

Read the white paper about this process Automating Db2 for z/OS Migration With z/OS Management Facility (white paper).

About this task

By using z/OSMF, you can automate the process of migrating Db2 by creating workflow definition and variable files that you can define one time for reuse across many different Db2 subsystems.

In summary, you run the installation CLIST with certain options to generate the artifacts that define the z/OSMF workflow, including workflow definition files and input variable files. For more information about specific sample workflow artifacts, see Sample workflow artifacts for installation and migration with z/OS Management Facility.

The number of workflow definition and input variable files that you create depends on the environment that you are migrating. You run the CLIST again to generate each workflow definition file. Start of changeFor example, to migrate a single Db2 subsystem, only DSNTIWMS is required.End of change For data sharing groups, you must also create the DSNITWMD workflow definition file to migrate members other than the first member to Db2 12.

Each workflow can use one or more input variable files. Each time that you run the CLIST to generate the workflow artifacts, subsystem parameters that you select are included in the generated input variable file. You can more easily change values in the input variable file when you reuse the workflow for different subsystems. Values for fields that you do not select are hardcoded into the workflow definition file. You might also create extra input variable files to support the efficient migration of several subsystems in your environment.

Procedure

To migrate to Db2 12 by using z/OSMF, use the following general approach:

  1. Prepare for creating workflow definition files by running the DSNTXAZP tool to update the CLIST defaults input member, as described in Updating the CLIST defaults input member: job DSNTIJXZ .
    Important: The DSNTXAZP tool does not update the DSNTIDxx CLIST input member with current settings for the following parameters or panel fields. Update the values as you complete the CLIST, or modify the values directly in the DSNTIDxx member:
    Table 1. Settings not updated by the DSNTXAZP tool in Db2 12
    CLIST Panel Field Name (DSNTIDxx entry)
    DSNTIPA2 The following fields:
    • CATALOG ALIAS (VCATALOG)
    • DEFINE CATALOG (VCATSTAT)
    DSNTIPA3 All fields:
    • PERMANENT UNIT NAME (VOLSDEVT)
    • TEMPORARY UNIT NAME (TVOLSDEVT)
    • CLIST ALLOCATION: VOL/SER (VOLSDAT1)
    • CLIST ALLOCATION: DATA CLASS (DATACLS1)
    • CLIST ALLOCATION: MGMT CLASS (MGMTCLS1)
    • CLIST ALLOCATION: STOR CLASS (STORCLS1)
    • NON-VSAM DATA: VOL/SER (VOLSDAT2)
    • NON-VSAM DATA: DATA CLASS (DATACLS2)
    • NON-VSAM DATA: MGMT CLASS (MGMTCLS2)
    • NON-VSAM DATA: STOR CLASS (STORCLS2)
    • VSAM CATALOG, ...: VOL/SER (VOLSDAT3)
    • VSAM CATALOG, ...: DATA CLASS (DATACLS3)
    • VSAM CATALOG, ...: MGMT CLASS (MGMTCLS3)
    • VSAM CATALOG, ...: STOR CLASS (STORCLS3)
    DSNTIPA4
    • BSDS AND ACTIVE LOG ICF CATALOG ALIAS (VBSDSLOG)
    • LOG COPY 1, BSDS 2: VOL/SER (VOLSDAT6)
    • LOG COPY 1, BSDS 2: DATACLASS (DATACLS6)
    • LOG COPY 1, BSDS 2: MGMTCLASS (MGMTCLS6)
    • LOG COPY 1, BSDS 2: STOR CLASS (STORCLS6)
    • LOG COPY 2, BSDS 1: VOL/SER (VOLSDAT7)
    • LOG COPY 2, BSDS 1: DATA CLASS (DATACLS7)
    • LOG COPY 2, BSDS 1: MGMT CLASS (MGMTCLS7)
    • LOG COPY 2, BSDS 1: STOR CLASS (STORCLS7)
    DSNTIPK The following fields:
    • WORK FILE DB (WKDBNAME)
    • SUBGRP ATTACH (SGRPATNM)
    DSNTIPG1 All fields:
    • INSTALL IC PREFIX (INSICPRE)
    • INSTALL DS PREFIX (INSDSPRE)
    • IC DATA SET UNIT NAME (ICDSDEV)
    • IC TEMPLATE EXPRESSION (ICDSTPLT)
    • IC TEMPLATE DATA CLASS (ICDSDC)
    • IC TEMPLATE MGMT CLASS (ICDSMC)
    • IC TEMPLATE STOR CLASS (ICDSSC)
    DSNTIPH The following fields:
    • COPY 1 NAME (BSDSNAM1)
    • COPY 2 NAME (BSDSNAM2)
    • Archive logs: COPY 1 PREFIX (ARCHPRE1)
    • Archive logs: COPY 2 PREFIX (ARCHPRE2)
    DSNTIPT All fields:
    • TEMP CLIST LIBRARY (NEWCL)
    • SAMPLE LIBRARY (NEWSAMP)
    • CLIST LIBRARY (OUTCL)
    • APPLICATION DBRM (DBRMLIB)
    • APPLICATION LOAD (RUNLIB)
    • DECLARATION LIBRARY (SRCLIB)
    • LINK LIST LIBRARY (DSNLINK)
    • LOAD LIBRARY (DSNLOAD)
    • JDBC AND SQLJ DLLS (DSNLOD2)
    • MACRO LIBRARY (DSNMACS)
    • LOAD DISTRIBUTION (DSNALOAD)
    • EXIT LIBRARY (DSNEXIT)
    • DBRM LIBRARY (DSNDBRM)
    • IRLM LOAD LIBRARY (DSNIRLM)
    • IVP DATA LIBRARY (DSNIVPD)
    • INCLUDE LIBRARY (DSNCHDRS)
    DSNTIPU All fields:
    • IBM® LE RUNTIME LIBRARY (LERUN)
    • IBM LE RUNTIME LIBRARY 2 (LERUN2)
    • IBM LE LINK EDIT LIB (LELKED)
    • IBM LE PRELINK MSG LIB (LEPLMSGL)
    • HIGH LEVEL ASSEMBLER LIB (IASMLIB)
    • C/CPP COMPILER MODULE (CPROG)
    • C/CPP COMPILER LIBRARY (CCOMP)
    • C/CPP HEADER LIBRARY (CHDRS)
    • C/370 COMPILER MESSAGES (CMSGS)
    • C LE PRELINKER PHASE (CPRLK)
    • CPP LE PRELINKER PHASE (CPPPRLK)
    • CPP CLASS LIB HEADERS (CPPHDRS)
    • CPP AUTO CALL LIBRARY (CPPAUTCL)
    • CPP CLASS LIBRARY (CPPCLASS)
    • CPP PROCEDURE LIBRARY (CPPPROC)
    DSNTIPU1 All fields:
    • COBOL COMPILER LIBRARY (ICOBCOMP)
    • COBOL LE PRELINKER PHASE (ICOBPRLK)
    • FORTRAN COMPILER LIBRARY (FORTCOMP)
    • FORTRAN LINK EDIT LIB (FORTLINK)
    • PL/I COMPILER LIBRARY (PLICOMP)
    • PL/I LE PRELINKER PHASE (PLIPRLK)
    DSNTIPW All fields:
    • SYSTEM MACLIB (MACLIB)
    • SYSTEM PROCEDURES (PROCLIB)
    • SORT LIBRARY (SORTLIB)
    • IMS RESLIB (RESLIB)
    • ISPF ISPLINK MODULE (ISPLOAD)
    • GDDM MACLIB (GDDMMACS)
    • GDDM LOAD MODULES (GDDMLOAD)
    • CICS® LOAD LIBRARY (CICSMOD)
    • CICS MACRO LIBRARY (CICSMAC)
    • CICS COBOL LIBRARY (CICSCOB)
    • CICS PL/I LIBRARY (CICSPLI)
    • CICS EXCI LIBRARY (CICSEXCI)
    DSNTIPD All fields:
    • DATABASES (NUMDATAB)
    • TABLES (NUMTABLE)
    • COLUMNS (NUMCOLUM)
    • VIEWS (NUMVIEWS)
    • TABLE SPACES (NUMTABSP)
    • PLANS (NUMPLANS)
    • PLAN STATEMENTS (NUMSTMTS)
    • PACKAGES (NUMPKGS)
    • PACKAGE STATEMENTS (NUMPKSTS)
    • PACKAGE LISTS (NUMPLPL)
    • EXECUTED STMTS (NUMSTMTE)
    DSNTIP9 All fields:
    • 4K SORT PRIMARY SPACE (S4KSPAC)
    • 4K SORT WORK TS'S (S4KNOTS)
    • 4K SORT WORK SEG SIZE (S4KSGSZ)
    • 32K SORT PRIMARY SPACE (S32KSPAC)
    • 32K SORT WORK TS'S (S32KNOTS)
    • 32K SORT WORK SEG SIZE (S32KSGSZ)
    • 4K TEMP PRIMARY SPACE (T4KSPAC )
    • 4K TEMP WORK TS'S (T4KNOTS)
    • 4K TEMP WORK SEG SIZE (T4KSGSZ)
    • 32K TEMP PRIMARY SPACE (T32KSPAC)
    • 32K TEMP WORK TS'S (T32KNOTS)
    • 32K TEMP WORK SEG SIZE (T32KSGSZ)
    DSNTIPM The following fields:
    • SUBSYSTEM NAME (MVSNAME)
    • DB2 VTAM PASSWORD (DDPASS)
    DSNTIPX The following fields:
    • WLMENV (WLMENV)
  2. Create the workflow definition files and input variable files by running the installation CLIST and specifying USE Z/OSMF WORKFLOW ===> YES on panel DSNTIPA1.
    Start of changeWhen you specify that option, the CLIST runs with modified and extra panels that support generation of the z/OSMF workflow artifacts.End of change
    Tip: You can specify an HFS or zFS directory for storing the z/OSMF artifacts. Specify the directory in the PATH FOR Z/OSMF ARTIFACTS field on panel DSNTIPM1.

    For more information about the specific panels that support the generation of z/OSMF workflow artifacts, see Installation panels for installing or migrating with z/OSMF.

    1. Start of changeCreate the workflow definition file for migrating the first subsystem to Db2 12 by running the installation CLIST and specifying the following field values on panel DSNTIPA1: End of change
      • USE Z/OSMF WORKFLOW ===> YES
      • INSTALL TYPE ===> MIGRATE
      • DATA SHARING ===> YES, with option 1. Group selected on DSNTIP0A

      As you complete the CLIST, select each subsystem parameter that you want to include in the input variable file.

      Start of changeWhen you complete the CLIST, the DSNTIWMS and DSNTIWMN workflow definition files and associated input variable files are created.End of change
    2. If you are migrating a data sharing group, create the workflow definition file for migrating other data sharing members (DSNITWMD) by running the CLIST again and setting the following options on panel DSNTILA1:
      • USE Z/OSMF WORKFLOW ===> YES
      • INSTALL TYPE ===> MIGRATE
      • DATA SHARING ===> YES, with option 2. Member selected on DSNTIP0A

      As you complete the CLIST, select each subsystem parameter that you want to include in the input variable file.

      When you complete the CLIST, the DSNITWMD workflow definition file and the DSNTIVMD input variable file are created.
  3. Create extra input variable files, as required to support the efficient migration of your environment.
    The goal is to structure the input variable files so that you can specify subsystem parameters that are common across many subsystems in a single file.
    For an example of how you might and structure and name a set of input variable files for migrating a particular environment, see Example of migrating a data sharing group to Db2 12 by using z/OSMF.
    Important: All input variable files must include the following variables, with supported values:
    INSTYPE=
    The installation type. The following values are accepted:
    ACTV

    Activating a Db2 12 function level.

    MNDS
    Migration of a non-data-sharing subsystem to Db2 12.
    MDS1
    Migration of the first member of a data sharing group to Db2 12.
    MDSS
    Migration of subsequent members of a data sharing group to Db2 12
    MNFM
    Activation of Db2 12 new function. (Function level 500 or higher.)
    INDS
    Installation of a non-data-sharing Db2 subsystem.
    IDS1
    Installation of the first member of a data sharing group
    IDSS
    Adding a member to a data sharing group
    NEWSAMP2=
    NEWSAMP2 is the partitioned data that contains tailored JCL templates for the z/OSMF workflow. You must change this value if the workflow artifacts are moved to a different location.
    B=
    The indicator for line breaks in z/OSMF. Do not change or remove this variable in a generated input variable file.
  4. Create the workflow instances in z/OSMF.
    1. Specify the path of the workflow definition file and the input variable file.
      The path of the input variable file is optional, but it is best to always specify it. Otherwise, z/OSMF prompts you to provide the variable values during execution, preventing full automation of the process.
    2. Specify a name for the workflow instance.
      Tip: Specify a name that describes the purpose of the workflow and includes the name of the target system.
    3. Assign all workflow steps to the same person to fully automate the migration process.
    4. Validate the JCL job and the substituted input variables.
      You can find the input variable files and the JCL jobs with the substituted input variables on the Perform tab for the workflow in z/OSMF.
      1. Review the input variables. You can edit the values of input variables during your review, but any changes that you make apply to this workflow instance only.
      2. In the Create JOB statement step, z/OSMF prompts you to review and update the JOB statement JCL. You can specify appropriate CLASS or MSGCLASS values.

        Start of changeIf installation or migration step requires authorization, you can also specify the USERNAME and PASSWORD. For detailed information about required authorizations see Required authorization for installation or migration.End of change

      3. Review the JCL including the JOB statement. You can click Edit JCL to make changes. However, any changes that you make apply only to this workflow instance. It is best to make any changes that apply to all instances in the JCL template before you create the instances.
  5. Start running the workflow steps.
    You can run the workflow steps in z/OSMF, or by embedding z/OSMF REST services in your own automation programs.
    • For a single Db2 subsystem, run the migration steps in the following order:
      1. Start of changeRun DSNTIWMS to migrate to subsystem to Db2 12.End of change
      2. Start of changeRun DSNTIWMN to activate Db2 12 new function (function level 500 or higher).End of change
    • For a data sharing group, run the migration steps in the following order:Start of change
      1. Run DSNTIWMS to migrate the first member to Db2 12.
      2. Run DSNTIWMD to migrate each subsequent member to Db2 12.
      3. Run DSNTIWMN to migrate the data sharing group to activate Db2 12 new function (function level 500 or higher).
      End of change
    1. Certain workflow steps, such as the pre-migration job DSNTIJPM, might need to be run repeatedly.
      For such repeated steps, you can select Manually perfrom the selected step. After you run the step, it is marked Completed in z/OSMF. However, you can still rerun this step. That is, you can take the required actions that are identified in the premigration reports, and then return to z/OSMF to repeat this step until all premigration tasks are completed.
    2. After any manual steps are complete, select Automatically perform the selected step, and all subsequent steps... on the Perform Automated Step page.
      z/OSMF runs all subsequent steps in order until all steps complete successfully, or until an error is encountered.
    3. If errors are encountered, check the job output on the z/OSMF Status tab.
      The maximum return code that a step tolerates is defined the workload definition file, and it might be a return code other than 0. The maximum return code for most steps is 0 or 4.

Example of migrating a data sharing group to Db2 12 by using z/OSMF

Assume that a data sharing group contains members, 12 members that for online transaction processing (OLTP) workloads, and 4 members for online analytics processing (OLAP) workloads.

  • The group consists of 16 members named like DBxA, where x is numbers 1 - 9 and letters A - G.
  • Twelve members, DB1A - DBCA, process OLTP workloads.
  • Four members, DBDA - DBGA, process OLAP workloads.
  • Start of changeFor migration to Db2 12 function level 100, the following artifacts are used:End of change
    • Member DB1A uses the DSNTIWMS workflow.
    • All other members use the DSNTIWMD workflow.
    • Members that process OLTP workloads share the DSNTIVTP input variable file.
    • Members that process OLAP workloads share the DSNTIVAP input variable file.
    • Every member also has an input variable file for member-specific parameters, each named like DSNTIVxA, where x corresponds to the matching character in the subsystem name.
  • Start of changeFor the activation of function level 500 or higher, a single members uses the DSNTIWMN workflow and the DSNTVNTP input variable file.End of change

The following table shows the members of the example data sharing group and the workflow artifacts that can be used to migrate each subsystem.

Table 2. Workflow artifacts for migrating an example 16-member data sharing group
Subsystem use Subsystem name Workflow files Variables files
OLTP DB1A DSNTIWMS and DSNTIWMN DSNTIV1A and DSNTVNTP
DB2A DSNTIWMD DSNTIV2A
DB3A DSNTIV3A
DB4A DSNTIV4A
DB5A DSNTIV5A
DB6A DSNTIV6A
DB7A DSNTIV7A
DB8A DSNTIV8A
DB9A DSNTIV9A
DBAA DSNTIVAA
DBBA DSNTIVBA
DBCA DSNTIVCA
OLAP DBDA DSNTIVDA
DBEA DSNTIVEA
DBFA DSNTIVFA
DBGA DSNTIVGA
Start of change

What to do next

Activate function level 500 or higher, as described in Activating Db2 function levels by using z/OSMFEnd of change