|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Best Practice on HUGE number of Variable usages |
« View previous topic :: View next topic » |
Author |
Message
|
mymq |
Posted: Fri Jun 22, 2007 4:51 am Post subject: Best Practice on HUGE number of Variable usages |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Hi Folks,
I got a quick question.
In my interface, i need to have lot many number of variables to be used. Around 125+ variables to be DECLARED and used.
My question here is that:
1) Should i go ahead and DECLARE all the 125+ variables in my ESQL
(OR)
2) Can i use some kind of array, where i can store all the variable names and respective values in that. And later that would be loopped.
Could you please advise me which is u guys feel best practice... _________________ --SRK-- |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 22, 2007 4:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can create a ROW variable, in v6. This creates, essentially, a private tree that will have Name Value children in it, if you create them.
You can use Environment or LocalEnviornment for the same purpose. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mymq |
Posted: Fri Jun 22, 2007 5:23 am Post subject: |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Thankx a lot jeff. I appreciate youe help. _________________ --SRK-- |
|
Back to top |
|
 |
elvis_gn |
Posted: Fri Jun 22, 2007 6:42 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi mymq,
125 variables.....can you paste snippets of your code...
Are u using variables for all mappings ? Create variables inside loops or if statements, if it's scope is only within that...
Regards. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Fri Jun 22, 2007 9:53 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
elvis_gn wrote: |
Hi mymq,
125 variables.....can you paste snippets of your code...
|
Yes, it is quite a lot.
What do you do when you want to change one of them ? You change your code.
Maybe it is better to store this data in database or something similar and in your code just read it and create custom structure.
Can you tell us more about these variables ?
What are these variables ? _________________ Marcin |
|
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
|
|
|
|