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 packed fields (SOLVED)

Post new topic  Reply to topic
 Problem with packed fields (SOLVED) « View previous topic :: View next topic » 
Author Message
Savis
PostPosted: Wed Nov 19, 2003 12:12 am    Post subject: Problem with packed fields (SOLVED) Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 10

I have a message consisting of several packed fields. I receive this as a BLOB and then send it through a Reset Content Descriptor node where I parse it as my message set (which is MRM/CWF).

Directly afterwards I try to map the content to another message set.

As soon as I try to access one of the packed fields (packed decimal, signed) I get an error like the the following:
ConversionException BIP5505E: Data conversion failed: data invalid. Type of data being read: packed decimal, no sign found , data: 0x072c;

I have used a hexeditor to create my input message (to avoid ccsid problems) and post it to the queue using rfhutil.

072c should validate into +072, at least according to all my known specifications.

Can anybody help me with this?


Last edited by Savis on Fri Nov 21, 2003 7:13 am; edited 1 time in total
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Nov 19, 2003 10:12 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Sounds like the definition of the field in the MRM might be wrong. Have you defined the length as the actual field length (2), not the length of the contents (3).

Also, why are you reading as BLOB and then using an RCD. Can't you just use the MRM details in the Input node.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Savis
PostPosted: Wed Nov 19, 2003 10:13 pm    Post subject: Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 10

Unfortunately that is not the problem. The field is set to length 2.

The reason I receive it as a blob is that I get x number of records in one single message. So I have to split it up (based on length) so that one record equals one message (since mrm can't handle an unknown number of records).

After this I propagate the message to the RCD and after that the problem arises.

Any other ideas?
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Nov 20, 2003 10:21 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Can you post the settings for that field.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Missam
PostPosted: Thu Nov 20, 2003 11:59 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Hi,
It Seems like that you defined the MessageSet Element datatype as decimal and you are getting signed value which can't be casted to Decimal.If this is the case You recreate the element as datatype string and handle the data according to your specs in compute node.
Thanx
Sam
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Nov 20, 2003 1:49 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

I would work on getting the definition correct.

Trying to handle PD fields that have been defined as strings is a nightmare.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Savis
PostPosted: Thu Nov 20, 2003 10:09 pm    Post subject: Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 10

The settings for the field:

Identifier - RECORD_TYPE_PACKED
Suspended from use - No
Type - DECIMAL

Repeat - No

Physical Type - Packed Decimal
Length count - 2
Length units - Bytes
Signed - Yes
Sign Alignment - N/A
Byte alignment - 1 Byte
String justification N/A
Padding charachter - (blank)
Virtual decimal point - 0
Skip count - 0
Encoding Null - NULLLogicalValue
Encoding null value - 0

That's about it I guess. If there's some info you need please let me know.
Back to top
View user's profile Send private message
Savis
PostPosted: Thu Nov 20, 2003 10:12 pm    Post subject: Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 10

Regarding the handling it as a string.

The last time I had to work with packed fields resulted in that I finally gave up and resorted to just pass the message through and unpack and handle everything in the receiving java program.

But this is such a small simple flow so I really do want to use the brokers abilitys. It should be able to handle this I'm sure but I guess I have some setting wrong.
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Nov 21, 2003 12:46 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Well, that definition matches exactly one I have for a PD field that does work. It is type INTEGER, isn't it.

My only other thought is if all the fields before this one have correct lengths, so that it really is parsing the correct 2 bytes.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Savis
PostPosted: Fri Nov 21, 2003 12:54 am    Post subject: Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 10

Unfortunately this is the first field and according to the log it parses the correct two bytes.

I'm expecting the result to be +072 and the log says it's x'072c'. According to my knowledge this is correct. But it still throws me the error.

Do you have an input file that looks somewhat similar to this or could this be the problem?
Back to top
View user's profile Send private message
jfluitsm
PostPosted: Fri Nov 21, 2003 6:12 am    Post subject: Reply with quote

Disciple

Joined: 24 Feb 2002
Posts: 160
Location: The Netherlands

You might have a problem with the encoding.
Probably the mrm parser expects x'2c07' (MQENC-DECIMAL-REVERSED).
To try this I mostly use mqsiput (supportpac ih02) as this utility has a lot of control over the MQMD contents and let you define the message contents in hex.
_________________
Jan Fluitsma

IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6
Back to top
View user's profile Send private message Send e-mail
Savis
PostPosted: Fri Nov 21, 2003 6:21 am    Post subject: Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 10

Hey! Now we seem to be getting somewhere... I remade my input test file to read x'2c07' and the error disappeared.

What encoding should I use instead of the one you mentioned?

The input file will come as my earlier example (072c - unreversed?) so I guess I can set another encoding on my mrm parser?

Thanks in advance
Back to top
View user's profile Send private message
Savis
PostPosted: Fri Nov 21, 2003 7:13 am    Post subject: Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 10

Yay! It's solved.

When I propagate my messages to the RCD node I use this:

SET OutputRoot.Properties.Encoding = MQENC_DECIMAL_NORMAL;

And then it works as expected.

Thank you everyone who helped out.
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Nov 21, 2003 9:04 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

That's the problem with 'hand cranking' messages on one platform, when you really expect them to come from another.

The 'correct' solution, in your case, is NOT to change the message flow. You should set the CCSID and Encoding, to the expected sending platform values, when you PUT your test message.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » Problem with packed fields (SOLVED)
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.