+

Search Tips | Advanced Search

DEFINE PROCESS

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


Use MQSC commands

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

We can issue this command from sources 2CR. For an explanation of the source symbols, see Sources from which we 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

DEFINE PROCESS ( process-name ) CMDSCOPE(' ')CMDSCOPE(qmgr-name)1CMDSCOPE(*)12QSGDISP(QMGR)QSGDISP(COPY)1QSGDISP(GROUP)12define attrsprocess attrsDefine attrsLIKE(process-name)NOREPLACEREPLACEProcess attrsAPPLTYPE(integerCICSDEFIMSMVSNOTESAGENTNSKOS400UNIXWINDOWSWLM)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.

    For an IMS application, it is an IMS transaction ID.

    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.

      IMS
      Represents an IMS transaction.

      MVS
      Represents a z/OS application (batch or TSO).

      NOTESAGENT
      Represents a Lotus Notes agent.

      NSK
      Represents an HP Integrity NonStop Server application.

      OS400
      Represents an IBM i application.

      UNIX
      Represents a UNIX application.

      WINDOWS
      Represents a Windows application.

      WLM
      Represents a z/OS workload manager application.

      DEF
      Specify 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:

    • On z/OS, CICS, IMS, MVS, UNIX, WINDOWS, WLM, and DEF are supported.
    • On IBM i, OS400, CICS, and DEF are supported.
    • On UNIX, UNIX, WINDOWS, CICS, and DEF are supported.
    • On Windows, WINDOWS, UNIX, CICS, and DEF are supported.

    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, we can provide a different queue manager name from the one we 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. On z/OS, ENVRDATA is not used by the trigger-monitor applications provided by IBM MQ.
    2. 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 UNIX, 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 we 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. We can alter the provided defaults to the default values required. See Rules for naming IBM MQ objects.

    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 we are defining. Note:
    1. QSGDISP (GROUP) objects are not searched.
    2. LIKE is ignored if QSGDISP(COPY) is specified.

    QSGDISP
    This parameter applies to z/OS only.

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

    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.
    GROUP The object definition resides in the shared repository. GROUP is allowed only if the queue manager is in a queue sharing group. If the definition is successful, the following command is generated.
    DEFINE PROCESS(process-name)
    REPLACE QSGDISP(COPY)
    
    The command is sent to all active queue managers in the queue sharing group to attempt 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 (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 Manage 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.

Parent topic: MQSC commands

Last updated: 2020-10-04