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 » NewLine Character as Group Terminator is not working

Post new topic  Reply to topic
 NewLine Character as Group Terminator is not working « View previous topic :: View next topic » 
Author Message
udaya_isampalli
PostPosted: Tue Mar 13, 2007 3:32 am    Post subject: NewLine Character as Group Terminator is not working Reply with quote

Novice

Joined: 09 Feb 2007
Posts: 13

i taking a TDS as input and XML as output for my message flow.
i am taking as newline as the Group Terminator that <CR><LF> and it worked fine.
but when i have taken this code to some other system at US it is not working i.e., it is not recognizing <CR><LF> as Group terminator.
please give some inputs to make my flow run. are do i need to use some other as new line charecter identifier than <CR><LF>
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Tue Mar 13, 2007 4:00 am    Post subject: Re: NewLine Character as Group Terminator is not working Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

uday_MCA wrote:
i taking a TDS as input and XML as output for my message flow.
i am taking as newline as the Group Terminator that <CR><LF> and it worked fine.
but when i have taken this code to some other system at US it is not working i.e., it is not recognizing <CR><LF> as Group terminator.
please give some inputs to make my flow run. are do i need to use some other as new line charecter identifier than <CR><LF>



I dont know if it help you but new line code depends on OS.

Mac - 0A
Unix - 0D
Windows - 0D0A

So maybe it is the reason ( different OS of broker or input message new line encoding).


Marcin
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Tue Mar 13, 2007 5:36 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Check your input message. You will probably find that it is using <LF> only ( or <CR> only ).
If you need to handle any or all of <CR><LF> and <LF> and <CR> as line terminators, I can provide a technique for doing that. But don't bother with that complexity unless your line terminator is genuinely unpredictable.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Tue Mar 13, 2007 5:43 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

kimbert wrote:

If you need to handle any or all of <CR><LF> and <LF> and <CR> as line terminators, I can provide a technique for doing that.



I'm very interested in this technique.

Please show us.

Because of this new line problems I dont use it as a separator.

Marcin
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Tue Mar 13, 2007 8:31 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

It's quite simple. You just create extra nested groups, one per extra delimiter that you want to handle. Each group has a different Delimiter ( or, as is often the case, Repeating Element Delimiter ). Usually, one or more of the alternatives is a substring of another ( e.g. <CR> is a substring of <CR><LF> ).
This technique has another useful side-effect : it can cope with blank lines very elegantly ( as long as they only come one at a time ). Just include a nested innermost group which defines its Delimiter or RED as two occurrences of the usual delimiter. If you want to do this trick, make sure that the longest delimiters are applied to the outermost group, otherwise you lose a tiny bit of flexibility in your model.

The example below would handle any mixture of <CR><LF> or <CR> or <LF>. It would also handle cases where you get <CR><LF> immediately followed by <CR> or <LF>. :
Code:

Message
    Group [ DES=AED, maxOccurs=-1, RED=<CR><LF> ]
        Group [ DES=AED, maxOccurs=-1, RED=<LF> ]
            Group [ DES=AED, maxOccurs=-1, RED=<CR> ]
                Element Line [Type=LineType, maxOccurs=1, DES=AED]
                    field1
                    field2
                    etc


Where
RED = Repeating Element Delimiter
DES = Data Element Separation
AED = All Elements Delimited
Back to top
View user's profile Send private message
udaya_isampalli
PostPosted: Tue Mar 13, 2007 8:44 pm    Post subject: Reply with quote

Novice

Joined: 09 Feb 2007
Posts: 13

thanks for the inputs.
i second environment i am trying to execute this flow is unix. so when i tried with <LF> as the Group Terminator to identify new line.
now the problem is as follows.
as i have each line suppose to produce one different file as output, with usage of <LF> it is not throwing error but all the output files are same what is there is first line of input file. does this <LF> move the cursor to starting of same line?
please provide some inputs on this
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Mar 14, 2007 1:21 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
all the output files are same what is there is first line of input file. does this <LF> move the cursor to starting of same line?

Have you put a Trace node into your flow to see what kind of message tree the parser has produced? If not, why not?
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 » NewLine Character as Group Terminator is not working
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.