ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » catch Create-PArse Comput node error

Post new topic  Reply to topic
 catch Create-PArse Comput node error « View previous topic :: View next topic » 
Author Message
scravr
PostPosted: Wed Apr 20, 2011 8:53 am    Post subject: catch Create-PArse Comput node error Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

Is there a way to catch in compuete node an error generated from CREATE PARSE command?

Can DECLARE CONTINUE HANDLER catch it? Whats is the syntax?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Wed Apr 20, 2011 9:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

DECLARE HANDLER can catch any kind of exception, including exceptions in processing ESQL code.

Best bet is to experiment.
Back to top
View user's profile Send private message
scravr
PostPosted: Wed Apr 20, 2011 9:07 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

in 7.0.0.0 i have this and its not catching:
DECLARE CONTINUE HANDLER FOR SQLSTATE LIKE '%'



anything other than "SQLSTATE" gives deploy error !!!
Back to top
View user's profile Send private message Send e-mail MSN Messenger
scravr
PostPosted: Wed Apr 20, 2011 10:28 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

when using this
Set vstatus = ParseValiadte(InputRoot, Environment, encd, csid);

the function is not executed. in debug mode I do not see stepping into function:


Create Function ParseValiadte(In InRootRef Reference,In EnvRef Reference, In encd int,
In csid int) Returns Char
BEGIN
DECLARE CONTINUE HANDLER FOR SQLSTATE LIKE '%'
BEGIN
DECLARE opts Int BitOr(RootBitStream,ValidateNone);
DECLARE opts1 Int BitOr(RootBitStream,ValidateImmediate,ValidateContent, ValidateExceptionList);
DECLARE opts2 Int BitOr(RootBitStream,ValidateImmediate,ValidateContent,ValidateLocalError);
DECLARE optsM Int BitOr(RootBitStream,ValidateImmediate,ValidateContentAndValue,ValidateUserTrace);
Create LastChild Of EnvRef.TempParse Domain (dmn)
Parse(FilterMsg ENCODING encd CCSID csid SET MsgSet TYPE MsgType FORMAT MsgFmt OPTIONS optsM);
If (SQLSTATE is not null) Then
return 'FAIL';
Else
return 'PASS';
End If;
END;
END;
Back to top
View user's profile Send private message Send e-mail MSN Messenger
scravr
PostPosted: Wed Apr 20, 2011 1:08 pm    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

this is resulved.
DECLARE CONTINUE HANDLER FOR SQLSTATE ...... must be defined on
CREATE FUNCTION Main()
NOT on internal function
Back to top
View user's profile Send private message Send e-mail MSN Messenger
scravr
PostPosted: Thu Apr 21, 2011 6:33 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

Where can I find the validation error text/code/state...
In debug mode I do not see any....


this is the main compute module:
CREATE COMPUTE MODULE TEST_FILTER_VALIDATION
Declare dmn, MsgType, MsgSet, MsgFmt, FilterCode, FilterMsg, vstatus char;
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE CONTINUE HANDLER FOR SQLSTATE LIKE '%'
BEGIN
declare tmp char;
set tmp = cast(SQLCODE as char); -- this is zero (0)
set tmp = cast(SQLSTATE as char); -- this is empty
set tmp = cast(SQLNATIVEERROR as char); -- this is empty
set tmp = SQLERRORTEXT; -- this is empty
set vstatus = 'FAIL';
Delete Field Environment.TempParse;
END;
declare encd int cast (InputRoot.Properties.Encoding as int);
declare csid int cast (InputRoot.Properties.CodedCharSetId as int);
Declare rtVal Boolean False;
Declare i1,i2 int;
...
...
... here i have code to get the input message xml elements
...
...


here is how I call internal function to validate:
Set vstatus = ParseValiadte(InputRoot, Environment, encd, csid);




here is the function:
--
-- Parse and validate message against the parsed message set.
Create Function ParseValiadte(In InRootRef Reference,In EnvRef Reference, In encd int,
In csid int) Returns Char
BEGIN
DECLARE opts Int BitOr(RootBitStream,ValidateNone);
DECLARE opts1 Int BitOr(RootBitStream,ValidateImmediate,ValidateContent,ValidateExceptionList);
DECLARE opts2 Int BitOr(RootBitStream,ValidateImmediate,ValidateContent,ValidateLocalError);
DECLARE opts3 Int BitOr(RootBitStream,ValidateImmediate,ValidateContentAndValue,ValidateUserTrace);
DECLARE opts4 Int BitOr(RootBitStream,ValidateImmediate,ValidateContentAndValue,ValidateLocalError);
DECLARE optsM Int BitOr(RootBitStream,ValidateImmediate,ValidateContentAndValue,ValidateExceptionList);
set vstatus = 'PASS';
Create LastChild Of EnvRef.TempParse Domain (dmn)
Parse(FilterMsg ENCODING encd CCSID csid SET MsgSet TYPE MsgType FORMAT MsgFmt OPTIONS opts3);
Delete Field Environment.TempParse;
return vstatus;
END;
--
...
...

the Create LastChild always jumps to DECLARE CONTINUE HANDLER begin section with no explanation.
Where (in debug mode) can I find the error?
Should I change the options on the parse?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Thu Apr 21, 2011 6:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I believe that if you use your "optsM" value, then you will find the information you're looking for in either InputExceptionList or OutputExceptionList.
Back to top
View user's profile Send private message
scravr
PostPosted: Thu Apr 21, 2011 7:08 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

optsM did not do the trick
no error info anywhere in debug mode.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » catch Create-PArse Comput node error
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.