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 » output message is not coming as expected

Post new topic  Reply to topic Goto page 1, 2  Next
 output message is not coming as expected « View previous topic :: View next topic » 
Author Message
yellowbee
PostPosted: Fri Apr 27, 2012 12:15 am    Post subject: output message is not coming as expected Reply with quote

Acolyte

Joined: 14 Apr 2012
Posts: 58

As per the fallowing code the output message should be a 5 character data,while debugging it is showing the output as expected but in the target queue the output is same as input message.Why the Output message in target queue is not coming as expected.

DECLARE Text BLOB;
DECLARE Out CHARACTER;
SET Text = SUBSTRING(InputRoot.BLOB.BLOB FROM 5 FOR 5);
SET Out = CAST(Text As CHARACTER CCSID 1208);
SET OutputRoot.BLOB.test = Out;
Back to top
View user's profile Send private message
Esa
PostPosted: Fri Apr 27, 2012 12:38 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Your code is probably copying the input message into output message. The part of the code you did not post.

The code you posted is rubbish and obviously produces no output at all. So what remains in the output message is the copy of the input message.

You should read in the InfoCenter about BLOB domain and CAST function (for a start). There are examples.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Apr 27, 2012 1:01 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Esa is correct - you seem to confused about several things. But I don't know whether the InfoCenter will help - some of your confusion probably comes from a basic misunderstanding of the WMB programming model.

Try this: Take your snippet of ESQL and add a comment to every line explaining
- what data ( syntax element or variable ) it creates/changes
- the data type of the syntax element/variable
- the data type of the data that is being assigned to it

If you get stuck AND you cannot find the answer in the InfoCenter then post a question on this thread.
Back to top
View user's profile Send private message
Esa
PostPosted: Fri Apr 27, 2012 1:24 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Wow, I have a lot to learn from kimbert in the art of nice and friendly replies...
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Apr 27, 2012 1:32 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Esa: You would not need to search very hard to find replies ( by both you and me ) that give the opposite impression. But thanks, anyway.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 27, 2012 3:37 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should also spend some time looking at the compute node that hosts your code, and make sure you understand each and every property that has been set on that node.

And by understand I mean "know what the choices available are, and know why a specific choice has been made".
Back to top
View user's profile Send private message
yellowbee
PostPosted: Fri Apr 27, 2012 2:53 pm    Post subject: Reply with quote

Acolyte

Joined: 14 Apr 2012
Posts: 58

sure jeff long way to go...................


for the above code if the input message is aabbccddee

while debugging the above message in debug mode the output message text is =ccdde

but the message in the target queue aabbccddee instead of ccdde

masters let me know the cause if you find any....................
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 27, 2012 10:56 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Think about this line:
Code:
SET OutputRoot.BLOB.test
and it's meaning and why it does not have any meaning!

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Sat Apr 28, 2012 3:47 am    Post subject: Reply with quote

Grand High Poobah

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

yellowbee wrote:
while debugging the above message in debug mode the output message text is =ccdde


The debugger doesn't always tell the story. A user trace (with judicious Trace node often helps.

yellowbee wrote:
masters let me know the cause if you find any....................


Possible causes:

Your lack of understanding regarding the product
Your inablity to read the advice being posted (on this and your other thread)
Your lack of adequate problem solving methodolgy
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sat Apr 28, 2012 5:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

yellowbee wrote:
sure jeff long way to go...................


for the above code if the input message is aabbccddee

while debugging the above message in debug mode the output message text is =ccdde

but the message in the target queue aabbccddee instead of ccdde

masters let me know the cause if you find any....................


The cause is that you have failed to understand the properties of the compute node.

You will make absolutely no progress on your journey to being competent as a message broker developer until you take the time to learn this.
Back to top
View user's profile Send private message
yellowbee
PostPosted: Sun Apr 29, 2012 8:44 am    Post subject: Reply with quote

Acolyte

Joined: 14 Apr 2012
Posts: 58

Hi masters..
here it is

CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();

DECLARE MAIN CHARACTER;
DECLARE SUBSTR1,SUBSTR2 BLOB;
SET SUBSTR1= InputRoot.BLOB.BLOB;
SET SUBSTR2 = SUBSTRING(SUBSTR1 FROM 5 FOR 5);
SET MAIN = CAST(SUBSTR2 AS CHARACTER CCSID 1208);
SET OutputRoot.XML.DATA = MAIN;

for the above code if give the input message as :- AABBCCDDEE,The output message is:- CCDDE
For this code if we put CALL CopyEntireMessage();,why the output message is same as input message
-----------------------------------------
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();

DECLARE MAIN CHARACTER;
DECLARE SUBSTR1,SUBSTR2 BLOB;
SET SUBSTR1= InputRoot.BLOB.BLOB;
SET SUBSTR2 = SUBSTRING(SUBSTR1 FROM 5 FOR 5);
SET MAIN = CAST(SUBSTR2 AS CHARACTER CCSID 1208);
SET OutputRoot.BLOB.BLOB = MAIN;


For this code why it is throwing wrong type exception,when giving input message as:- AABBCCDDEE
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Apr 29, 2012 10:23 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

yellowbee wrote:

For this code why it is throwing wrong type exception,when giving input message as:- AABBCCDDEE


What is the exception that is thrown that is wrong?
What were you expecting?

Also,
Please encase the code you post in CODE tags. There is a nice list of tags above the box there your type you post
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
yellowbee
PostPosted: Sun Apr 29, 2012 11:11 am    Post subject: Reply with quote

Acolyte

Joined: 14 Apr 2012
Posts: 58

Exception:- Wrong type exception

when putting The input message :- AABBCCDDEE

to this code..... SET OutputRoot.XML.DATA = MAIN;

The output is :- <DATA> CCDDE</DATA>

But when putting the same message for this code.....
......SET OutputRoot.BLOB.BLOB = MAIN;...

it is throwing exception....
I want to know that why it is throwing exception,when ..MAIN.. is assigned
As BLOB DATA,while it is accepting BLOB data as Input message.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Apr 29, 2012 11:39 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

So,

Code:

  SET OutputRoot.XML.DATA = MAIN;

Works

whereas,
Code:

SET OutputRoot.BLOB.BLOB = MAIN;


Is throwing an error.

1) you should not be using the XML domain. It is deprecated. Please use the XMLNSC domain instead.
2) The Datatype of MAIN is what?

What happens when you
Code:

SET OutputRoot.BLOB.BLOB = SUBSTR2;

_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Apr 29, 2012 1:10 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

yellowbee wrote:
Code:

CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
   
 DECLARE MAIN CHARACTER;
 DECLARE SUBSTR1,SUBSTR2 BLOB;
 SET SUBSTR1= InputRoot.BLOB.BLOB;
 SET SUBSTR2 = SUBSTRING(SUBSTR1 FROM 5 FOR 5);
 SET MAIN = CAST(SUBSTR2 AS CHARACTER CCSID 1208);
 SET OutputRoot.BLOB.BLOB = MAIN;



For this code why it is throwing wrong type exception,when giving input message as:- AABBCCDDEE


Well why are you asking? It is plain in your code: a CHARACTER type is what you have in MAIN and you assign it to BLOB without casting to BLOB?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » output message is not coming as expected
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.