The structures are generated by macros that have various parameters to control the action of the macro. These parameters are described in the following sections.
From time to time new versions of the MQ structures are introduced. The additional fields in a new version can cause a structure that previously was smaller than 256 bytes to become larger than 256 bytes. Because of this, write assembler instructions that are intended to copy an MQ structure, or to set an MQ structure to nulls, to work correctly with structures that might be larger than 256 bytes. Alternatively, use the DCLVER macro parameter or CMQVERA macro with the VERSION parameter to declare a specific version of the structure (see below).
To declare more than one instance of a structure, the macro prefixes the name of each field in the structure with a user-specifiable string and an underscore. The string used is the label specified on the invocation of the macro. If no label is specified, the name of the structure is used to construct the prefix:
* Declare two object descriptors CMQODA , Prefix used="MQOD_" (the default) MY_MQOD CMQODA , Prefix used="MY_MQOD_"
The structure declarations shown in this book use the default prefix.
Structure declarations can be generated by the macro in one of two forms, controlled by the DSECT parameter:
The value specified must be uppercase. If the DSECT parameter is not specified, DSECT=NO is assumed.
By default, the macros always declare the most recent version of each structure. Although you can use the VERSION macro parameter to specify a value for the Version field in the structure, that parameter defines the initial value for the Version field, and does not control the version of the structure actually declared. To control the version of the structure that is declared, use the DCLVER parameter:
If you specify the VERSION parameter, the value must be a self-defining numeric constant, or the named constant for the version required (for example, MQCNO_VERSION_3). If you specify some other value, the structure is declared as if DCLVER=CURRENT had been specified, even if the value of VERSION resolves to a valid value.
The value specified must be uppercase. If you omit the DCLVER parameter, the value used is taken from the MQDCLVER global macro variable. You can set this variable using the CMQVERA macro (see below).
To declare one structure as a component of another structure, use the NESTED parameter:
The value specified must be uppercase. If you omit the NESTED parameter, NESTED=NO is assumed.
Specify the value to be used to initialize a field in a structure by coding the name of that field (without the prefix) as a parameter on the macro invocation, accompanied by the value required. For example, to declare a message-descriptor structure with the MsgType field initialized with MQMT_REQUEST, and the ReplyToQ field initialized with the string "MY_REPLY_TO_QUEUE", use the following:
MY_MQMD CMQMDA MSGTYPE=MQMT_REQUEST, X REPLYTOQ=MY_REPLY_TO_QUEUE
If you specify a named constant (equate) as a value on the macro invocation, use the CMQA macro to define the named constant. Do not enclose character string values in single quotes.
Control the appearance of the structure declaration in the assembler listing using the LIST parameter:
The value specified must be uppercase. If you omit the LIST parameter, LIST=NO is assumed.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzak1040 |