|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL THROW EXCEPTION statement |
« View previous topic :: View next topic » |
Author |
Message
|
EKhalil |
Posted: Thu May 11, 2006 10:09 am Post subject: ESQL THROW EXCEPTION statement |
|
|
Voyager
Joined: 29 Apr 2003 Posts: 99 Location: Boston, MA
|
From manual:
"...--Check for invoice number lower than permitted range
IF Body.Invoice.InvoiceNo < 100000 THEN
THROW USER EXCEPTION CATALOG 'MyCatalog' MESSAGE 1234 VALUES
('Invoice number too low', Body.Invoice.InvoiceNo);..."
If I follow and code my statement like this
THROW USER EXCEPTION CATALOG 'HUB' MESSAGE 9003 VALUES('Policy Retrieve Reply;;Search for UUID for KeyGroup ',Body.POLICY_REPLY_AREA.PR_POLICY_INFO.PR_PARTY_INFO[KeyIndex].PYRS_PARTY_ID, 'returned empty result set');
I get a deploy error stating BIP2432E: (.PolicyRetrieveHomeownersAndFire.Main, 251.118) : The correlation name 'Body' is not valid. On the other hand if I use InputBody the value of InputBody.POLICY_REPLY_AREA.PR_POLICY_INFO.PR_PARTY_INFO[KeyIndex].PYRS_PARTY_ID is unknown and I still do not know which party Id caused abend (without looking through traces). Is there another way to do this without using variables ??? Is this a bug in the software or misprint in the manual ??? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 11, 2006 10:19 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's neither a bug in the software or a misprint in the manual.
It's, at best, a confusion in your mind.
If you are writing ESQL in a node that can change the message, then you MUST use InputBody or InputRoot. If you are writing ESQL in a node that CAN'T change the message, then you MUST use Body or Root.
If the trace does not show a value for your PYRS_PARTY_ID, then nothing can be done to extract it. If the trace DOES show a value for your PYRS_PARTY_ID, then you aren't accessing it properly when you say InputBody.POLICY_REPLY_AREA.PR_POLICY_INFO.PR_PARTY_INFO[KeyIndex].PYRS_PARTY_ID. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EKhalil |
Posted: Thu May 11, 2006 10:55 am Post subject: |
|
|
Voyager
Joined: 29 Apr 2003 Posts: 99 Location: Boston, MA
|
Thanks for clearing up my confusion  |
|
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
|
|
|
|