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 Concatenation problem

Post new topic  Reply to topic
 String Concatenation problem « View previous topic :: View next topic » 
Author Message
Regis
PostPosted: Wed May 03, 2006 10:57 pm    Post subject: String Concatenation problem Reply with quote

Newbie

Joined: 03 May 2006
Posts: 3

Hi all,

I have a little problem with string concatenation. I'm new to ESQL and have no idea how to solve it.

An input message contains 4 fields of 35 chars which need to be concatenated to 1 field of 140 chars. But all the spaces at the end of each 35 chars need to be in the 140 chars string. If I use || it automaticaly trims the field. Is there a simple way around this problem?
I'm using MQSI 2.1.

Thanks in advance
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Wed May 03, 2006 11:03 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Regis,
WMQI will not automatically trim any spaces, so the use of the concat operator(||) should be ok. Please use a trace to make sure that your input fields do indeed contain the spaces.
In fact, we need to use the TRIM operator to remove spaces.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
elvis_gn
PostPosted: Wed May 03, 2006 11:10 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Regis,

I support shalabh1976 on this, it is news to me too that fields are being automatically trimmed by WMQI...

I guess either your message itself is trimmed or your message set is doing it for you....

I guess, you will still need to provide for the functionality of having spaces...in that case use OVERLAY with SPACE functions along with concat....

Regards.
Back to top
View user's profile Send private message Send e-mail
Regis
PostPosted: Wed May 03, 2006 11:26 pm    Post subject: Reply with quote

Newbie

Joined: 03 May 2006
Posts: 3

Shalabh and elvis_gn,

It seems I was wrong indeed. The input field was trimmed before it was passed. I'm gonna try to use OVERLAY instead of concatenation.

Thanks!
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed May 03, 2006 11:30 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Regis,

Quote:
I'm gonna try to use OVERLAY instead of concatenation.

Why ? If your sure that the input WILL always be of length 35 then don't, its a waste of processing power....

But doing it using OVERLAY, SPACE and || will ensure that, whatever be the input, the code will take care...so its dynamic and closer to a service architecture

Regards.
Back to top
View user's profile Send private message Send e-mail
Regis
PostPosted: Wed May 03, 2006 11:37 pm    Post subject: Reply with quote

Newbie

Joined: 03 May 2006
Posts: 3

Elvis_gn,

Quote:
Why ? If your sure that the input WILL always be of length 35 then don't, its a waste of processing power....


The input field is of variable length. The maximum length is 35 and I was told is was always 35 chars long. But it now turns out to be variable...

Kind regards
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 Concatenation problem
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.