|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
'DETACH'ing a field under the Environment.Variables tree |
« View previous topic :: View next topic » |
Author |
Message
|
lung |
Posted: Thu May 29, 2008 8:26 pm Post subject: 'DETACH'ing a field under the Environment.Variables tree |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Hey there,
I have a simple question, how do I detach a field from the Environment.Variables tree, so that it doesn't carry forward to the next node?
Simply put, I need a DETACH command that works with the Environment.Variables. While DETACH works for normal XML tags, I read and tested it and it doesn't seem to work with Environment.Variables because Environment.Variables is not really a 'written-able' tree.
Or any other solution to this little problem that I'm having here.
Thanks in advance! |
|
Back to top |
|
 |
AkankshA |
Posted: Thu May 29, 2008 8:45 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
hmmmm
AFAIR detach works for env tree as well...
have a look at delete statement in eSQL
assign the value NULL to that _________________ Cheers |
|
Back to top |
|
 |
lung |
Posted: Thu May 29, 2008 9:32 pm Post subject: |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Ah thanks... DELETE FIELD seems to work perfectly for this.
Another question if I may... How do I delete off multiple occurences of an array?
For example Environment.Variables.ABC[1] and Environment.Variables.ABC[2], instead of issuing a DELETE FIELD Environment.Variables.ABC[1] & DELETE FIELD Environment.Variables.ABC[2] or making a loop to delete both fields, I tried DELETE FIELD Environment.Variables.ABC[] but that throws an exception.
Any ideas? |
|
Back to top |
|
 |
mgk |
Posted: Fri May 30, 2008 1:41 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Code: |
DELETE FIELD Environment.Variables.ABC |
This will delete ABC and ALL children in one go.
For the record, DETACH does work on all the trees (LocalEnvironment, Environment etc).
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 |
|
 |
madhuram |
Posted: Wed Dec 18, 2013 3:24 am Post subject: |
|
|
Newbie
Joined: 22 Nov 2013 Posts: 2
|
If you want to delete or make a field null from the environment
use
SET Environment.ABC[1] VALUE=NULL.
Please correct me if i am wrong |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|