DSNTMVSB tool
The DSNTIMVSB tool provides a batch interface for starting and stopping Db2. This tool is invoked by sample jobs DSNTIJSA and DSNTIJSO to support z/OSMF workflows for automating installation and migration of Db2 subsystems.
DD statements for DSNTMVSB
The DSNTMVSB batch program allocates the following DD statements:
- Input DD statements for DSNTMVSB
-
- CMDOPT
-
For command and command parameters used to generate the command to be executed:
- TYPEtype
- Specifies the type of command: Db2
Required.
- COMMAND_PREFIXcommand-prefix
-
Specifies the command prefix that identifies which Db2 subsystem to direct the command to.
Required.
- REMOTE_SYSTEMremote-system
- Specifies the z/OS® system in the sysplex to which the Db2 command is to be routed.
Required if the Db2 command will be routed to a z/OS system that is different from the system where the batch program DSNTMVSB is executing.
- COMMANDcommand
- Specifies the command to be executed: START or STOP
Required.
- PARAMETERSparameters
- Specifies the parameters of the command. START DB2 options, such as PARM(DB2AZNS), if COMMAND=START
STOP DB2 options, such as MODE(FORCE), if COMMAND=STOP
Optional.
- SUBPARAMETERSsubparameters
-
Specifies the subparameters of the command, represented as keyword-value pairs separated by commas:
- CONSNAME=consame
- Where consname is the name of the console used to issue the
command. If not specified, the default is DSNTMVSB.
The specified console must not already be
active.
Optional.
- IRLMPROC=irlmproc
- Where irlmproc is the procedure name of the connected IRLM. If specified, the batch program will poll the status of the specified IRLM job and will report the end of Db2 normal termination when the IRLM job has ended within the specified wait-timeout.
Optional. Valid if COMMAND=STOP and SSNM keyword is not specified.
- SSNM=ssnm
- Where ssnm is the Db2 subsystem name. If specified, the batch program will poll the status of the specified ssnmMSTR job and will report the end of Db2 normal termination when the ssnmMSTR job has ended within the specified wait-timeout.
Optional. Valid if COMMAND=STOP and IRLMPROC keyword is not specified.
- WAIT_TIMEOUTwait-timeout
-
Specifies the amount of time in seconds that this batch program waits for the command to complete and for the command messages to be routed to the console. It includes time spent waiting for the console to be available and polling the irlmproc or ssnmMSTR job status.
1 -900. The default value is 180 seconds.
- Output DD statements used by DSNTIMVSB
-
- SYSPRINT
- For DSNTMVSB messages.
- CMDOUT
- For command messages.
- DSNTRACE
- For trace messages.
DSNTMVSB return codes
DSNTMVSB sets the following return-code and command-completion-code variables to describe the execution status of the command:
- return-code
-
- 0
-
The batch program did not encounter any errors during processing.
command-completion-code is set to 0 or 4.
- 4
- The batch program issued the command but was unable, within the prescribed wait time, to determine the command execution status based on the command messages retrieved. All command messages and any ssnmMSTR or irlmproc job status messages retrieved within the prescribed wait time are written to DD:CMDOUT.
command-completion-code is set to 8 or 16.
- 8
- The batch program issued the command but was unable to determine the command execution status due to an internal error. All the command messages and any ssnmMSTR or irlmproc job status messages retrieved so far are written to DD:CMDOUT.
command-completion-code is set to 8 or 16.
- 12
- The batch program encountered an error during processing. A message describing the error is written to SYSPRINT.
- 16
- The batch program did not encounter any errors during processing. However, the command completed
abnormally.
command-completion-code is set to 12.
- command-completion-code
-
- 0
-
The command completed successfully.
Table 1. Details for command-completion-code 0 Command command-completion-code meaning Message received START DB2 Successful completion DSN9022I cmd_prefix STOP DB2 Successful completion DSN9022I cmd_prefix If system services address space (ssnmMSTR) termination monitoring is requested: message 'ssnmMSTRNOT FOUND' was found in the 'D J, ssnmMSTR' command output.
- 4
-
The command was not processed. For example, Db2 was already stopped when STOP DB2 was requested.
Table 2. Details for command-completion-code 4 Command command-completion-code meaning Message received START DB2 Db2 was already active when the command was issued. DSNY003I cmd_prefix STOP DB2 When the command was issued, Db2 was already stopped or Db2 was in the process of stopping and it stopped successfully. If Db2 MSTR or IRLM address space termination monitoring is not requested, any of the following messages are received: - DSN3106I cmd_prefix
- DSNY004Icmd_prefix and DSN9022I cmd_prefix
If system services address space (ssnmMSTR) termination monitoring is requested, both of the following messages were received:
- DSNY004I cmd_prefix and DSN9022Icmd_prefix
- 'ssnmMSTR NOT FOUND' in 'D J, ssnmMSTR' command output
If IRLM address space termination monitoring is requested, both of the following messages were received:
- DSNY004I cmd_prefix and DSN9022Icmd_prefix
- 'irlm_job NOT FOUND' in 'D J, 'irlm_job' command output
- 8
-
The command started but the completion status is unknown.
Table 3. Details for command-completion-code 8 Command command-completion-code meaning Message received Expected message not received START DB2 Db2 is in the process of starting, but the completion status of the START DB2 command is unknown. DSNY024I cmd_prefix Any of the following messages: - DSN9023I cmd_prefix
- DSNV086E cmd_prefix
- DSN3104I cmd_prefix
- DSN9022I cmd_prefix
- DSN3100I cmd_prefix
STOP DB2 Db2 is in the process of stopping, but the completion status of the STOP DB2 command is unknown. One of the following messages was received: - DSNY002I cmd_prefix
- DSNY004I cmd_prefix
One of the following messages was not received: - DSN9022I cmd_prefix
- DSN9023I cmd_prefix
- If system services address space (ssnmMSTR) termination monitoring is requested, and 'ssnmMSTR NOT FOUND' was not found in 'D J, ssnmMSTR' command output
- If IRLM address space (irlmproc) termination monitoring is requested, and 'irlm_job NOT FOUND' is not found in 'D J, 'irlm_job' command output.
- 12
-
The command completed abnormally.
Table 4. Details for command-completion-code 16 Command command-completion-code meaning Message received START DB2 Abnormal completion. One of the following messages was received: - DSN9023I cmd_prefix
- DSNV086E cmd_prefix
- DSN3100I cmd_prefix
- DSN3104I cmd_prefix
- DSN3106I cmd_prefix
- DSN3107I cmd_prefix
STOP DB2 Abnormal completion. One of the following messages was received: - DSN9023I cmd_prefix
- DSN3107I cmd_prefix
- 16
-
The command output does not satisfy the conditions that are listed for command-completion-code 0, 4, 8, or 12.