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 » Fixed length question

Post new topic  Reply to topic Goto page Previous  1, 2
 Fixed length question « View previous topic :: View next topic » 
Author Message
kimbert
PostPosted: Mon Feb 02, 2009 3:33 pm    Post subject: Reply with quote

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:
Code:
^Z.*[99]
( "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
View user's profile Send private message
giorginus80
PostPosted: Tue Feb 03, 2009 2:54 am    Post subject: Reply with quote

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:
Code:
^Z.*[99]
( "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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Fixed length question
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.