Author |
Message
|
woolmerc |
Posted: Wed Jun 23, 2004 3:59 pm Post subject: Interpreting a byte from MQRFH2 header |
|
|
 Novice
Joined: 12 May 2004 Posts: 21
|
Hi guys,
This is probably a really simple question, but something I haven't been able to get on top of yet.
I have a message coming into the broker that has an RFH2 user portion. One of the values I am retrieving is a simple byte -- either a 0 or 1. I need to base some conditions in my ESQL code based on the value of this byte.
So far I have not been able to code an expression that will test this value. I have tried:
Code: |
DECLARE msgAction REFERENCE TO InputRoot.MQRFH2.usr.ACTION;
IF (msgAction = '1')
...... |
but this does not work. The value of the byte (when = 1) is seen as by the broker.
Can anyone help?
Thanks, _________________ Chris Woolmer
Programmer
KAZ Group Limited |
|
Back to top |
|
 |
maxis |
Posted: Thu Jun 24, 2004 3:07 am Post subject: |
|
|
Centurion
Joined: 25 Jun 2002 Posts: 144
|
I dont have exact answer but I do have idea to solve it ..
Put the trace node and get the complete trace .. may be ${Root}
That will give the exact tree structure and hierarchy; use this in the ESQL and try again.
cheers
M |
|
Back to top |
|
 |
Hari |
Posted: Thu Jun 24, 2004 9:33 am Post subject: |
|
|
 Centurion
Joined: 21 Nov 2002 Posts: 117 Location: USA
|
Try Casting to a CHARACTER, and see if that helps. |
|
Back to top |
|
 |
Hari |
Posted: Thu Jun 24, 2004 9:45 am Post subject: |
|
|
 Centurion
Joined: 21 Nov 2002 Posts: 117 Location: USA
|
try casting the actual expression and not the REFERENCE variable  |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 24, 2004 9:51 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Hari wrote: |
try casting the actual expression and not the REFERENCE variable  |
Why?
That would eliminate the benefits of using a reference. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
woolmerc |
Posted: Thu Jun 24, 2004 10:24 pm Post subject: |
|
|
 Novice
Joined: 12 May 2004 Posts: 21
|
Thanks for trying to help guys.
I had already tried the casting but it also failed. I was kinda hoping the broker would perform an implicit cast for me. Unfortunately not.
I have now redesigned how I am putting the value into the RFH2 header so that the broker now sees it as a 1.
Thanks again, _________________ Chris Woolmer
Programmer
KAZ Group Limited |
|
Back to top |
|
 |
|