DEFINE PROCESS (create a new process definition)

Use the MQSC command DEFINE PROCESS to define a new IBM® MQ, process definition, and set its parameters.

Using MQSC commands

For information on how you use MQSC commands, see Performing local administration tasks using MQSC commands.

[z/OS]You can issue this command from sources 2CR. For an explanation of the source symbols, see Sources from which you can issue MQSC commands on z/OS®.

Synonym: DEF PRO

Values shown above the main line in the railroad diagram are the defaults supplied with IBM MQ, but your installation might have changed them. See Syntax diagrams.

DEFINE PROCESS

Read syntax diagramSkip visual syntax diagram DEFINE PROCESS ( process-name ) CMDSCOPE(' ')CMDSCOPE(qmgr-name)1CMDSCOPE(*)12QSGDISP(QMGR)QSGDISP(COPY)1QSGDISP(GROUP)12define attrsprocess attrs
Define attrs
Read syntax diagramSkip visual syntax diagramLIKE(process-name)NOREPLACEREPLACE
Process attrs
Read syntax diagramSkip visual syntax diagramAPPLTYPE(integerCICSDEFIMSMVSOS400UNIXWINDOWSWLM)APPLICID(' ')APPLICID(string)DESCR(' ')DESCR(string)USERDATA(' ')USERDATA(string)ENVRDATA(' ')ENVRDATA(string)
Notes:
  • 1 Valid only on z/OS when the queue manager is a member of a queue sharing group.
  • 2 Valid only on z/OS.
  • 3 The default depends on the platform, and can be changed by your installation.

Parameter descriptions for DEFINE PROCESS

(process-name)
Name of the IBM MQ process definition (see Rules for naming IBM MQ objects ). process-name is required.

The name must not be the same as any other process definition currently defined on this queue manager (unless REPLACE is specified).

APPLICID( string )
The name of the application to be started. The name might typically be a fully qualified file name of an executable object. Qualifying the file name is particularly important if you have multiple IBM MQ installations, to ensure the correct version of the application is run. The maximum length is 256 characters.

For a CICS® application the name is a CICS transaction ID.

[z/OS]For an IMS application, it is an IMS transaction ID.

[z/OS]On z/OS, for distributed queuing, it must be CSQX START.

APPLTYPE( string )
The type of application to be started. Valid application types are:
integer
A system-defined application type in the range zero through 65 535 or a user-defined application type in the range 65 536 through 999 999 999.
For certain values in the system range, a parameter from the following list can be specified instead of a numeric value:
CICS
Represents a CICS transaction.
[z/OS]IMS
Represents an IMS transaction.
[z/OS]MVS
Represents a z/OS application (batch or TSO).
[IBM i]OS400
Represents an IBM i application.
UNIX
Represents a Linux® or AIX® application.
WINDOWS
Represents a Windows application.
[z/OS]WLM
Represents a z/OS workload manager application.
DEF
Specifying DEF causes the default application type for the platform at which the command is interpreted to be stored in the process definition. This default cannot be changed by the installation. If the platform supports clients, the default is interpreted as the default application type of the server.
Only use application types (other than user-defined types) that are supported on the platform at which the command is run:
  • [z/OS]On z/OS, CICS, IMS, MVS, UNIX, WINDOWS, WLM, and DEF are supported.
  • [IBM i]On IBM i, OS400, CICS, and DEF are supported.
  • [AIX]On AIX and Linux, UNIX, WINDOWS, CICS, and DEF are supported.
  • [Windows]On Windows, WINDOWS, UNIX, CICS, and DEF are supported.
[z/OS]CMDSCOPE
This parameter applies to z/OS only and specifies how the command runs when the queue manager is a member of a queue sharing group.
CMDSCOPE must be blank, or the local queue manager, if QSGDISP is set to GROUP.
' '
The command runs on the queue manager on which it was entered.
qmgr-name
The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

In a shared queue environment, you can provide a different queue manager name from the one you are using to enter the command. The command server must be enabled.

*
The command runs on the local queue manager and is also passed to every active queue manager in the queue sharing group. The effect is the same as entering the command on every queue manager in the queue sharing group.
DESCR( string )
Plain-text comment. It provides descriptive information about the object when an operator issues the DISPLAY PROCESS command.

It must contain only displayable characters. The maximum length is 64 characters. In a DBCS installation, it can contain DBCS characters (subject to a maximum length of 64 bytes).

