Create MQ Service (CRTMQMSVC)
Where allowed to run: | Threadsafe: |
---|---|
All environments (*ALL) | Yes |
The Create MQ Service (CRTMQMSVC) command creates a new MQ service definition, specifying those attributes that are to be different from the default.
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
SVCNAME | Service name | Character value | Required, Key, Positional 1 |
MQMNAME | Message Queue Manager name | Character value, *DFT | Optional, Key, Positional 2 |
REPLACE | Replace | *NO, *YES | Optional, Positional 3 |
TEXT | Text 'description' | Character value, *BLANK, *SYSDFTSVC | Optional, Positional 4 |
STRCMD | Start program | Single values: *SYSDFTSVC, *NONE Other values: Qualified object name | Optional, Positional 5 |
Qualifier 1: Start program | Name | ||
Qualifier 2: Library | Name | ||
STRARG | Start program arguments | Character value, *BLANK, *SYSDFTSVC | Optional, Positional 6 |
ENDCMD | End program | Single values: *SYSDFTSVC, *NONE Other values: Qualified object name | Optional, Positional 7 |
Qualifier 1: End program | Name | ||
Qualifier 2: Library | Name | ||
ENDARG | End program arguments | Character value, *BLANK, *SYSDFTSVC | Optional, Positional 8 |
STDOUT | Standard output | Character value, *BLANK, *SYSDFTSVC | Optional, Positional 9 |
STDERR | Standard error | Character value, *BLANK, *SYSDFTSVC | Optional, Positional 10 |
TYPE | Service type | *SYSDFTSVC, *CMD, *SVR | Optional, Positional 11 |
CONTROL | Service control | *SYSDFTSVC, *MANUAL, *QMGR, *STARTONLY | Optional, Positional 12 |
Service name (SVCNAME)
The name of the new MQ service definition.
The possible values are:
- service-name
- Specify the name of the service definition. The maximum length of the string is 48 bytes.
Message Queue Manager name (MQMNAME)
Specifies the name of the queue manager.
The possible values are:
- *DFT
- Use the default queue manager.
- queue-manager-name
- The name of a message queue manager.
Replace (REPLACE)
If a service definition with the same name already exists, this specifies whether it is replaced.
The possible values are:
- *NO
- This definition does not replace any existing service definition with the same name. The command fails if the named service definition already exists.
- *YES
- Replace the existing service definition. If there is no definition with the same name, a new definition is created.
Text 'description' (TEXT)
Specifies text that briefly describes the service definition.
Note: The field length is 64 bytes and the maximum number of characters is reduced if the system is using a double-byte character set (DBCS).
The possible values are:
- *SYSDFTSVC
- The value of this attribute is taken from the system default service.
- *BLANK
- The text is set to a blank string.
- description
- Specify the new descriptive information.
Start program (STRCMD)
The name of the program to run.
The possible values are:
- *SYSDFTSVC
- The value of this attribute is taken from the system default service.
- start-command
- The name of the start command executable.
Start program arguments (STRARG)
The arguments passed to the program at startup.
The possible values are:
- *SYSDFTSVC
- The value of this attribute is taken from the system default service.
- *BLANK
- No arguments are passed to the start command.
- start-command-arguments
- The arguments passed to the start command.
End program (ENDCMD)
The name of the executable to run when the service is requested to stop.
The possible values are:
- *SYSDFTSVC
- The value of this attribute is taken from the system default service.
- *BLANK
- No end command is executed.
- end-command
- The name of the end command executable.
End program arguments (ENDARG)
The arguments passed to the end program when the service is requested to stop.
The possible values are:
- *SYSDFTSVC
- The value of this attribute is taken from the system default service.
- *BLANK
- No arguments are passed to the end command.
- end-command-arguments
- The arguments passed to the end command.
Standard output (STDOUT)
The path to a file to which the standard output of the service program is redirected.
The possible values are:
- *SYSDFTSVC
- The value of this attribute is taken from the system default service.
- *BLANK
- The standard output is discarded.
- stdout-path
- The standard output path.
Standard error (STDERR)
The path to a file to which the standard error of the service program is redirected.
The possible values are:
- *SYSDFTSVC
- The value of this attribute is taken from the system default service.
- *BLANK
- The standard error is discarded.
- stderr-path
- The standard error path.
Service type (TYPE)
Mode in which to run service.
The possible values are:
- *SYSDFTSVC
- The value for this attribute is taken from the system default service.
- *CMD
- When started the command is executed but no status is collected or displayed.
- *SVR
- The status of the executable started will be monitored and displayed.
Service control (CONTROL)
Whether the service should be started automatically at queue manager start.
The possible values are:
- *SYSDFTSVC
- The value for this attribute is taken from the system default service.
- *MANUAL
- The service will not be automatically started or stopped.
- *QMGR
- The service will be started and stopped as the queue manager is started and stopped.
- *STARTONLY
- The service will be started as the queue manager is started, but will not be requested to stop when the queue manager is stopped.
Examples
None
Error messages
Unknown