Author |
Message
|
mbtech |
Posted: Fri May 24, 2013 5:39 am Post subject: removing spaces between words |
|
|
Apprentice
Joined: 18 Jul 2012 Posts: 36
|
I have a scenario where a group of words(a meaning ful word) come from input request for a field.i have to trim out the spaces and replce with _ between them and get the corresponding value from property file.Can any one let me know either trimming out the spaces between words or replacing with _. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 24, 2013 5:52 am Post subject: Re: removing spaces between words |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mbtech wrote: |
Can any one let me know either trimming out the spaces between words or replacing with _. |
Seriously?
I typed "replacing characters" into the search on the InfoCenter and got this as the first hit.
You could probably have achived the same by guessing the function name, or just looking up the string functions provided. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dogorsy |
Posted: Fri May 24, 2013 8:27 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
Why don't you post your requirements and ask someone to write the whole flow for you ?, that would save you time.
Alternatively, there is something called 'Info Center'
Last edited by dogorsy on Fri May 24, 2013 8:28 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 24, 2013 8:27 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Why do you need to do this manually? Why not define a message model to do it for you? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 24, 2013 9:30 am Post subject: Re: removing spaces between words |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mbtech wrote: |
and get the corresponding value from property file. |
Sounds very "java" like to me. In the broker you would want to get the property from either a DB or a shared variable. You can load these at startup (or on first access)...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 24, 2013 11:43 am Post subject: Re: removing spaces between words |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
mbtech wrote: |
and get the corresponding value from property file. |
Sounds very "java" like to me. In the broker you would want to get the property from either a DB or a shared variable. You can load these at startup (or on first access)...  |
I think you meant an EXTERNAL variable...
 |
|
Back to top |
|
 |
kash3338 |
Posted: Fri May 24, 2013 10:31 pm Post subject: Re: removing spaces between words |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
mqjeff wrote: |
fjb_saper wrote: |
Sounds very "java" like to me. In the broker you would want to get the property from either a DB or a shared variable. You can load these at startup (or on first access)...  |
I think you meant an EXTERNAL variable...
 |
I think its DB/SHARED or EXTERNAL  |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun May 26, 2013 5:48 am Post subject: Re: removing spaces between words |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
fjb_saper wrote: |
mbtech wrote: |
and get the corresponding value from property file. |
Sounds very "java" like to me. In the broker you would want to get the property from either a DB or a shared variable. You can load these at startup (or on first access)...  |
I think you meant an EXTERNAL variable...
 |
Well you can use the EXTERNAL to populate the SHARED on first access. But you cannot change the EXTERNAL while the flow is running (unless you use the CMP or MBX), whereas you can determine a mechanism for reloading the SHARED while the flow is running... (like switching a property file)...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
goffinf |
Posted: Sun May 26, 2013 10:53 am Post subject: Re: removing spaces between words |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
fjb_saper wrote: |
mqjeff wrote: |
fjb_saper wrote: |
mbtech wrote: |
and get the corresponding value from property file. |
Sounds very "java" like to me. In the broker you would want to get the property from either a DB or a shared variable. You can load these at startup (or on first access)...  |
I think you meant an EXTERNAL variable...
 |
Well you can use the EXTERNAL to populate the SHARED on first access. But you cannot change the EXTERNAL while the flow is running (unless you use the CMP or MBX), whereas you can determine a mechanism for reloading the SHARED while the flow is running... (like switching a property file)...  |
Indeed. An EXTERNAL is a CONSTANT.
Recently we have started to use JMX for updating SHARED variables, although you do need to take account of concurrency (if it matters). |
|
Back to top |
|
 |
|