You can
define resource associations to specify default
values for EGL programs that access message queues.
Use resource associations to:
- Define the
queue manager name and queue name
- Define the system
- Convert
message formats
To define a resource associations
part for message queues, perform
the following steps:
- Open an EGL build file by right-clicking
the file name in the
Project Explorer and selecting .
- Create
a resource association part by right-clicking the build
file in the Outline view and selecting Add Part....
Select Resource Association from the wizard
dialog and click Next.
- Specify a name
for the Resource Association part and an optional
free-form description. Click Finish.
- EGL
displays the Resource Association part. Click Add
Association to add a new element. Specify a file name
(fileName property) to identify the element.
The entry will apply to any message queue record whose fileName property
matches the name you enter here.
- Enter a file type (fileType property)
of WebSphere® MQ for the
element.
- Specify the platform on which the message queue is
located (system property).
- If you
want to specify different properties for different systems,
click Add System and specify additional systems.
- For each file name and system on the left side of the editor,
you can specify properties on the right side. The system and file
type carry over from the left side. Specify the system resource name
(systemName property) in the following form:
[queueManagerName:]queueName
Specify
only the queueName if you want to use the
default queue manager. The system resource name for message queue
records defines the queue manager name and queue name. The system
resource name is used as the initial value for the fileName property
for the MQRecord and identifies the default queue associated with
the record.
EGL uses the system resource name in add and get
next statements for the message queue record. The queueName identifies
the queue that is accessed by the operation. The queueManagerName identifies
the queue manager on which the queue is defined. The default queue
manager is the queue manager to which the program is connected. If
there is not already an active connection, EGL uses the queue manager
name to connect to the queue manager before accessing the queue. If
no queue manager name is specified, EGL connects to the default queue
manager for the system. If the system resource name is not specified
in a resource association file, a default system resource name is
defined by the fileName property of the
message queue record.
- You can optionally specify a conversion
table if you want data
format conversion to be performed on the message. If you specify a
conversion table, EGL converts the message from local format to remote
format when the message is added to the queue, and from remote format
to local format when the message is read from the queue. EGL performs
conversion using the message queue record structure to identify the
data type of fields in the message.