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 » COPYING ELEMENTS FROM THE LIST

Post new topic  Reply to topic
 COPYING ELEMENTS FROM THE LIST « View previous topic :: View next topic » 
Author Message
mpong
PostPosted: Mon Mar 10, 2014 7:41 am    Post subject: COPYING ELEMENTS FROM THE LIST Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Dear All,

My requirement is to fetch particular element in a list to create a new output root and propagate to other queue.


a) I use CARDINALITY function to determine the number of elements in the list
count INT CARDINALITY(InputRoot.MRM.LIST_MSG[]);
lets say it returns 6 and I want to fetch 5th element then I do count=count-1;

b) DECLARE MsgText BLOB
CAST(ASBITSTREAM (InputRoot.MRM.LIST_MSG[count] OPTIONS parseOptions SET 'AAA' TYPE 'BBB' FORMAT 'CCC')AS BLOB);

c)CREATE LASTCHILD OF OutputRoot DOMAIN('MRM')
PARSE(MsgText ,inEncoding,inCCSID,'AAA','BBB','CCC',parseOptions);

After b executes it returns all elements in the list(MsgText), I am unable to get that particular element, Please help me to figure out my mistake.

Thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 10, 2014 8:39 am    Post subject: Re: COPYING ELEMENTS FROM THE LIST Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mpong wrote:
Please help me to figure out my mistake.


Can you explain a bit more why you're doing it this way? I would have thought something like this untested example would do you:

Code:
CREATE LASTCHILD OF OutputRoot.MRM FROM InputRoot.MRM.LIST_MSG[count]

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mpong
PostPosted: Tue Mar 11, 2014 2:40 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Hello Vitor, Thanks for the response.

This is for the new change from the source side where they may not publish certain things for particular element, on such cases we would want to filter that particular element and store it in DB for reference usage also want to have it in holding queue for some period.

I have achieved getting particular element and putting it as separate msg.

Thanks.
Back to top
View user's profile Send private message
mpong
PostPosted: Tue Mar 11, 2014 5:08 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Hi Vitor, When I save new msg and open it in text pad it is always in the second line, it is prefixed with CRLF, there is no change in the headers. OutputRoot.MRM.LIST_MSG looks fine on debug mode but when it hits the queue it has the new line prefixed with, any inputs on this?

My input msg set has repeating element delimiter as <CR><LF>, can this cause an issue?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Mar 11, 2014 5:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mpong wrote:
My input msg set has repeating element delimiter as <CR><LF>, can this cause an issue?



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mpong
PostPosted: Wed Mar 12, 2014 4:19 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » COPYING ELEMENTS FROM THE LIST
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.