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 » trailing spaces in TDS mesasge

Post new topic  Reply to topic
 trailing spaces in TDS mesasge « View previous topic :: View next topic » 
Author Message
suraj
PostPosted: Tue May 13, 2008 6:34 am    Post subject: trailing spaces in TDS mesasge Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

Hi

I have a file that has numner of pipe delimited records. It looks like
gfgdfg|sgg|sgs|1343|
sfsdgg|sdg|sdf|1434|

But after the last "|" there are some blank spaces for each record.

I am reading this file using the fileInput node and have a TDS message def for this.
The problem is the spaces, the file fails to parse , the exception saying "not all buffer used while reading".
Without the spaces after the record, the flows works fine.

So how can i avoid those trailing spaces while parsing the file ?
Back to top
View user's profile Send private message
broker_new
PostPosted: Tue May 13, 2008 6:42 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

For first line.
Create a type Type1 and add all the elements under that Type1.
Create one more type Type 2 and add all the elements under that Type2.

For Type1 Select DataElementSeparation as All elements Delimited and mention delimiter as (|).
Do the same thing for Type2 too.

Create one more type called Type 3 and add create two child elements under that and for first element create the reference to Type1 and for second element refer to Type 2.
For Type3 Select DataElementSeparation as All elements Delimited and mention delimiter as (<LF>).

Refer this Type3 type in messages.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
suraj
PostPosted: Tue May 13, 2008 6:51 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

thnks,

i have modeled the message the same way.

Type1 with DataElementSeparation as all elements delimited by | and group terminator as |, cause i have | at end of each record.
Type2 has an element of type1 which occurs from 1 to -1(since my file as many reords), and delimited by LF.

And the Message is of type2.

But this does not work.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 13, 2008 7:01 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
But this does not work.

What can broker_new, or anybody else, do with that information? Either describe the problem properly, or don't bother to mention it.


Have you tried taking a user trace to see what the parser is doing?
Back to top
View user's profile Send private message
suraj
PostPosted: Tue May 13, 2008 7:17 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

I have already described the problem in my post.

The problem is that each record has some trailing spaces at the end. And the parsing fails because of this.
I have also mentioned how did i model the message.

So how do i make the parser ignore the trailing spaces at the end of the records.
Back to top
View user's profile Send private message
broker_new
PostPosted: Tue May 13, 2008 7:24 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

You should not mention the GroupTerminator in your scenario it is simple straight forward configuration.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
suraj
PostPosted: Tue May 13, 2008 7:42 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

hm... i had tried this..but in this case the last element has an value with | as the last byte.
Each record ends with |. So i had the group terminator there.

I guess.. i will add an extra element to the defination... and just neglect this after the parsing. this may not be the correct way ..but it will certainly help...

Thanks for your help.
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 » trailing spaces in TDS mesasge
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.