Author |
Message
|
kevinmark99 |
Posted: Mon Apr 01, 2013 5:31 am Post subject: MQBroker Esql abt using reference variable |
|
|
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 |
|
 |
bruce2359 |
Posted: Mon Apr 01, 2013 5:33 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Mon Apr 01, 2013 5:38 am Post subject: Re: MQBroker Esql abt using reference variable |
|
|
 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 |
|
 |
lancelotlinc |
Posted: Mon Apr 01, 2013 5:39 am Post subject: Re: MQBroker Esql abt using reference variable |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
kevinmark99 |
Posted: Mon Apr 01, 2013 5:40 am Post subject: |
|
|
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 |
|
 |
kevinmark99 |
Posted: Mon Apr 01, 2013 7:02 am Post subject: |
|
|
Newbie
Joined: 29 Mar 2013 Posts: 8
|
Is there any other TEMP Variable that can be used either in outputLocalEnvironment? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Apr 01, 2013 7:05 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Mon Apr 01, 2013 8:24 am Post subject: |
|
|
 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 |
|
 |
|