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 » WMQI V2.1 CSD02 Reference Variables

Post new topic  Reply to topic
 WMQI V2.1 CSD02 Reference Variables « View previous topic :: View next topic » 
Author Message
mverh
PostPosted: Tue May 28, 2002 6:32 am    Post subject: WMQI V2.1 CSD02 Reference Variables Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Has anyone used reference variables when trying to populate an MRM message on output...I have a microflow that xforms a n XML input message to an MRM output message...it all works great...I then try to improve readability and hopefully performance by using a reference variable...

Before:

SET "OutputRoot"."MRM"."MQ_HEADER_V1"."ACAI_STRUCT_ID" = 'ACAI';

===> works!

After:

DECLARE ref_ACAI REFERENCE TO "OutputRoot"."MRM"."MQ_HEADER_V1";
SET "ref_ACAI"."ACAI_STRUCT_ID" = 'ACAI';

===> fails!

Trace shows the following error:

RecoverableException BIP2230E: Error detected whilst processing a message in node 'CUST.INQ.RQ.V0R0M1.CustomerInquireRequestQueue'.
The message broker detected an error whilst processing a message in node 'CUST.INQ.RQ.V0R0M1.CustomerInquireRequestQueue'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2002-05-28 10:41:51.202999 2688 ParserException BIP5354E: MTI internal error: diagnostic information 'parseRightSibling called before RefreshElementFromBitstream'.
An internal software error has occurred in the Message Translation Interface Parser. The diagnostic information associated with this message is: 'parseRightSibling called before RefreshElementFromBitstream'.

Thanks...
_________________
Marc Verhiel
IBM Canada Ltd.
Back to top
View user's profile Send private message
zpat
PostPosted: Tue May 28, 2002 7:06 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

You can only reference existing elements, so use the CREATE or SET statement to make sure they exist before using a reference.
Back to top
View user's profile Send private message
mverh
PostPosted: Tue May 28, 2002 9:44 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

So would coding the following work:

DECLARE ref_ACAI REFERENCE TO "OutputRoot"."MRM"."MQ_HEADER_V1";
SET "OutputRoot"."MRM"."MQ_HEADER_V1" = NULL;
...
SET "ref_ACAI"."ACAI_STRUCT_ID" = 'ACAI';
...

???

I would think not...but how else could I equate my "OutputRoot"."MRM"."MQ_HEADER_V1" to something that would make it valid when the parser attempts to serialize it...
_________________
Marc Verhiel
IBM Canada Ltd.
Back to top
View user's profile Send private message
kirani
PostPosted: Tue May 28, 2002 7:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I guess, if you change the sequence of DECLARE REFERENCE and SET statement then it will work, i.e.

SET "OutputRoot"."MRM"."MQ_HEADER_V1" = NULL;
DECLARE ref_ACAI REFERENCE TO "OutputRoot"."MRM"."MQ_HEADER_V1";
..
SET "ref_ACAI"."ACAI_STRUCT_ID" = 'ACAI';
..

To me following ESQL code looks more readable than above code,
SET "OutputRoot"."MRM"."MQ_HEADER_V1"."ACAI_STRUCT_ID" = 'ACAI';

If you are building an output tree from input tree then you can use REFERENCE to point to input tree and that will increases readability. For example,

DECLARE ref_data REFERENCE TO InputRoot.XML.Tag1.Data;
SET OutputRoot.MRM.DATA = ref_data.Name;

Hope this helps.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
mverh
PostPosted: Wed May 29, 2002 3:15 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Kiran, I agree that the readability is a minor issue with this simple example...but I have numerous fields in the MQ_HEADER_V1 structure that need to be set as well as many in structures that follow the header...so using the reference will help readability when all fields are being set...also I have been led to believe that reference variables improve performance...I haven't tried the change I suggested to see if it works ...when I do I update the thread...
Back to top
View user's profile Send private message
mverh
PostPosted: Fri May 31, 2002 3:24 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Making the changes to the ESQL that sets the reference to NULL doesn't solve this problem...still invesigating...
Back to top
View user's profile Send private message
Yanghui
PostPosted: Wed Jun 05, 2002 1:59 am    Post subject: Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

In the output side, I normally create the field first by the following ESQL:

CREATE FIELD "OutputRoot"."MRM"."MQ_HEADER_V1";
DECLARE ref_ACAI REFERENCE TO "OutputRoot"."MRM"."MQ_HEADER_V1";
SET ref_ACAI."ACAI_STRUCT_ID" = 'ACAI';

BTW, I don't think you need double quote for reference variables.

Hope it helps.

-Yanghui
Back to top
View user's profile Send private message Send e-mail
mverh
PostPosted: Wed Jun 05, 2002 9:37 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Thanks for the tip Yanghui...that worked like a charm...
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 » WMQI V2.1 CSD02 Reference Variables
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.