EGL Reference Guide for iSeries
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.
To make customization possible, you must bring a variety of installed EGL
files into your project without changing them in any way.
The files are as follows:
- records.egl
- Contains basic record parts that can be used as typedefs for the options
records that are used in your program; also includes structure parts that
are used by those records and that give you the flexibility to develop record
parts of your own
- functions.egl
- Contains two sets of functions:
- MQSeries command functions, which access MQSeries directly
- Initialization functions, which let you place initial values in the
options records that are used in your program
- mqrcode.egl, mqrc.egl,
mqvalue.egl
- Contains a set of EGL dataTable parts that are used by the command and
initialization functions
Your tasks are as follows:
- Using the process for importing files into the workbench, bring those
files into an EGL project. The files reside in the following
directory:
installationDir\wstools\eclipse\plugins\
com.ibm.etools.egl.generators_version\MqReusableParts
- installationDir
- The WebSphere Studio installation directory, such as c:\myStudio
- version
- The latest version of the plugin; for example, 5.1.2
- To make the parts more easily available to your program, write one or more
EGL import statements in the file that contains your
program. If the files to be imported reside in a project other than the
one in which you are developing code, make sure that your project references
the other project.
For details, see Import.
- In your program, declare global variables:
- Declare MQRC, MQRCODE, and MQVALUE, each of which must use as a typedef
the dataTable part that has the same name as the variable.
- For each options record that you wish to pass to MQSeries, declare a basic
record that uses an options record part as a typedef. For details on
each part, see Options records for MQ records.
- In your function, initialize the options records that you intend to pass
to MQSeries. You can do this easily by invoking the imported EGL
initialization function for a given options record. The name of each
function is the name of the part that is used as a typedef for the record,
followed by _INIT. An example is MQGMO_INIT.
- Set values in the options records. In many cases you set a value by
assigning an EGL symbol that represents a constant, each of which is based on
a symbol described in the MQSeries documentation. You can specify
multiple EGL symbols by summing individual ones, as in this example:
MQGMO.GETOPTIONS = MQGMO_LOCK
+ MQGMO_ACCEPT_TRUNCATED_MSG
+ MQGMO_BROWSE_FIRST
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.