PutApplName (MQCHAR28)

This is the name of application that put the message, and is part of the origin context of the message. The contents differ between platforms, and might differ between releases.

For more information about message context, see MQMD - Message descriptor and Message context.

[V9.1.2 Mar 2019]From IBM® MQ 9.1.2 you can specify the application name in additional programming languages. See specifying the application name in supported programming languages for more information.

The format of PutApplName depends on the value of PutApplType and can change from one release to another. Changes are rare, but do happen if the environment changes.

When the queue manager sets this field (that is, for all options except MQPMO_SET_ALL_CONTEXT), it sets the field to a value that is determined by the environment:
  • [z/OS]On z/OS®, the queue manager uses:
    • For z/OS batch, the 8-character job name from the JES JOB card
    • For TSO, the 7-character TSO user identifier
    • For CICS®, the 8-character applid, followed by the 4-character tranid
    • For IMS, the 8-character IMS system identifier, followed by the 8-character PSB name
    • For XCF, the 8-character XCF group name, followed by the 16-character XCF member name
    • For a message generated by a queue manager, the first 28 characters of the queue manager name
    • For distributed queuing without CICS, the 8-character jobname of the channel initiator followed by the 8-character name of the module putting to the dead-letter queue followed by an 8-character task identifier.
    The name or names are each padded to the right with blanks, as is any space in the remainder of the field. Where there is more than one name, there is no separator between them.
  • [Windows]On Windows systems, the queue manager uses the following names:
    • For a CICS application, the CICS transaction name
    • For a non-CICS application, the rightmost 28 characters of the fully-qualified name of the executable
  • [IBM i]On IBM i, the queue manager uses the fully-qualified job name.
  • [UNIX]On UNIX, the queue manager uses the following names:
    • For a CICS application, the CICS transaction name
    • For a non-CICS application, MQ asks the operating system for the name of the process. This is returned as the program file name, without full path. Then MQ places this process name in the MQMD.PutApplName field as follows:
      [AIX]AIX®
      If the name is less than or equal to 28 bytes, then the name is inserted, padded to the right with spaces.
      If the name is greater than 28 bytes, then the leftmost 28 bytes of the name are inserted.
      [Solaris][Linux]Linux® and Solaris
      If the name is less than or equal to 15 bytes, then the name is inserted, padded to the right with spaces.
      If the name is greater than 15 bytes, then the leftmost 15 bytes of the name are inserted, padded to the right with spaces.
      For example, if you run /opt/mqm/samp/bin/amqsput QNAME QMNAME, then the PutApplName is 'amqsput                     '. There are 21 space characters of padding in this MQCHAR28 field. Note that the full path including /opt/mqm/samp/bin is not included in the PutApplName.

For the MQPUT and MQPUT1 calls, this is an input/output field if MQPMO_SET_ALL_CONTEXT is specified in the PutMsgOpts parameter. Any information following a null character within the field is discarded. The null character and any following characters are converted to blanks by the queue manager. If MQPMO_SET_ALL_CONTEXT is not specified, this field is ignored on input and is an output-only field.