CallbackName (MQCHAR128)

Callback descriptor structure - CallbackName field

The callback function is invoked as a dynamically linked program.

We must specify either CallbackFunction or CallbackName. If you specify both, the reason code MQRC_CALLBACK_ROUTINE_ERROR is returned.

If neither CallbackName nor CallbackFunction is not set, the call fails with the reason code MQRC_CALLBACK_ROUTINE_ERROR.

The module is loaded when the first callback routine to use is registered, and unloaded when the last callback routine to use it deregisters.

Except where noted in the following text, the name is left-justified within the field, with no embedded blanks; the name itself is padded with blanks to the length of the field. In the descriptions that follow, square brackets ([ ]) denote optional information:

    IBM i
    The callback name can be one of the following formats:

    • Library "/" Program
    • Library "/" ServiceProgram "("FunctionName")"

    For example, MyLibrary/MyProgram(MyFunction).

    The library name can be *LIBL. Both the library and program names are limited to a maximum of 10 characters.

    UNIX
    The callback name is the name of a dynamically-loadable module or library, suffixed with the name of a function residing in that library. The function name must be enclosed in parentheses. The library name can optionally be prefixed with a directory path:
    [path]library(function)
    

    If the path is not specified the system search path is used.

    The name is limited to a maximum of 128 characters.

    Windows
    The callback name is the name of a dynamic-link library, suffixed with the name of a function residing in that library. The function name must be enclosed in parentheses .The library name can optionally be prefixed with a directory path and drive:
    [d:][path]library(function)
    

    If the drive and path are not specified the system search path is used.

    The name is limited to a maximum of 128 characters.

    z/OS
    The callback name is the name of a load module that is valid for specification on the EP parameter of the LINK or LOAD macro.

    The name is limited to a maximum of 8 characters.

    z/OS CICS
    The callback name is the name of a load module that is valid for specification on the PROGRAM parameter of the EXEC CICS LINK command macro.

    The name is limited to a maximum of 8 characters.

    The program can be defined as remote using the REMOTESYTEM option of the installed PROGRAM definition or by the dynamic routing program.

    The remote CICS region must be connected to IBM MQ if the program is to use IBM MQ API calls. Note, however, that the Hobj field in the MQCBC structure is not valid in a remote system.

If a failure occurs trying to load CallbackName, one of the following error codes is returned to the application:

  • MQRC_MODULE_NOT_FOUND
  • MQRC_MODULE_INVALID
  • MQRC_MODULE_ENTRY_NOT_FOUND

A message is also written to the error log containing the name of the module for which the load was attempted, and the failing reason code from the operating system.

This is an input field. The initial value of this field is a null string or blanks.

Parent topic: Fields for MQCBD