EGL Reference Guide for iSeries

Customization

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.

EGL dataTable part

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.

Making customization possible

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:
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:

  1. 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
  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.

  3. In your program, declare global variables:
  4. 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.
  5. 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 ]