Version ( MQLONG)

The Version field specifies the highest version number that you can set for the structure.

The value depends on the environment:
MQCD _VERSION_1
Version 1 channel definition structure.
MQCD _VERSION_2
Version 2 channel definition structure.
MQCD _VERSION_3
Version 3 channel definition structure.
MQCD _VERSION_4
Version 4 channel definition structure.
MQCD _VERSION_5
Version 5 channel definition structure.
MQCD _VERSION_6
Version 6 channel definition structure.
MQCD _VERSION_7
Version 7 channel definition structure.
MQCD _VERSION_8
Version 8 channel definition structure.
MQCD _VERSION_9
Version 9 channel definition structure.
MQCD _VERSION_10
Version 10 channel definition structure.
MQCD _VERSION_11
Version 11 channel definition structure.

Version 11 is the highest that you can set the field to on IBM® MQ 8.0 on all platforms.

[z/OS]MQCD _VERSION_12
Version 12 channel definition structure.

Version 12 is the highest that you can set the field to on IBM MQ 9.1.3.

Fields that exist only in the more recent versions of the structure are identified as such in the descriptions of the fields. The following constant specifies the version number of the current version:
MQCD_CURRENT_VERSION
The value set in MQCD_CURRENT_VERSION is the current version of the channel definition structure being used.

The value of MQCD_CURRENT_VERSION depends on the environment. It contains the highest value supported by the platform.

MQCD_CURRENT_VERSION is not used to initialize the default structures provided in the header, copy, and include files provided for different programming languages. The default initialization of Version depends on the platform and release.

The MQCD declarations in the header, copy, and include files are initialized to MQCD_VERSION_6. To use additional MQCD fields, applications must set the version number to MQCD_CURRENT_VERSION. If you are writing an application that is portable between several environments, you must choose a version that is supported in all the environments.

Tip: When a new version of the MQCD structure is introduced, the layout of the existing part is not changed. The exit must check the version number. It must be equal to or greater than the lowest version that contains the fields that the exit needs to use.