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.
To invoke a DB2 online utility by creating the JCL data set yourself:
- 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 EXEC 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:
Example EXEC statement:
- The utility control program. The program must reside in an APF-authorized library.
- The DB2 subsystem.
- 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.
- The restart processing behavior. Specify this option only when
you want to restart the utility job. You can specify one of the following
- Restarts the utility at the most recent commit point. This option has the same meaning as 'RESTART(CURRENT).'
- Restarts the utility at the most recent commit point. This option has the same meaning as 'RESTART.'
- Restarts the utility at the beginning of the phase that executed most recently.
- 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.
//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.