|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Data Pattern not working on Parent Element |
« View previous topic :: View next topic » |
Author |
Message
|
Mohit Gupta |
Posted: Thu Dec 09, 2004 9:55 pm Post subject: Data Pattern not working on Parent Element |
|
|
Apprentice
Joined: 16 Sep 2004 Posts: 34
|
Hi,
If i use Data Element Seperation as Use Data Pattern for a type let say NominalHeader which has three elments Account,OpeningBal,ClosingBal
then even after defining data pattern for each element MRM parser doesn't apply pattern as a whole. I think first it should read the data pattern on NominalHeader and then its child elements.
Does that mean thet Data Pattern option under Field Identification is irrevelant for Parent Element if yes then how do i differentiate between text:
1311000AUD,10180.70,13835.70
input:
1,1000,FK,2004,06,08/06/04,02/07/04,1328456AUD,AUD,3106,AUD,135937.2,135937.2,135937.2,135937.2,,,,,
for first row i have given data pattern on NominalHeader as
[0-9]+[A-Z]{3},[0-9]+,[0-9]+
and subsequently for its child elements.
MRM Parser showing me the NominalHeader element with Account value as 1 which is incorrect.
Can anybody tell me the reason.
Cheers,
Mohit Gupta |
|
Back to top |
|
 |
kimbert |
Posted: Fri Dec 10, 2004 1:08 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
for first row i have given data pattern on NominalHeader as
[0-9]+[A-Z]{3},[0-9]+,[0-9]+ |
Your pattern does not take into account the decimal points. Try
Code: |
[0-9]+[A-Z]{3},[0-9]+\.[0-9]{2},[0-9]+\.[0-9]{2} |
Note that I've escaped the decimal point, as it would otherwise be interpreted as 'any character'
Note that this pattern only works if you are guaranteed to have a decimal point followed by exactly two digits. |
|
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
|
|
|
|