Note: Use characters from the coded character set identifier (CCSID) for this queue manager. Other characters might be translated incorrectly if the information is sent to another queue manager.
ENVRDATA( string )
A character string that contains environment information pertaining to the application to be started. The maximum length is 128 characters.
The meaning of ENVRDATA is determined by the trigger-monitor application. The trigger monitor provided by IBM MQ appends ENVRDATA to the parameter list passed to the started application. The parameter list consists of the MQTMC2 structure, followed by one blank, followed by ENVRDATA with trailing blanks removed.
Notes:
  1. [z/OS]On z/OS, ENVRDATA is not used by the trigger-monitor applications provided by IBM MQ.
  2. [z/OS]On z/OS, if APPLTYPE is WLM, the default values for the ServiceName and ServiceStep fields in the work information header (MQWIH) can be supplied in ENVRDATA. The format must be:
    
    SERVICENAME=servname,SERVICESTEP=stepname
    
    where:
    SERVICENAME=
    is the first 12 characters of ENVRDATA.
    servname
    is a 32-character service name. It can contain embedded blanks or any other data, and have trailing blanks. It is copied to the MQWIH as is.
    SERVICESTEP=
    is the next 13 characters of ENVRDATA.
    stepname
    is a 1 - 8 character service step name. It is copied as-is to the MQWIH, and padded to eight characters with blanks.
    If the format is incorrect, the fields in the MQWIH are set to blanks.
  3. On AIX and Linux, ENVRDATA can be set to the ampersand character to make the started application run in the background.
LIKE( process-name )
The name of an object of the same type, with parameters that are used to model this definition.

If this field is not provided, the values of fields you do not provide are taken from the default definition for this object.

Using LIKE is equivalent to specifying:

LIKE(SYSTEM.DEFAULT.PROCESS)

A default definition for each object type is provided. You can alter the provided defaults to the default values required. See Rules for naming IBM MQ objects.

[z/OS]On z/OS, the queue manager searches page set zero for an object with the name you specify and a disposition of QMGR or COPY. The disposition of the LIKE object is not copied to the object you are defining.
Note:
  1. QSGDISP (GROUP) objects are not searched.
  2. LIKE is ignored if QSGDISP(COPY) is specified.
[z/OS]QSGDISP
This parameter applies to z/OS only.

Specifies the disposition of the object to which you are applying the command (that is, where it is defined and how it behaves).

Table 1. Object dispositions for QSGDISP options
QSGDISP DEFINE
COPY

The object is defined on the page set of the queue manager that executes the command. It uses the QSGDISP(GROUP) object of the same name as the LIKE object.

For example, if you issue the following command,

DEFINE PROCESS(process_name)
REPLACE QSGDISP(COPY)
the queue manager searches the shared configuration repository for a PROCESS definition called process_name. If a matching PROCESS definition is found, the queue manager creates a local copy of this definition on the queue manager page set.

For local queues, messages are stored on the page sets of each queue manager and are available only through that queue manager.

GROUP

The object definition resides in the shared configuration repository. QSGDISP(GROUP) is allowed only if the queue manager is in a queue sharing group.

If the DEFINE for the QSGDISP(GROUP) object is successful, the DEFINE PROCESS(process_name) REPLACE QSGDISP(COPY) command is generated and sent to all active queue managers in the queue sharing group to make or refresh local copies on page set zero.

The DEFINE for the group object takes effect regardless of whether the generated command with QSGDISP(COPY) fails.

PRIVATE Not permitted.
QMGR

The object is defined on the page set of the queue manager that executes the command.

REPLACE and NOREPLACE
Whether the existing definition [z/OS](and on z/OS, with the same disposition) is to be replaced with this one. REPLACE is optional. Any object with a different disposition is not changed.
REPLACE
The definition replaces any existing definition of the same name. If a definition does not exist, one is created.
NOREPLACE
The definition does not replace any existing definition of the same name.
USERDATA( string )
A character string that contains user information pertaining to the application defined in the APPLICID that is to be started. The maximum length is 128 characters.

The meaning of USERDATA is determined by the trigger-monitor application. The trigger monitor provided by IBM MQ simply passes USERDATA to the started application as part of the parameter list. The parameter list consists of the MQTMC2 structure (containing USERDATA), followed by one blank, followed by ENVRDATA with trailing blanks removed.

For IBM MQ message channel agents, the format of this field is a channel name of up to 20 characters. See Managing objects for triggering for information about what APPLICID to provide to message channel agents.

For Microsoft Windows, the character string must not contain double quotation marks if the process definition is going to be passed to runmqtrm.