You can mix the two approaches in a given program. For most purposes, however, you use one or the other approach exclusively.
Regardless of your approach, you can control various runtime conditions by customizing options records, which are global basic records that EGL runtime services passes on calls to MQSeries. When you declare an options record as a program variable, you can use an EGL-installed options record part as a typedef; or you can copy the installed part into your own EGL source file, customize the part, and use the customized part as a typedef.
You can access only one connecting queue manager at a time; however, you can access multiple queues that are under the control of the connecting queue manager. If you wish to connect directly to a queue manager other than the current connecting queue manager, you must disconnect from the first by invoking MQDISC, then connect to the second queue manager by invoking add, get next, MQCONN, or MQCONNX.
You can also access queues that are under the control of a remote queue manager, which is a queue manager with which the connecting queue manager can interact. Access between the two queue managers is possible only if MQSeries itself is configured to allow for that access.
Access to the connecting queue manager is terminated when you invoke MQDISC or when your code ends.
When queue-access statements are not in a unit of work, each change to a message queue is committed immediately.
When your code ends a unit of work, EGL commits or rolls back all recoverable resources being accessed by your program, including databases, message queues, and recoverable files. This outcome occurs whether you use the system functions (sysLib.commit, sysLib.rollback) or the EGL calls to MQSeries (MQCMIT, MQBACK); the appropriate EGL system function is invoked in either case.
A rollback occurs if an EGL program terminates early because of an error detected by EGL runtime services.
If you wish to customize your interaction with MQSeries rather than relying on the default processing of add and get next statements, you need to review the information in this section.
A set of EGL dataTable parts is available to help you interact with MQSeries. Each part allows EGL-supplied functions to retrieve values from memory-based lists at run time. The next section includes details on how data tables are deployed.
Your tasks are as follows:
installationDir\egl\eclipse\plugins\ com.ibm.etools.egl.generators_version\MqReusableParts
For details, see Import.
MQGMO.GETOPTIONS = MQGMO_LOCK + MQGMO_ACCEPT_TRUNCATED_MSG + MQGMO_BROWSE_FIRST