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 » modifying the outputroot within a procedure?

Post new topic  Reply to topic
 modifying the outputroot within a procedure? « View previous topic :: View next topic » 
Author Message
novice
PostPosted: Thu Sep 29, 2005 5:50 am    Post subject: modifying the outputroot within a procedure? Reply with quote

Apprentice

Joined: 20 Jun 2005
Posts: 37

hi everybody!

within my esql project there is a sequence of statements that are used a lot of times. i want to place them in a procedure that i can use within all the flows.

the context is the following one:
i read records from a db and create per record a message.
then i've to modify a value of the properties tree and create a minimal mqmd header. for this purpose i use these statements, that work fine if there are not placed into a procedure.

SET OutputRoot.Properties.ReplyIdentifier = MQCI_NONE;
SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
SET OutputRoot.MQMD.StrucID= MQMD_STRUC_ID;
...
...

these are exactely the statements that i want to put in a procedure.
i tried to do this in different ways and no one is working
alway a exception is thrown when the message arives to the mqoutput node.

here two examples:

DECLARE rOutputRoot REFERENCE TO OutputRoot;
CALL SetHeaders(rOutputRoot);
...
...
...
1)

CREATE PROCEDURE SetHeaders(INOUT rOutputRoot REFERENCE) BEGIN

SET rOutputRoot.Properties.ReplyIdentifier= MQCI_NONE;
SET rOutputRoot.MQMD.Version= MQMD_CURRENT_VERSION;
SET rOutputRoot.MQMD.StrucID= MQMD_STRUC_ID;

END;

or 2)

CREATE PROCEDURE SetHeaders(INOUT rOutputRoot REFERENCE) BEGIN

CREATE NEXTSIBLING OF rOutputRoot.Properties NAME 'MQMD'
SET rOutputRoot.Properties.ReplyIdentifier= MQCI_NONE;
SET rOutputRoot.MQMD.Version= MQMD_CURRENT_VERSION;
SET rOutputRoot.MQMD.StrucID= MQMD_STRUC_ID;

END;

by the way, i'm using wbimb 5, csd 5. any suggestions, ideas?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 29, 2005 5:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What is the exception that is thrown?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Sep 29, 2005 6:02 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Look at mgk's post here:
http://www.mqseries.net/phpBB2/viewtopic.php?t=24036&highlight=
and see if it helps.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
mgk
PostPosted: Thu Sep 29, 2005 6:42 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

Although the post of mine mentioned above explains what IN, OUT and INOUT directions mean for references, it does not answer your question directly.

However, another post of mine here http://www.mqseries.net/phpBB2/viewtopic.php?t=10595&highlight=outputroot+reference does answer your problem, which is that a reference to OutputRoot is not the same as OutputRoot itself.

In your example 2 below, you need to use the DOMAIN clause on the CREATE to create an MQMD parser (an maybe a Properties parser as well (if you have deleted the auto-created one)). Or (if the procedure is created at module scope) just use OutputRoot itself (as it is really just an implicitly declared Module Level variable and so is always in scope at Module level in V5 (not 2.1 tho) ).

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
novice
PostPosted: Fri Sep 30, 2005 1:42 am    Post subject: Reply with quote

Apprentice

Joined: 20 Jun 2005
Posts: 37

thanx

it works if i create the mqmd the following way:

CREATE NEXTSIBLING OF rOutputRoot.Properties DOMAIN 'MQMD';

instead of

CREATE NEXTSIBLING OF rOutputRoot.Properties NAME 'MQMD';
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 » modifying the outputroot within a procedure?
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.