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 » MQBroker Esql abt using reference variable

Post new topic  Reply to topic
 MQBroker Esql abt using reference variable « View previous topic :: View next topic » 
Author Message
kevinmark99
PostPosted: Mon Apr 01, 2013 5:31 am    Post subject: MQBroker Esql abt using reference variable Reply with quote

Newbie

Joined: 29 Mar 2013
Posts: 8

I am failry new to WMB and im from java background..

In java we use reference variables we pass reference and make changes on the original object.

In WMB i would like to do the same thing.. i would like to modify two reference vairables and get back the modified refrence objects.
I dont know how to intialize them finally after lot of struggle i found this


Code:
DECLARE abcRefNonNull REFERENCE TO env.Variables.TEMP;
CALL setnotnull(abcRefNonNull , inroot);


I want to have two or three varibles like this...but all of them refer to TEMP if i use the same as above ...i dont want that...can anyonr please please please help....


Last edited by kevinmark99 on Mon Apr 01, 2013 5:34 am; edited 1 time in total
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Apr 01, 2013 5:33 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9472
Location: US: west coast, almost. Otherwise, enroute.

Moved to MB forum.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Apr 01, 2013 5:38 am    Post subject: Re: MQBroker Esql abt using reference variable Reply with quote

Grand High Poobah

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

kevinmark99 wrote:
In WMB i would like to do the same thing.. i would like to modify two reference vairables and get back the modified refrence objects.


You can't.

ESQL is not an object orientated language. The reference variable is a reference to a location in one of the broker maintained message trees not a discrete object. You can modify the location the reference points to, and you can move the location being pointed to, but you're still referencing a message tree (the Environment tree in the example you quote).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 01, 2013 5:39 am    Post subject: Re: MQBroker Esql abt using reference variable Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

kevinmark99 wrote:
I am failry new to WMB and im from java background..

In java we use reference variables we pass reference and make changes on the original object.

In WMB i would like to do the same thing.. i would like to modify two reference vairables and get back the modified refrence objects.
I dont know how to intialize them finally after lot of struggle i found this


Code:
DECLARE abcRefNonNull REFERENCE TO env.Variables.TEMP;
CALL setnotnull(abcRefNonNull , inroot);


I want to have two or three varibles like this...but all of them refer to TEMP if i use the same as above ...i dont want that...can anyonr please please please help....


Yes, references work pretty much the same way. If you read the InfoCentre, you can find out the details. If you attend the training, an instructor can guide you. A reference points to a particular location in a logical message tree; so it is not the same as a Java reference.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fak01020_.htm

http://www-304.ibm.com/services/learning/content/ites.wss/us/en?pageType=course_description&courseCode=WM664

http://www-304.ibm.com/services/learning/content/ites.wss/us/en?pageType=course_description&courseCode=WM674
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
kevinmark99
PostPosted: Mon Apr 01, 2013 5:40 am    Post subject: Reply with quote

Newbie

Joined: 29 Mar 2013
Posts: 8

Thanks Vitor!!!

Its clear to me now i will proceed in line of using that TEMP in environment effciiently ...
Back to top
View user's profile Send private message
kevinmark99
PostPosted: Mon Apr 01, 2013 7:02 am    Post subject: Reply with quote

Newbie

Joined: 29 Mar 2013
Posts: 8

Is there any other TEMP Variable that can be used either in outputLocalEnvironment?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 01, 2013 7:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

kevinmark99 wrote:
Is there any other TEMP Variable that can be used either in outputLocalEnvironment?


Yes.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Apr 01, 2013 8:24 am    Post subject: Reply with quote

Grand High Poobah

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

kevinmark99 wrote:
Is there any other TEMP Variable that can be used either in outputLocalEnvironment?


There's no TEMP variable supplied with the product; this is something you've defined for yourself. You can define as many as you like, and can place them in any of the supplied message trees according to how you intend to use them or in your ESQL code if you wish.

I repeat; you're not using an object, you're using a location.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » MQBroker Esql abt using reference variable
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.