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 » Best Practice on HUGE number of Variable usages

Post new topic  Reply to topic
 Best Practice on HUGE number of Variable usages « View previous topic :: View next topic » 
Author Message
mymq
PostPosted: Fri Jun 22, 2007 4:51 am    Post subject: Best Practice on HUGE number of Variable usages Reply with quote

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
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Jun 22, 2007 4:56 am    Post subject: Reply with quote

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
View user's profile Send private message
mymq
PostPosted: Fri Jun 22, 2007 5:23 am    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

Thankx a lot jeff. I appreciate youe help.
_________________
--SRK--
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Fri Jun 22, 2007 6:42 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Fri Jun 22, 2007 9:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Best Practice on HUGE number of Variable usages
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.