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 while using message set - URGENT

Post new topic  Reply to topic
 problem while using message set - URGENT « View previous topic :: View next topic » 
Author Message
know_ashu
PostPosted: Mon Oct 17, 2005 11:47 pm    Post subject: problem while using message set - URGENT Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

Hi,
I am trying to use a message set with my message flow (WMQI2.1 on windows), following are the details:-

incoming message: GREG
expected output message: GREG JOHNS 123456

message set used has the following elements with max field length.

ELEMENT NAME FIELD LENGTH
EMP_NAME 10
EMP_NO 6

below is the ESQL:

SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.MessageDomain='MRM';
SET OutputRoot.Properties.MessageSet = 'DV61DBO0FA001';
SET OutputRoot.Properties.MessageType = 'MY_MSG_TYPE';
SET OutputRoot.Properties.MessageFormat = 'CWF';

SET OutputRoot.MRM.EMP_NAME = InputRoot.MRM.EMP_NAME || ' JOHNS';
SET OutputRoot.MRM.EMP_NO = InputRoot.MRM.EMP_NO;

When I am trying to test it, I am getting the following error:
-----------------------------------------------------------------------
Read of a text element failed. Message is too short.
Message data : '0x61736875'
Text element offset : 0
Expected length of element : 10

The reading of a text element of a message failed because the message was too short to contain the expected length of text.
Check that the message model is correct. Review previous messages for details of the message set and message type.
Check that the processed message is of the expected format and type.
-----------------------------------------------------------------------
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Oct 18, 2005 1:39 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

It looks as if your message definition is 10+6 = 16 characters long, but your input message is only 4 characters long. So 'Message is too short' seems like a fairly clear error message!
If you want to parse a short message and output a longer one, you need two message definitions.
Back to top
View user's profile Send private message
know_ashu
PostPosted: Tue Oct 18, 2005 5:21 am    Post subject: Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

message is short...thats right...actually my requirement is like:-
lengths defined are only maximum lengths .. so If any element is shorter in length or blank it should not throw an error.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Oct 18, 2005 5:42 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
If any element is shorter in length or blank it should not throw an error.
That may well be your requirement, but that's not the way the CWF format is supposed to work. CWF uses fixed-length fields or null-terminated strings.
You can achieve your objective by defining two messages - one for the input and one for the output.
Back to top
View user's profile Send private message
know_ashu
PostPosted: Tue Oct 18, 2005 10:39 pm    Post subject: Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

I did it with two message sets...message flow works now...still have the following questions:-

1. for a field e.g. EMP_NAME (max length 10) , if emp_name is 'ASHU' then its putting the following message in output queue:-
'ASHU......' (ASHU with 6 dots when i retrieve the output message using RFHUTILC )
'ASHU ' (ASHU with 6 boxes that could not be copied .. when I use MQ JMS Client to put input and get output message)

2. If for input EMP_NAME (max length 10) :- I just give 'ASHU', i expect that it should accept it and add 6 blank spaces automatically......please let me know if it doesnt work this way?? and the solution...
Thanks for your timely responses.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 19, 2005 3:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What part of "fixed length" do you not understand?

How do you expect the parser to know that "AAAAABBBBB" should be treated as one field that is ten characters long or two fields that have a max length of ten, but only supplied five characters?

Have you considered getting some training on this product? Message Modeling in particular is not easy to pick up on your own.

And we're not here to train you on it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
know_ashu
PostPosted: Wed Oct 19, 2005 7:13 am    Post subject: Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

sorry for bothering u for this...it had the following solution :-

Just to change 'padding Character' to 'Space' instead of 'NUL' in element property of msg set.

Anyway, nice and thanks for your help.
Back to top
View user's profile Send private message
schofier
PostPosted: Wed Oct 19, 2005 7:40 am    Post subject: Reply with quote

Novice

Joined: 10 Dec 2003
Posts: 14
Location: IBM Hursley

That may well help you on output, but its not going to help you on input (parsing) unless your input message also contains the appropriate number of padding characters.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » problem while using message set - URGENT
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.