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 » Problem with TDS message set

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 Problem with TDS message set « View previous topic :: View next topic » 
Author Message
Broker
PostPosted: Mon Mar 19, 2012 11:22 am    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

Sorry SAP actually places it in a queue and I take the file using the MQINPUT.
Sorry I was confused with the group indicators.

I use this code to count the occurances of Body 627 but as every time the field is being created it returns a count of 1.

CARDINALITY (InputRoot.MRM.Field_6.Body_tag_27[])
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Mar 19, 2012 11:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You probably need to use a SELECT statement to find all the relevant body fields.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 19, 2012 11:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Broker wrote:
SAP actually places it in a queue and I take the file using the MQINPUT.


Ok, I should have been clearer. Why are you not using the SAP adapters? There are a number of possible good reasons. Do you have access to any of the SAP artifacts?


Broker wrote:
I use this code to count the occurances of Body 627 but as every time the field is being created it returns a count of 1.


That's because both the code & the message set are hosed up. As you correctly indicated in your initial post.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Broker
PostPosted: Mon Mar 19, 2012 11:32 am    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

other interface takes care of the sap part which I am not working with. In my interface I just have to take in the message in text document and convert the message into different format required by other interface.
Back to top
View user's profile Send private message
Broker
PostPosted: Mon Mar 19, 2012 11:36 am    Post subject: You probably need to use a SELECT statement to find all the Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

How do I use a SELECT statement here? Can you help me with that ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 19, 2012 11:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Broker wrote:
. In my interface I just have to take in the message in text document and convert the message into different format required by other interface.


So this isn't a SAP document but a processed file? By "text document" do you mean each record is delimited by a <CR> or simply that it contains no binary data but remains fixed length is structure?

Better information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 19, 2012 11:40 am    Post subject: Re: You probably need to use a SELECT statement to find all Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Broker wrote:
How do I use a SELECT statement here?


Try here

Broker wrote:
Can you help me with that ?


Of course. What hourly rate are you offering and where do we send the invoice?

Seriously, you could be well adviced to seek experienced WMB support on site (where they can see & understand your issue more clearly) rather than picking through advice being given by random strangers on the Internet. We've already established my advice in particular can be highly random...

Complex message sets tend not to be fun.
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Mon Mar 19, 2012 11:44 am; edited 1 time in total
Back to top
View user's profile Send private message
Broker
PostPosted: Mon Mar 19, 2012 11:43 am    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

Sorry for the confusion I gave. Its not sap Document, Its a text document with each field with fixed length of 94 characters and separated by <CR><LF>.

and also to mention each record had sub records like body has fields like record type, amount etc which I am assigning these using fixed length condition once I am able to differentiate header, body and trailer.
Back to top
View user's profile Send private message
Broker
PostPosted: Mon Mar 19, 2012 11:47 am    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

Sorry I just asked as I never used SELECT in such a case.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 19, 2012 11:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Broker wrote:
Its a text document with each field with fixed length of 94 characters and separated by <CR><LF>.


So the records in your WMQ message are not a fixed length of 94 characters long as you claimed; they're 96. Or they're delimited by <CR><LF> and not fixed length at all. This gives you a number of design options.

Broker wrote:
also to mention each record had sub records like body has fields like record type, amount etc which I am assigning these using fixed length condition once I am able to differentiate header, body and trailer.


I thank you for the additional information, but had correctly assumed that once you'd identified the record type you were using the message set to parse it rather than substringing through it in ESQL. Your method is unquestionably standard practice for this situation.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 19, 2012 11:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Broker wrote:
Sorry I just asked as I never used SELECT in such a case.


Hence I supplied a link & the advice to seek more experienced help more locally based.

Advice I stand by. WMB is not a simple product, what you're parsing is not simple, your requirements are not simple. As a minimum, a 2nd pair of eyes could highlight an issue.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Broker
PostPosted: Mon Mar 19, 2012 12:03 pm    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

I can say they are delimited by <CR><LF> and are also fixed length of 94 characters including the tag excluding <CR><LF>.

Something like:

94 characters
94 characters
94 characters

I am not sure if this is the answer u wanted?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 19, 2012 12:12 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Broker wrote:
I am not sure if this is the answer u wanted?


It wasn't a question. You can either treat them as fixed length 96 byte records, or you can treat them as delimited. Hence my comment about "options".
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Broker
PostPosted: Mon Mar 19, 2012 12:19 pm    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

OKI got it. If i treat as a delimited with <CR><LF> in this case. How do I specify in my message set to differentiate between body and trailer.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Mar 19, 2012 12:20 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Broker wrote:
OKI got it. If i treat as a delimited with <CR><LF> in this case. How do I specify in my message set to differentiate between body and trailer.

You tell it to use tags or group indicators or data patterns to resolve choices.
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, 3  Next Page 2 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with TDS message set
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.