|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Empty string checking problem on migrating v2.0.2 code to v2 |
« View previous topic :: View next topic » |
Author |
Message
|
m00300 |
Posted: Wed Mar 12, 2003 7:52 am Post subject: Empty string checking problem on migrating v2.0.2 code to v2 |
|
|
Apprentice
Joined: 01 May 2002 Posts: 31
|
I'm currently testing our v2.0.2 code on an NT test server running v2.1 (CSD4) to see what
changes are going to be required and ive found a problem with empty string checking on
MRM fields.
v2.1 doesnt seem to be recognising an empty string ( '' ) in an MRM field (see bold field)
relevent part of sample input message :
<UK_RESIDENT_FLAG>Y</UK_RESIDENT_FLAG>
<ADDRESS>
<ADDRESS_TYPE_CODE>CORR</ADDRESS_TYPE_CODE>
<DATA_MANAGER_ADDRESS_ID>579</DATA_MANAGER_ADDRESS_ID>
<ADDRESS_REFUSAL_DATE></ADDRESS_REFUSAL_DATE>
<ADDRESS_LAST_UPDATE_DATE>03.03.1950</ADDRESS_LAST_UPDATE_DATE>
<ADDRESS_VERIFICATION_DATE></ADDRESS_VERIFICATION_DATE>
<COUNTRY></COUNTRY>
<COUNTY></COUNTY>
<FLAT_NUMBER>1/1</FLAT_NUMBER>
<HOUSE_NAME></HOUSE_NAME>
<HOUSE_NUMBER></HOUSE_NUMBER>
<POSTAL_TOWN>Edinburgh</POSTAL_TOWN>
<POSTCODE>EH9 1PB</POSTCODE>
<STREET_NAME>Livingstone Place</STREET_NAME>
<VILLAGE></VILLAGE>
</ADDRESS>
<CONTACT>
<CONTACT_NUMBER_TYPE>DAYNO</CONTACT_NUMBER_TYPE>
part of trace after input xml message parsed to MRM format :
(0x3000015)UK_RESIDENT_FLAG = 'Y'
(0x1000015)ADDRESS = (
(0x3000015)ADDRESS_TYPE_CODE = 'CORR'
(0x3000015)DATA_MANAGER_ADDRESS_ID = '579'
(0x1000015)ADDRESS_REFUSAL_DATE =
(0x3000015)ADDRESS_LAST_UPDATE_DATE = '03.03.1950'
(0x1000015)ADDRESS_VERIFICATION_DATE =
(0x1000015)COUNTRY =
(0x1000015)COUNTY =
(0x3000015)FLAT_NUMBER = '1/1'
(0x1000015)HOUSE_NAME =
(0x1000015)HOUSE_NUMBER =
(0x3000015)POSTAL_TOWN = 'Edinburgh'
(0x3000015)POSTCODE = 'EH9 1PB'
(0x3000015)STREET_NAME = 'Livingstone Place'
(0x1000015)VILLAGE =
)
(0x1000015)CONTACT = (
(0x3000015)CONTACT_NUMBER_TYPE = 'DAYNO'
In the following code the 'IS NULL' check is coming back false (as expected)
and the = '' check is failing with an Unexpected NULL value encountered.
So the IS NULL is False BUT there was a an unexpected NULL value ???!
Anyone know why this is ?
This code worked fine under v2.0.2
IF InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE IS NULL THEN
SET OutputRoot.MRM.INCU_CUSTOMER_MESSAGE.INAD_ADDRESS_MESSAGE[M].INAD_REFU_DT_PB = 'I';
SET OutputRoot.MRM.INCU_CUSTOMER_MESSAGE.INAD_ADDRESS_MESSAGE[M].INAD_REFU_DT = '';
ELSE
IF InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE = '' THEN
SET OutputRoot.MRM.INCU_CUSTOMER_MESSAGE.INAD_ADDRESS_MESSAGE[M].INAD_REFU_DT_PB = 'D';
SET OutputRoot.MRM.INCU_CUSTOMER_MESSAGE.INAD_ADDRESS_MESSAGE[M].INAD_REFU_DT = '';
ELSE
SET OutputRoot.MRM.INCU_CUSTOMER_MESSAGE.INAD_ADDRESS_MESSAGE[M].INAD_REFU_DT_PB = 'U';
SET OutputRoot.MRM.INCU_CUSTOMER_MESSAGE.INAD_ADDRESS_MESSAGE[M].INAD_REFU_DT = InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE;
END IF;
END IF;
In the message set the field in question is setup with NullLogicalValue with padding
character of NUL (this was the default on importing the message sets from v2.0.2 and
seems correct reading the help entry, compared with the setting in v2.0.2)
I also tried checking the LENGTH of the InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE
and this failed with the same error :
2003-03-12 14:25:08.404999 636 UserTrace BIP2537I: Node 'AD_TRA_XmlToFixedFormat.AD_TRA_Customer': Executing statement 'SET field_length = LENGTH(InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE);' at (2281, 4).
2003-03-12 14:25:08.404999 636 UserTrace BIP2538I: Node 'AD_TRA_XmlToFixedFormat.AD_TRA_Customer': Evaluating expression 'LENGTH(InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE)' at (2281, 23).
2003-03-12 14:25:08.404999 636 UserTrace BIP2538I: Node 'AD_TRA_XmlToFixedFormat.AD_TRA_Customer': Evaluating expression 'InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE' at (2281, 30).
2003-03-12 14:25:08.404999 636 UserTrace BIP2538I: Node 'AD_TRA_XmlToFixedFormat.AD_TRA_Customer': Evaluating expression 'I' at (2281, 52).
2003-03-12 14:25:08.404999 636 UserTrace BIP4081I: Message propagated to catch terminal from try-catch node 'AD_TRA_XmlToFixedFormat.DM_XXX_HandleException1.DM_XXX_HandleException_Sub1.Try_Catch'.
The try-catch node 'AD_TRA_XmlToFixedFormat.DM_XXX_HandleException1.DM_XXX_HandleException_Sub1.Try_Catch' has caught an exception which occurred in a node connected to its try terminal. The message has been augmented with an exception list and is propagating it to any nodes connected to its catch terminal for further processing. See the following messages for details of the exception list.
No user action required.
2003-03-12 14:25:08.404999 636 RecoverableException BIP2230E: Error detected whilst processing a message in node 'AD_TRA_XmlToFixedFormat.AD_TRA_Customer'.
The message broker detected an error whilst processing a message in node 'AD_TRA_XmlToFixedFormat.AD_TRA_Customer'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2003-03-12 14:25:08.404999 636 RecoverableException BIP2329E: An unexpected NULL value was encountered.
This message will be accompanied with others which will give the higher level context for this error. Look at these other messages to determine the root source of the problem. |
|
Back to top |
|
 |
yaakovd |
Posted: Wed Mar 19, 2003 11:39 am Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
1. Tag <COUNTY></COUNTY> is not NULL, also it is not ''.
You can use following:
Code: |
DECLARE REF_DATE CHAR;
SET REF_DATE = '';
SET REF_DATE = InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE; |
or something else, but not compare with '' directly.
1. Use
Code: |
SET field_length = LENGTH(CAST(InputRoot.MRM.ADDRESS[I].ADDRESS_REFUSAL_DATE AS CHAR)); |
You trying to use CHAR operations for non-character elements. _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
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
|
|
|
|