MQTMC2 (Trigger message 2 - character format) on IBM i
When a trigger-monitor application retrieves a trigger message (MQTM) from an initiation queue, the trigger monitor might need to pass some or all of the information in the trigger message to the application that is started by the trigger monitor.
Overview
Purpose: Information that may be needed by the started application includes TC2QN, TC2TD, and TC2UD. The trigger monitor application can pass the MQTM structure directly to the started application, or pass an MQTMC2 structure instead, depending on what is permitted by the environment and convenient for the started application.
This structure is part of the IBM MQ Trigger Monitor Interface (TMI), which is one of the IBM MQ framework interfaces.
Character set and encoding: Character data in MQTMC2 is in the character set of the local queue manager; this is given by the CodedCharSetId queue manager attribute.
Usage: The MQTMC2 structure is like the format of the MQTM structure. The difference is that the non-character fields in MQTM are changed in MQTMC2 to character fields of the same length, and the queue manager name is added at the end of the structure.- On IBM i, the trigger monitor application provided with IBM MQ passes an MQTMC2 structure to the started application.
Fields
The MQTMC2 structure contains the following fields; the fields are described in alphabetical order:
- TC2AI (256-byte character string)
-
Application identifier.
See the TMAI field in the MQTM structure.
- TC2AT (4-byte character string)
-
Application type.
This field always contains blanks, whatever the value in the TMAT field in the MQTM structure of the original trigger message.
- TC2ED (128-byte character string)
-
Environment data.
See the TMED field in the MQTM structure.
- TC2PN (48-byte character string)
-
Name of process object.
See the TMPN field in the MQTM structure.
- TC2QMN (48-byte character string)
-
Queue manager name.
This is the name of the queue manager at which the trigger event occurred.
- TC2QN (48-byte character string)
-
Name of triggered queue.
See the TMQN field in the MQTM structure.
- TC2SID (4-byte character string)
-
Structure identifier.
The value must be:- TCSIDV
- Identifier for trigger message (character format) structure.
- TC2TD (64-byte character string)
-
Trigger data.
See the TMTD field in the MQTM structure.
- TC2UD (128-byte character string)
-
User data.
See the TMUD field in the MQTM structure.
- TC2VER (4-byte character string)
-
Structure version number.
The value must be:- TCVER2
- Version 2 trigger message (character format) structure.
The following constant specifies the version number of the current version:
- TCVERC
- Current version of trigger message (character format) structure.
Initial values
Field name | Name of constant | Value of constant |
---|---|---|
TC2SID | TCSIDV | 'TMC¬' |
TC2VER | TCVER2 | '¬¬¬2' |
TC2QN | None | Blanks |
TC2PN | None | Blanks |
TC2TD | None | Blanks |
TC2AT | None | Blanks |
TC2AI | None | Blanks |
TC2ED | None | Blanks |
TC2UD | None | Blanks |
TC2QMN | None | Blanks |
Notes:
|
RPG declaration
D*..1....:....2....:....3....:....4....:....5....:....6....:....7.. D* MQTMC2 Structure D* D* Structure identifier D TC2SID 1 4 D* Structure version number D TC2VER 5 8 D* Name of triggered queue D TC2QN 9 56 D* Name of process object D TC2PN 57 104 D* Trigger data D TC2TD 105 168 D* Application type D TC2AT 169 172 D* Application identifier D TC2AI 173 428 D* Environment data D TC2ED 429 556 D* User data D TC2UD 557 684 D* Queue manager name D TC2QMN 685 732Parent topic: Data type descriptions on IBM i