Author |
Message
|
WBI_user |
Posted: Fri Aug 10, 2007 6:18 am Post subject: ParseImmediate option |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
I am trying to build the parse option for my "Create...Parse" ESQL statement.
DECLARE options INTEGER BITOR(ValidateContent,ValidateException,ParseImmediate);
I got an error on ParseImmediate
But under Create statement of the info center, it says
Parse timing options...
ParseComplete
ParseImmediate
ParseOnDemand
So I think that "ParseImmediate" is a valid option.
What did I miss ?? |
|
Back to top |
|
 |
kimbert |
Posted: Fri Aug 10, 2007 4:23 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The docs are wrong. The constants should be
ValidateComplete
ValidateImmediate
ValidateDeferred |
|
Back to top |
|
 |
WBI_user |
Posted: Mon Aug 13, 2007 9:15 am Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
Thanks Kimbert.
I want to output a message when the parsing of the message fails. I tried the following and hit another problem.
DECLARE ParseOpts INTEGER BITOR(ValidateContent,ValidateUserTrace,ValidateImmediate);
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MRM'
PARSE(InputRoot.BLOB.BLOB OPTIONS ParseOpts ENCODING InputRoot.MQMD.Encoding CCSID InputRoot.MQMD.CodedCharSetId SET 'JL7OAHK002001' TYPE 'Customer' FORMAT 'CWF1');
IF OutputRoot.MRM.*[1] is NULL THEN
SET OutputRoot.XML.MSG.ERROR = 'FAIL TO PARSE';
I am not sure if checking OutputRoot.MRM.*[1] is good way to determine if the parsing of the message is successful. I try it anyway.
I use 'ValidateUserTrace' as the option hoping that the flow will not throw an exception and let me output the ERROR message.
But I alway got "An exception has been thrown to cut short the processing of the message. " So it never gets to output the error message.
I also tried 'ValidateLocalError' with the same problem.
According to the info center both 'User Trace' and 'Local Error Log' says
"Use this setting if you want processing of the message to continue regardless of validation failures. "
The compute node that contains the ESQL has validate =none specified
Any suggestion ? |
|
Back to top |
|
 |
kimbert |
Posted: Mon Aug 13, 2007 11:09 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
WBI_user |
Posted: Mon Aug 13, 2007 11:28 am Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
Thanks again Kimbert, I've taken a quick look at the link provided. Does it mean that if I use my own error handler (DECLARE HANDLER statement
), the broker will not throw the exception to cut the processing short ? I'll do more testing later.
Do do you have any idea why Validusertrace and ValidateLocalError is not preventing the exception to cut short the processing ? Did I miss understand the info center wordng ? |
|
Back to top |
|
 |
kimbert |
Posted: Tue Aug 14, 2007 1:19 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I'll do more testing later. |
Good idea, I'm afraid I don't know the answers to your other questions. |
|
Back to top |
|
 |
|