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 » TDS Questions

Post new topic  Reply to topic Goto page Previous  1, 2
 TDS Questions « View previous topic :: View next topic » 
Author Message
kimbert
PostPosted: Mon Mar 13, 2006 1:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Quote:
Regarding the packed decimal fields, what do you propose I do to handle this?
After a lot of thought, I don't think you can do this using the MRM. Here's why:
1. The TDS physical format does not have a physical type of 'packed decimal'
2. In order to handle this in ESQL, you would first need to get the raw bytes from the bitstream. The only way to do this is to declare the field with a logical type of 'binary' ( otherwise the bytes will be converted into characters )
3. The TDS parser insists that binary fields have a length ( because in the general case, you cannot delimit a binary field ). I assume that your delimiter has a character code higher than 0x9F, otherwise it might collide with a valid packed decimal byte value.

So you need the raw bytes, but in order to get them, you need to know the length of the field. I honestly cannot think of a way to get around this problem. Suggestions welcome.
Back to top
View user's profile Send private message
cloucas
PostPosted: Mon Mar 13, 2006 2:00 am    Post subject: Reply with quote

Apprentice

Joined: 10 Mar 2006
Posts: 37

Hi again

After implementing the MRM parser with the ending structure I get:

(0x01000021):MRM = (
(0x0300000B):PROGID = 'SYPTMQS '
(0x0300000B):SystemHeader = 'FSSYTM7922MULT0002006020712280700030113B009 '
(0x0300000B):ApplicationArea = ' '
(0x0300000B):Filler = 'M000GN00000011' from trace node '0008UPDATE OK 0011'.
The trace node '0008UPDATE OK 0011' has output the specified trace data.
This is an information message provided by the message flow designer. The user response will be determined by the local environment.
2006-03-13 11:55:21.796722 2088 UserTrace BIP4067I: Message propagated to output terminal for trace node 'Response_From_Host_7033.Trace'.
The trace node 'Response_From_Host_7033.Trace' has received a message and is propagating it to any nodes connected to its output terminal.
No user action required.

It seems to me that the parse completely ignores the body structure of the message containing the tag delimited fields.

Thanks

cloucas
Back to top
View user's profile Send private message
cloucas
PostPosted: Mon Mar 13, 2006 2:02 am    Post subject: Reply with quote

Apprentice

Joined: 10 Mar 2006
Posts: 37

Hi kimbert

I do know that the packed decimal field length is 15 bytes long. Does that help?

Thanks

cloucas
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 13, 2006 2:42 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Quote:
I do know that the packed decimal field length is 15 bytes long. Does that help?
Yes, it does. I was hoping that you might say that.
1. Define your field with logical type 'binary'
2. On the TDS properties of the element, set the length to 15 bytes
3. Put a trace node in your message flow, trace ${Root} and check that the message tree looks correct.

Once you have the raw bytes in the message tree, you have two options:
1. Use the CWF parser to re-parse the packed decimal as a number. This is straightforward, but best left to another post, as the description could get lengthy.
2. Code yourself a packed decimal decoding algorithm in ESQL
Back to top
View user's profile Send private message
cloucas
PostPosted: Mon Mar 13, 2006 4:22 am    Post subject: Reply with quote

Apprentice

Joined: 10 Mar 2006
Posts: 37

Thanks kimbert

back to the discussion regarding the trailing spaces, I have defined a filler element as a string field with a length of 3987 bytes in the message following the message body containing all tag delimited fields.

The message is parsed correctly (using MRM parser) until the last tagged field. This field should be a string with length of 16 characters, but in the trace it appears as having a length of the entire 16 characters plus the filler characters...it so happens that both the data of the field and the filler characters are (HEX 40) or space.

Here's a part of the trace near the end:

2006-03-13 14:19:36.408306 1804 ParserException BIP5286E: Message Translation Interface Writing Errors have occurred:
Message Set Name : 'messageSetResponse'
Message Set Level : '1'
Message Format : 'ELSResponseTDS'
Message Type Path : 'r7033'
Review further error messages for an indication to the cause of the errors.
2006-03-13 14:19:36.408508 1804 ParserException BIP5447S: Tagged/Delimited String Format (TDS) writing error while writing message 'r7033'
See following errors for more details.
2006-03-13 14:19:36.408592 1804 ParserException BIP5452E: Mandatory Element 176^Filler has no value or default value set.
Mandatory element (176^Filler) has not been set and has no default value. A mandatory fixed length element must have a value set or a default value specified.
Set a value or specify a default value for this element.
2006-03

Is there something I should do here?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 13, 2006 4:36 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Firstly, I note that your error is coming from the writer (serializer). It's complaining that the last field in your message definition has no content ( presumably because all of the content which it was meant to contain went into the preceding field!)
Quote:
This field should be a string with length of 16 characters
Hmmm. I thought all your fields were 'Tagged Delimited
Did you specify a length for this last tagged field? If not, the TDS parser will simply look for the next piece of markup (delimiter / group terminator etc). There's not much else it can do, if you think about it.
Back to top
View user's profile Send private message
cloucas
PostPosted: Mon Mar 13, 2006 6:35 am    Post subject: Reply with quote

Apprentice

Joined: 10 Mar 2006
Posts: 37

Hi kimbert

I have checked my definition of the last tagged field, and is indeed a string type tagged field with tag 0207, and length 16.

Note here that the body of the message has a group indicator of <U+0011> but no group terminator, therefore the next byte following the data of the last tagged field is the first byte of the data of the filler field. Please also note that I have defined the filler field as a field similar to the two headers at the start of the message, i.e with no tag, but with a length of 3987 with padding set to SPACE and Left Justified justification.


Thanks

cloucas
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 13, 2006 6:52 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Hi,

Strings work differently from binary fields. If you say that a string is delimited then its length will be ignored. You need to put your final string field inside a group, and set the Data Element Separation of the group to 'Tagged Fixed Length'.
Back to top
View user's profile Send private message
cloucas
PostPosted: Mon Mar 13, 2006 7:39 am    Post subject: Reply with quote

Apprentice

Joined: 10 Mar 2006
Posts: 37

Do you mean that I should include the last tagged field in a group or the filler in the group?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 13, 2006 8:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

The last tagged field.
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 » TDS Questions
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.