MQAXC - API exit context

 


The MQAXC structure describes the context information that is passed to an API exit. The context information relates to the environment in which the application is running.

 

Fields

The MQAXC structure contains the following fields:

 

StrucId (MQCHAR4)

Structure identifier.

The value is:

MQAXC_STRUC_ID
Identifier for API exit parameter structure.

For the C programming language, the constant MQAXC_STRUC_ID_ARRAY is also defined; this has the same value as MQAXC_STRUC_ID, but is an array of characters instead of a string.

This is an input field to the exit.

 

Version (MQLONG)

Structure version number.

The value is:

MQAXC_VERSION_1
Version-1 API exit parameter structure.

The following constant specifies the version number of the current version:

MQAXC_CURRENT_VERSION
Current version of API exit parameter structure.

Note:
When a new version of the MQAXC structure is introduced, the layout of the existing part is not changed. The exit should therefore check that the version number is equal to or greater than the lowest version which contains the fields that the exit needs to use.

This is an input field to the exit.

 

Environment (MQLONG)

Environment.

This indicates the environment from which the API call was issued. The value is one of the following:

MQXE_COMMAND_SERVER
Command server.

MQXE_MQSC
The "runmqsc" command interpreter.

MQXE_MCA
Message channel agent.

MQXE_MCA_SVRCONN
Message channel agent acting on behalf of a client.

MQXE_OTHER
Environment not defined.

This is an input field to the exit.

 

UserId (MQCHAR12)

User identifier.

This is the user identifier associated with the program that issued the API call. For a client connection (MQXE_MCA_SVRCONN), UserId contains the user identifier of the adopted user, and not the user identifier of the MCA.

The length of this field is given by MQ_USER_ID_LENGTH. This is an input field to the exit.

 

SecurityId (MQBYTE40)

Security identifier.

This is the security identifier associated with the program that issued the API call. For a client connection (MQXE_MCA_SVRCONN), SecurityId contains the security identifier of the adopted user, and not the security identifier of the MCA. If the security identifier is not known, SecurityId has the value:

MQSID_NONE
No security identifier specified.

The value is binary zero for the length of the field.

For the C programming language, the constant MQSID_NONE_ARRAY is also defined; this has the same value as MQSID_NONE, but is an array of characters instead of a string.

The length of this field is given by MQ_SECURITY_ID_LENGTH. This is an input field to the exit.

 

ConnectionName (MQCHAR264)

Connection name.

For a client connection (MQXE_MCA_SVRCONN), this field contains the address of the client (for example, the TCP/IP address). In other cases, this field is blank.

The length of this field is given by MQ_CONN_NAME_LENGTH. This is an input field to the exit.

 

LongMCAUserIdLength (MQLONG)

Length of long MCA user identifier.

For MQXE_MCA and MQXE_MCA_SVRCONN, this is the length in bytes of the full MCA user identifier pointed to by LongMCAUserIdPtr. In other cases, this field is zero.

This is an input field to the exit.

 

LongRemoteUserIdLength (MQLONG)

Length of long remote user identifier.

For MQXE_MCA and MQXE_MCA_SVRCONN, this is the length in bytes of the full remote user identifier pointed to by LongRemoteUserIdPtr. In other cases, this field is zero.

This is an input field to the exit.

 

LongMCAUserIdPtr (MQPTR)

Address of long MCA user identifier.

For MQXE_MCA and MQXE_MCA_SVRCONN, this is the address of the full MCA user identifier. The length of the full identifier is given by LongMCAUserIdLength. In other cases, this field is the null pointer.

This is an input field to the exit.

 

LongRemoteUserIdPtr (MQPTR)

Address of long remote user identifier.

For MQXE_MCA and MQXE_MCA_SVRCONN, this is the address of the full remote user identifier. The length of the full identifier is given by LongRemoteUserIdLength. In other cases, this field is the null pointer.

This is an input field to the exit.

 

ApplName (MQCHAR28)

Application name.

Name of the application that issued the API call. This name is obtained in the same way as the default value for the PutApplName field in MQMD.

The length of this field is given by MQ_APPL_NAME_LENGTH. This is an input field to the exit.

 

ApplType (MQLONG)

Application type.

This is the type of the application that issued the API call. The value is the same as MQAT_DEFAULT for the environment for which the application was compiled.

This is an input field to the exit.

 

ProcessId (MQPID)

The WebSphere MQ process identifier.

This is the same identifier used in WebSphere MQ trace and FFST dumps, but might be different from the operating system process identifier. Where applicable, the exit handler sets this field on entry to each exit function.

This is an input field to the exit.

 

ThreadId (MQTID)

The WebSphere MQ thread identifier.

This is the same identifier used in WebSphere MQ trace and FFST dumps, but might be different from the operating system thread identifier. Where applicable, the exit handler sets this field on entry to each exit function.

This is an input field to the exit.

 

C declaration

typedef struct tagMQAXC MQAXC;
struct tagMQAXC {
  MQCHAR4    StrucId;                 /* Structure identifier */
  MQLONG     Version;                 /* Structure version number */
  MQLONG     Environment;             /* Environment */
  MQCHAR12   UserId;                  /* User identifier */
  MQBYTE40   SecurityId;              /* Security identifier */
  MQCHAR264  ConnectionName;          /* Connection name */
  MQLONG     LongMCAUserIdLength;     /* Length of long MCA user
                                         identifier */
  MQLONG     LongRemoteUserIdLength;  /* Length of long remote user
                                         identifier */
  MQPTR      LongMCAUserIdPtr;        /* Address of long MCA user
                                         identifier */
  MQPTR      LongRemoteUserIdPtr;     /* Address of long remote user
                                         identifier */
  MQCHAR28   ApplName;                /* Application name */
  MQLONG     ApplType;                /* Application type */
  MQPID      ProcessId;               /* Process identifier */
  MQTID      ThreadId;                /* Thread identifier */
};

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.