|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Converting single character to hex low value RM value |
« View previous topic :: View next topic » |
Author |
Message
|
Lebowski |
Posted: Thu May 26, 2016 5:23 am Post subject: Converting single character to hex low value RM value |
|
|
Newbie
Joined: 26 May 2016 Posts: 7
|
Hi everybody,
I'm attempting to make alterations to a flow which passes messages through to an RM backend system. What I'm looking to do is put in a temporary fix for a defect which is happening a in another system. The defect is causing legitimate data to be overwritten with spaces within RM.
I'm needing to write some logic so that if a message hits the flow and the value in the xml is a space then this is converted to a low value character. From what I understand low value looks like - 0 within RM.
0
From my understanding, RM ignores low value updates and doesn't overwrite existing data. The XML field i need to set this to is only one character long so its like <element>Y<element>.
Could anybody offer some guidance on what I would need to set the field to in order for this to correspond to a hex low value within RM?
I'm imagining the logic is going to look like -
IF elementref = ' ' THEN
SET elementref = 'hexlowvalue' |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 26, 2016 5:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Is it legal (according to W3C) to have low values in an element?
If it is, then the code will be something like:
Code: |
DECLARE bLV BLOB X'00';
If elementRef =' ' THEN
SET elementRef = CAST(bLV AS CHAR);
|
Code untested, sold as seen, cavet emptor, no liability accepted for damage or loss howsoever caused, etc, etc.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Lebowski |
Posted: Mon Jun 20, 2016 5:14 am Post subject: |
|
|
Newbie
Joined: 26 May 2016 Posts: 7
|
After coming back and looking over this I realise I didn't quiet explain this fully.
The problem is stemming from the values going to the back end in a message set and the local element length only being one byte. Is there a way I can pass on these low value characters without altering the message set? |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 20, 2016 5:24 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What's the definition of the field in the message set?
(It's not an XML message set, yes?)
Regardless, Vitor's solution is generally correct. For a character field, create a blob with the low value you need - it sounds like you need something more than one byte long, so you'd have to adjust his.
For other data types, create an appropriate value that you need to send, with the right length.
Check that the input field you're working with meets the criteria - FIELDLENGHT == 1 or etc - and then assign the output field with your custom value.
Then you just have to make sure the message set treats this data as valid... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|