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 » EVAL function throwing 'Unrecognised character' exception

Post new topic  Reply to topic
 EVAL function throwing 'Unrecognised character' exception « View previous topic :: View next topic » 
Author Message
bharathgvs
PostPosted: Tue Sep 16, 2014 3:44 am    Post subject: EVAL function throwing 'Unrecognised character' exception Reply with quote

Newbie

Joined: 04 Aug 2014
Posts: 5

Hi Everyone,

I am facing some problem with the EVAL function used in my code.

Here is the code I am using..

Code:
SET vSendingSystem = OutputRoot.XMLNSC.*[<].SendingSystem;
      
      IF EVAL('PCD_SUB_VALUES.Carrier_'|| vSendingSystem ||'.TierConversion') = 'Y' THEN  ---Some statements --- END IF;


It is throwing 'Unrecognised character(2554)' exception when the value passed to the vSendingSystem is something like 'C@'(some special character).
I tried searching it, nothing helped.
Can anyone help on this

Regards
Bharath GVS
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Sep 16, 2014 6:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please post the full text of the error.
To get the full text:
- if on Windows, disconnect the Catch terminal on the input node, and allow the exception to get written to Windows Event Viewer ( Application log ).
- or, take a user trace. It will contain the full text of the error.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
bharathgvs
PostPosted: Tue Sep 16, 2014 10:28 pm    Post subject: Reply with quote

Newbie

Joined: 04 Aug 2014
Posts: 5

Thanks for the reply. Here is the part of the user trace where the error occured.
Code:
2014-09-16 20:14:56.901866    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''DECLARE vSqlState, vSqlErrorText CHARACTER;'' at ('.PCDInboundMsgFlow_Compute.Main', '19.3').
2014-09-16 20:14:56.901943    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''DECLARE vSuccessFlag, vHistoryFlag BOOLEAN FALSE;'' at ('.PCDInboundMsgFlow_Compute.Main', '20.3').
2014-09-16 20:14:56.901988    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''DECLARE vInputRef REFERENCE TO InputRoot;'' at ('.PCDInboundMsgFlow_Compute.Main', '21.3').
2014-09-16 20:14:56.902034    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''DECLARE vOutputRef REFERENCE TO OutputRoot;'' at ('.PCDInboundMsgFlow_Compute.Main', '22.3').
2014-09-16 20:14:56.902088    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''DECLARE vProfileID INTEGER;'' at ('.PCDInboundMsgFlow_Compute.Main', '23.3').
2014-09-16 20:14:56.902130    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''DECLARE vFFPName, vFFPTierStatus CHARACTER '';'' at ('.PCDInboundMsgFlow_Compute.Main', '24.3').
2014-09-16 20:14:56.902175    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''DECLARE vSendingSystem CHARACTER;'' at ('.PCDInboundMsgFlow_Compute.Main', '25.3').
2014-09-16 20:14:56.902252    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''SET vSendingSystem = OutputRoot.XMLNSC.*:*[<].SendingSystem;'' at ('.PCDInboundMsgFlow_Compute.Main', '27.3').
2014-09-16 20:14:56.902305    13508   UserTrace   BIP2539I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression ''OutputRoot.XMLNSC.*:*[<].SendingSystem'' at ('.PCDInboundMsgFlow_Compute.Main', '27.24'). This resolved to ''OutputRoot.XMLNSC.*:*[<].SendingSystem''. The result was '''C@'''.
2014-09-16 20:14:56.902347    13508   UserTrace   BIP2537I: Node 'PCDInboundMsgFlow.Compute': Executing statement   ''IF EXISTS(OutputRoot.XMLNSC.*:*[<].*:*[<].TierLevel[ ]) AND EVAL('PCD_SUB_VALUES.Carrier_' || vSendingSystem || '.TierConversion') = 'Y' THEN... END IF;'' at ('.PCDInboundMsgFlow_Compute.Main', '30.3').
2014-09-16 20:14:56.902404    13508   UserTrace   BIP2539I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression ''OutputRoot.XMLNSC.*:*[<].*:*[<].TierLevel[ ]'' at ('.PCDInboundMsgFlow_Compute.Main', '30.15'). This resolved to ''OutputRoot.XMLNSC.*:*[<].*:*[<].TierLevel[]''. The result was ''LIST... First Element Type=50331648 NameSpace='' Name='TierLevel' Value='5'''.
2014-09-16 20:14:56.902450    13508   UserTrace   BIP2540I: Node 'PCDInboundMsgFlow.Compute': Finished evaluating expression ''EXISTS(OutputRoot.XMLNSC.*:*[<].*:*[<].TierLevel[ ])'' at ('.PCDInboundMsgFlow_Compute.Main', '30.8'). The result was ''TRUE''.
2014-09-16 20:14:56.902492    13508   UserTrace   BIP2538I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression ''EVAL('PCD_SUB_VALUES.Carrier_' || vSendingSystem || '.TierConversion')'' at ('.PCDInboundMsgFlow_Compute.Main', '31.8').
2014-09-16 20:14:56.902534    13508   UserTrace   BIP2539I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression ''vSendingSystem'' at ('.PCDInboundMsgFlow_Compute.Main', '31.41'). This resolved to ''vSendingSystem''. The result was '''C@'''.
2014-09-16 20:14:56.902572    13508   UserTrace   BIP2539I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression '''PCD_SUB_VALUES.Carrier_' || vSendingSystem'' at ('.PCDInboundMsgFlow_Compute.Main', '31.38'). This resolved to '''PCD_SUB_VALUES.Carrier_' || 'C@'''. The result was '''PCD_SUB_VALUES.Carrier_C@'''.
2014-09-16 20:14:56.902614    13508   UserTrace   BIP2539I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression '''PCD_SUB_VALUES.Carrier_' || vSendingSystem || '.TierConversion''' at ('.PCDInboundMsgFlow_Compute.Main', '31.56'). This resolved to '''PCD_SUB_VALUES.Carrier_C@' || '.TierConversion'''. The result was '''PCD_SUB_VALUES.Carrier_C@.TierConversion'''.
2014-09-16 20:14:56.902954    13508   UserTrace   BIP2231E: Error detected whilst processing a message in node 'PCDInboundMsgFlow.PCD_BIZ_INQ'.
                                       The message broker detected an error whilst processing a message in node 'PCDInboundMsgFlow.PCD_BIZ_INQ'. The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
                                       See the following messages for details of the error.
2014-09-16 20:14:56.903106    13508   RecoverableException  BIP2230E: Error detected whilst processing a message in node 'PCDInboundMsgFlow.Compute'.
                                       The message broker detected an error whilst processing a message in node 'PCDInboundMsgFlow.Compute'. An exception has been thrown to cut short the processing of the message.
                                       See the following messages for details of the error.
2014-09-16 20:14:56.903144    13508   RecoverableException  BIP2488E:  ('.PCDInboundMsgFlow_Compute.Main', '30.3') Error detected whilst executing the SQL statement ''IF EXISTS(OutputRoot.XMLNSC.*:*[<].*:*[<].TierLevel[ ]) AND EVAL('PCD_SUB_VALUES.Carrier_' || vSendingSystem || '.TierConversion') = 'Y' THEN... END IF;''.
                                       The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
                                       See the following messages for details of the error.
2014-09-16 20:14:56.903179    13508   RecoverableException  BIP2554E: ('', '1.25') : Unrecognized character ''@'' in input.
                                       The character was ''@''.
                                       Correct the syntax of your ESQL expression in node '''', around line and column ''1.25'', then redeploy the message flow.


