|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Assigning data into a message |
« View previous topic :: View next topic » |
Author |
Message
|
mmarq |
Posted: Mon Sep 23, 2002 8:46 am Post subject: Assigning data into a message |
|
|
Acolyte
Joined: 19 Sep 2002 Posts: 74 Location: Newton, MA
|
I have a query bringing back many columns of data and up to three rows:
john doe 1 Main St. HOM 201 333 9888 HOM
john doe 2 Wall St. BUS 212 555 8888 BUS
john doe 3 Sunny Lane VAC 202 838 8888 VAC
IF the order of the columns
being extracted is the same as a message type I have built - can I do the following?
SET "OutputRoot"."MRM".CDB.CLLExtractMsg = (SElect col1, col2 ... colN);
If the extract returns many rows will I get multiple instances of this message and if so how would I refer to them?
Thanks in advance,
Melissa _________________ M Marquis |
|
Back to top |
|
 |
kirani |
Posted: Mon Sep 23, 2002 9:02 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Melissa,
It would be easier to extract values into LocalEnvironment/Environment tree and then use it in MRM.
For example,
Code: |
SET Environment.Variables.RecordSet.Data[] = (SElect T.col1, T.col2, ... T.colN FROM Database.Table as T WHERE condition);
|
This statement will give you output in following format:
Code: |
....
<RecordSet>
<Data>
<col1>value1</col1>
<col2>value1</col2>
<colN>value1</colN>
</Data>
<Data>
<col1>value1</col1>
<col2>value1</col2>
<colN>value1</colN>
</Data>
<Data>
<col1>value1</col1>
<col2>value1</col2>
<colN>value1</colN>
</Data>
</RecordSet>
...
|
You could refer to output elements in the same way as you do for XML elements.
For example, Environment.Variables.RecordSet.Data[N].col1 will refer to column1 in Row N.
For more info, please refer to Chapter 9 of ESQL Reference manual. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|