Automating Db2 installation by using z/OS Management Facility

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

Before you begin

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)

About this task

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

Procedure

To install Db2 subsystems by using z/OSMF, use the following general approach:

  1. Start of change Identify an existing Db2 subsystem that is the model for your new installations, or install one as described in Installing Db2 12. End of change
  2. Create the workflow definition files:
    1. Start of changeOn the existing Db2 subsystem that is the model for the new installations, run the DSNTXAZP tool to update the CLIST defaults input member, as described in Updating the CLIST defaults input member: job DSNTIJXZ .End of change
      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. Run the installation CLIST, and specify the following field values of panel DSNTIPA1: USE Z/OSMF WORKFLOW ===> YES and INSTALL TYPE ===> INSTALL.
      The CLIST runs with modified panels and extra panels to support generation of a z/OSMF workflow.
      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, see Installation panels for installing or migrating with z/OSMF.
    3. Complete the CLIST as described in Generating tailored Db2 12 installation, migration, or function level activation jobs. As you complete the CLIST, select each installation parameter that you want to include in the input variable file for the z/OSMF workflow.

      You can more easily change values in the input variable file when you reuse the workflow for different subsystems. For each field that you do not select, the value that you specify in the panel is hardcoded into the workflow definition file.

      Tip: To reduce the size and difficulty of managing your input variable files, choose only input fields that are likely to be different across different Db2 subsystems in your environment.
    4. If you are installing multiple Db2 subsystems, run the CLIST again and specify the following field values on panel DSNTILA1: USE Z/OSMF WORKFLOW ===> YES and INSTALL TYPE ===> UPDATE.
      The CLIST runs with an abbreviated set of panels to create input variable files for subsystems after the first subsystem.

      Repeat this step for each subsystem after the first.

  3. 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. For example, you might use the following name: V10 to V11 CM non-data-sharing - DB2A, where DB2A is the name of the target subsystem.
    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 only to this workload 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.
  4. 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.
    1. After any prerequisite 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.
    2. 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.