Please suggest what I can do for this..

Thanks in advance
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Sep 16, 2014 11:53 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

What does the message tree that this is evaluating against look like?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 17, 2014 12:25 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This looks fairly clear:
Code:
2014-09-16 20:14:56.902492    13508   UserTrace   BIP2538I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression ''EVAL('PCD_SUB_VALUES.Carrier_' || vSendingSystem || '.TierConversion')'' at ('.PCDInboundMsgFlow_Compute.Main', '31.8').
2014-09-16 20:14:56.902534    13508   UserTrace   BIP2539I: Node 'PCDInboundMsgFlow.Compute': Evaluating expression ''vSendingSystem'' at ('.PCDInboundMsgFlow_Compute.Main', '31.41'). This resolved to ''vSendingSystem''. The result was '''C@'''.
The 'C@' is the value of vSendingSystem. It's difficult to analyse why it has that value without seeing the input XML and/or some Trace node output.

btw, I would go a long way to avoid using EVAL. One alternative would be
Code:
MOVE myREF FIRSTCHILD NAME vSendingSystem;
The LASTMOVE variable would tell you whether the MOVE succeeded, and then you could throw a user exception if necessary. Seems like a more controlled way to handle the unknowns.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
bharathgvs
PostPosted: Wed Sep 17, 2014 1:45 am    Post subject: Reply with quote

Newbie

Joined: 04 Aug 2014
Posts: 5

Thanks for the quick replies.
The input message looks like this.
<?xml version="1.0" encoding="UTF-8"?>
<p:CreateProfileRequest xmlns:p="http://www.staralliance.com/loyalty/pcd/services/premiumcustomerdata/request">
<SendingSystem>C@</SendingSystem>
<AirlineCode>CA</AirlineCode>
<MemberProfile>
<FrequentFlyerNumber>123478</FrequentFlyerNumber>
<FrequentFlyerName>Bharath GVS</FrequentFlyerName>
<TierLevel>5</TierLevel>
</MemberProfile>
</p:CreateProfileRequest>

vSendingSystem is taken from the "SendingSystem" element in the XML..
I need to get the value of Carrier_{vSendingSystem} from a shared row i.e., PUB_SUB_VALUES. So, I tried using EVAL as in the code.
For normal values like 'CA' it is perfectly working.. Only if I give it like 'C@' it is throwing that exception.
Hope I am clear this time.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Sep 17, 2014 2:29 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Perhaps the '@' character is something else.

The reason for me saying this is that the airline code (IATA) CA means 'China Airlines'.

{unless the poster obfuscated the real airline code}
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
vicentius
PostPosted: Wed Sep 17, 2014 2:39 am    Post subject: Reply with quote

Apprentice

Joined: 01 Mar 2013
Posts: 28

So, basically, you want to use in a tree a field with the name 'C@'. And do stuff like SET myRowRef.C@ = 'somethingorother' or EVAL('someRef.C@').
Which would be wrong, because field names, like all identifiers recognized in ESQL, can contain only alphanumeric characters plus the underscore. Also, the first character cannot be numeric and names must be at least one character long.
But I hope I understood the problem wrong...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EVAL function throwing 'Unrecognised character' exception
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.