|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Fixed length question |
« View previous topic :: View next topic » |
Author |
Message
|
kimbert |
Posted: Mon Feb 02, 2009 3:33 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5543 Location: Southampton
|
Hi again,
Quote: |
I can detect header and footer, but I have problem detecting the body. |
Yes, that is a problem. I missed the fact that your body lines do not have tags
That makes the CSV sample quite relevant. It uses Data Patterns for the same reason.
So my advice changes to:
You need to
- Not forget about Data Patterns
- On the outermost complex type, set the Data Element Separation to 'Use Data Pattern'
- On the outermost complex type, set the Group Indicator to <CR><LF>
- On the element for each fixed-length structure, set the Data Pattern.
When you specify a data pattern for a structure, it must match the entire structure. So your data pattern for the body line needs to be:
( "any character except Z, followed by any 99 characters" ). You may need to modify that if the body is allowed to begin with a single Z.
You need to apply a similar technique to the data pattern for the trailer record. And the header, if you decide to include it in the Use Data Pattern complex type ( there is no need to, of course ).
Not making excuses here ( OK, I am ) but it's easy to miss details when the problem statement includes your entire mxsd. You will get better results if you describe what you have done in a more compact way. |
|
Back to top |
|
 |
giorginus80 |
Posted: Tue Feb 03, 2009 2:54 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
kimbert wrote: |
- Not forget about Data Patterns
- On the outermost complex type, set the Data Element Separation to 'Use Data Pattern'
- On the outermost complex type, set the Group Indicator to <CR><LF>
- On the element for each fixed-length structure, set the Data Pattern.
When you specify a data pattern for a structure, it must match the entire structure. So your data pattern for the body line needs to be:
( "any character except Z, followed by any 99 characters" ). You may need to modify that if the body is allowed to begin with a single Z.
You need to apply a similar technique to the data pattern for the trailer record. And the header, if you decide to include it in the Use Data Pattern complex type ( there is no need to, of course ).
Not making excuses here ( OK, I am ) but it's easy to miss details when the problem statement includes your entire mxsd. You will get better results if you describe what you have done in a more compact way. |
Thanks it worked! |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|