ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Assigning data into a message

Post new topic  Reply to topic
 Assigning data into a message « View previous topic :: View next topic » 
Author Message
mmarq
PostPosted: Mon Sep 23, 2002 8:46 am    Post subject: Assigning data into a message Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
kirani
PostPosted: Mon Sep 23, 2002 9:02 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Assigning data into a message
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.