Invoking a Db2 utility by using the DSNU CLIST command in TSO
One way to run a Db2 online utility is to invoke the DSNU CLIST command under TSO. This command generates a data set with JCL that invokes the DSNUPROC procedure to execute utilities as batch jobs.
Before you begin
About this task
The DSNU CLIST command generates a job that performs only one utility operation. If you need to run more than one utility in a single job, you can invoke the DSNU CLIST command for each utility that you need; then edit and merge all of the output into one job or step.
Procedure
To invoke a Db2 utility by using the DSNU CLIST command in TSO:
Examples
- Example 1: Invoking the DSNU CLIST command for the REORG TABLESPSACE utility
-
The following DSNU CLIST command generates a data set, authorization-id.DSNURGT.CNTL, that contains JCL statements. That JCL invokes the DSNUPROC procedure, which in this case invokes the REORG TABLESPACE utility.
%DSNU UTILITY(REORG TABLESPACE) INDSN(MYREOR.DATA)RECDSN(MYREOR.WORK) RESTART(NO)EDIT(TSO)SUBMIT(YES)
The MYREOR.DATA data set contains the REORG TABLESPACE utility statement. MYREOR.WORK is a temporary data set that is required by REORG TABLESPACE. The TSO editor is invoked to allow editing of the JCL data set, authorization-id.DSNURGT.CNTL. After the data set is edited, the TSO editor then submits the JCL data set as a batch job. This JCL data set is not modified by this CLIST command statement until a new request is made to execute the REORG TABLESPACE utility.
- Example 2: Invoking the DSNU CLIST command for the COPY utility
The following example shows how to invoke the DSNU CLIST command for the COPY utility.
%DSNU UTILITY (COPY) INDSN ('MYCOPY(STATEMNT)') COPYDSN ('MYCOPIES.DSN8D12A.JAN1') EDIT (TSO) SUBMIT (YES) UID (TEMP) RESTART (NO)