Options records for MQ records

Each MQ record is associated with five options records, which EGL uses as arguments in the hidden calls to MQSeries:

When you specify an options record as a property of an MQ record, you are referring to a variable that uses a working storage record part (like MQOD) as a typeDef. The part resides in an EGL file that is provided with the product, as described in MQSeries support. Instead of using the record part as is, you can copy it into your own EGL file and customize the part.

If you do not indicate that a given options record is in use, EGL builds a default record and assigns values, as described in the following sections. The default options records are not available, however, when you access MQSeries without using MQ records.

Get options record

You can create a get options record based on the MQSeries Get Message Options (MQGMO), which is an argument on MQSeries MQGET calls. If you do not declare a get options record, EGL automatically builds a default named MQGMO, and your generated program does the following:

Put options record

You can create a put options record based on the MQSeries Put Message Options (MQPMO), which is an argument on MQSeries MQPUT calls. If you do not declare a put options record, EGL automatically builds a default named MQPMO, and your generated program does the following:

  • Initializes the put options record with the values listed at the beginning of Data initialization

  • Sets OPTIONS to either MQPMO_SYNCPOINT or MQPMO_NO_SYNCPOINT, depending on whether you set the MQ record property Include message in transaction

Open options record

The content of the open options record determines the value of the Options parameter that is used in calls to the MQSeries command MQOPEN or MQCLOSE. The open options record part (MQOO) is available, but if you do not declare a record based on that part, EGL automatically builds a default named MQOO as follows:

  • On an MQOPEN that is invoked because of an EGL add statement, the generated program sets MQOO.OPTIONS to this:
      MQOO_OUTPUT + MQOO_FAIL_IF_QUIESCING

  • On an MQOPEN that is invoked because of an EGL scan statement, the generated program sets MQOO.OPTIONS to the following when the message queue record property option Open input queue for exclusive use is in effect:
      MQOO_INPUT_EXCLUSIVE + MQOO_FAIL_IF_QUIESCING

  • On an MQOPEN that is invoked because of an EGL scan statement, the generated program sets MQOO.OPTIONS to the following when the message queue record property option Open input queue for exclusive use is not in effect:
      MQOO_INPUT_SHARED + MQOO_FAIL_IF_QUIESCING

  • On an MQCLOSE that is invoked because of an EGL close statement, the generated program sets MQOO.OPTIONS to the following:
      MQCO_NONE

Message descriptor record

You can create a message descriptor record based on the MQSeries Message Descriptor (MQMD), which is a parameter on MQGET and MQPUT calls. If you do not declare a message descriptor record, EGL automatically builds a default named MQMD and initializes that record with the values listed in Data initialization.

Queue descriptor record

You can create a queue descriptor record based on the MQSeries Object Descriptor (MQOD), which is an argument on MQSeries MQOPEN and MQCLOSE calls. If you do not declare a queue descriptor record, EGL automatically builds a default named MQOD, and your generated program does the following:

  • Initializes the queue descriptor record with the values listed at the beginning of Data initialization

  • Sets OBJECTTYPE in that record to MQOT_Q

  • Sets OBJECTMGRNAME to the queue manager name specified in the system word record.resourceAssociation; but if record.resourceAssociation does not reference the queue manager name, OBJECTQMGRNAME has no value

  • Sets OBJECTNAME to the queue name in record.resourceAssociation

Related concepts
Direct MQSeries calls
MQSeries-related EGL keywords
MQSeries support

Related reference
Data initialization
recordName.resourceAssociation
MQ record properties