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 » String Manipulation

Post new topic  Reply to topic
 String Manipulation « View previous topic :: View next topic » 
Author Message
SDS
PostPosted: Tue Oct 18, 2011 10:25 pm    Post subject: String Manipulation Reply with quote

Apprentice

Joined: 13 Jun 2011
Posts: 47

If a string consists of another string more than a single times as highlighted below.

e.g

22903a1234567893ahhdwi927903ayi9ou90009874563a222c3a1234567893a45iyioyowqdj222c..

How can we SUBSTRING both the strings and REPLACE it with some other value??

I have tried but it only SUBSTRING & REPLACE the 1st portion & the 2nd portions remains unchanged but I have to change the both.
How can I do it??
Back to top
View user's profile Send private message
ruchir
PostPosted: Tue Oct 18, 2011 10:47 pm    Post subject: Reply with quote

Guest




Hi,

Plz post how u r doing it, thne it will be easy to solve your problem.
Back to top
SDS
PostPosted: Tue Oct 18, 2011 11:00 pm    Post subject: Reply with quote

Apprentice

Joined: 13 Jun 2011
Posts: 47

I am using SUBSTRING functions to find out & filter out the highlighted portion from the string and the using REPLACE to modify it.

Like in MRM we use CARDINALITY to check the number of times a same field appears and then use it as counter to assign with new values. Is there any way like that in BLOB/CHAR string??
Back to top
View user's profile Send private message
ruchir
PostPosted: Tue Oct 18, 2011 11:09 pm    Post subject: Reply with quote

Guest




Hi,

If you are using REPLACE function you need not substring.
Just chck the functionality of replace function and it will easily do your job of replacing the desired string from your source string.
Your code will be like
Code:
REPLACE('22903a1234567893ahhdwi927903ayi9ou90009874563a222c3a1234567893a45iyioyowqdj222c.. ','123456789','your string');
Back to top
mqjeff
PostPosted: Wed Oct 19, 2011 2:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You also should be strongly considering creating a message definition instead of doing all of this parsing manually.
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 » String Manipulation
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.