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 » difficulty concatenating strings

Post new topic  Reply to topic
 difficulty concatenating strings « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Mon Feb 05, 2007 12:15 pm    Post subject: difficulty concatenating strings Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

I need to create a resulting string from an array of items by concatenating them one by one, with '|' as delimiter:

declare M integer cardinality(InputBody.Order.Item[]);
declare s character InputBody.Order.Item[1] ;
declare i integer 2;

while i < M
set s = s || '|' || InputBody.Order.Item[i] || ;
set i = i + 1;
end while;

set Output.MRM.ItemList = s;

However, I gets empty output. Is my concatenate expression wrong?
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
madi
PostPosted: Mon Feb 05, 2007 1:11 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Code:
for cursor as InputBody.Order.item[] DO

SET S = S || '|' || fieldvalue(cursor);

end for;


this should work ......... if it doesnt post your input message

--madi
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 » difficulty concatenating strings
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.