Invoking a Db2 online utility by creating the JCL data set yourself

Db2 online utilities run as standard z/OS® jobs. You can either write the JCL for these jobs yourself or use tools to generate some or all of the JCL for you.

About this task

To limit the amount of JCL that you need write, you can use The supplied JCL procedure (DSNUPROC) for invoking a Db2 online utility.

Procedure

To invoke a Db2 online utility by creating the JCL data set yourself:

Include the following JCL statements:
  • The JOB statement that is required by your installation standards.
  • The JOBLIB or STEPLIB DD statements that are required to access Db2.
  • An EXEC statement.

    The statement can specify a procedure that contains the required JCL, such as DSNUPROC, or it can be of the following form:

    //stepname  EXEC PGM=DSNUTILB,PARM='system,[uid],[utproc]'

    The brackets, [ ], indicate optional parameters. The parameters have the following meanings:

    DSNUTILB
    The utility control program. The program must reside in an APF-authorized library.
    system
    The Db2 subsystem.
    uid
    The unique identifier for your utility job.

    Do not reuse the utility ID of a stopped utility that has not yet been terminated. If you do use the same utility ID to invoke a different utility, Db2 tries to restart the original stopped utility with the information that is stored in the SYSIBM.SYSUTIL directory table.

    utproc
    The restart processing behavior. Specify this option only when you want to restart the utility job. You can specify one of the following values:
    'RESTART'
    Restarts the utility at the most recent commit point. This option has the same meaning as 'RESTART(CURRENT).'
    'RESTART(CURRENT)'
    Restarts the utility at the most recent commit point. This option has the same meaning as 'RESTART.'
    'RESTART(PHASE)'
    Restarts the utility at the beginning of the phase that executed most recently.
    Start of change'PREVIEW'End of change
    Restarts the utility in preview mode. While in preview mode, the utility checks for syntax errors in all utility control statements, but normal utility execution does not take place.
    Example EXEC statement:
    //stepname
      EXEC PGM=DSNUTILB,PARM='DSN,TEMP'
  • Any required DD statements. For information about the DD statements that each utility needs, see Data sets that online utilities use.