Author |
Message
|
gakd1987 |
Posted: Tue Sep 03, 2013 9:26 am Post subject: Calling a ESQL procedure |
|
|
Apprentice
Joined: 20 Aug 2013 Posts: 26
|
Hi My ESQL flow present in GenerateCommutaion.esql file is too long and pretty difficult to interpret so I thought of putting few procedures in a different files like GenerateCommutaion1.esql & GenerateCommutaion2.esql . Is it possible to invoke a procedure or define a procedure outside the main file GenerateCommutaion.esql and also in the different files like GenerateCommutaion1.esql & GenerateCommutaion2.esql ? If I am right I cannot create a module so that I can place these callable procedures.. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Sep 03, 2013 9:38 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Why are you putting all your code in one file? Each Compute node should have its own unique file. You should be using unique package names. ESQL procedures are callable from other ESQL functions by specifying the path or qualifying the proc name with package name. You should never use 'default' as the package name for anything. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 03, 2013 10:19 am Post subject: Re: Calling a ESQL procedure |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gakd1987 wrote: |
Is it possible to invoke a procedure or define a procedure outside the main file GenerateCommutaion.esql and also in the different files like GenerateCommutaion1.esql & GenerateCommutaion2.esql ? |
It is possible & those are stupid names. ESQL is almost identical to other languages in the way source code can be distributed.
gakd1987 wrote: |
If I am right I cannot create a module so that I can place these callable procedures.. |
If you're right that this is possible then you claim it's not possible to create a module? You're contradicting yourself; if you're right it's possible, if you're wrong it's not possible.
You're right, it is possible and I can't believe you needed to ask such an obvious question. Even if you didn't know this (and how can you not know how to break up source code) 10 seconds of experimentation would have given you the answer. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Sep 03, 2013 10:42 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
lancelotlinc wrote: |
Why are you putting all your code in one file? Each Compute node should have its own unique file. You should be using unique package names. ESQL procedures are callable from other ESQL functions by specifying the path or qualifying the proc name with package name. You should never use 'default' as the package name for anything. |
It might be considered bad practice to:-
-Put all your code in one file
-Not using unique package names
-Using 'defaults' for schemas and package names.
It all depends upon the 'best practices' and development standards defined for your site/customer
There fixed it for you. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Sep 03, 2013 10:46 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
smdavies99 wrote: |
lancelotlinc wrote: |
Why are you putting all your code in one file? Each Compute node should have its own unique file. You should be using unique package names. ESQL procedures are callable from other ESQL functions by specifying the path or qualifying the proc name with package name. You should never use 'default' as the package name for anything. |
It might be considered bad practice to:-
-Put all your code in one file
-Not using unique package names
-Using 'defaults' for schemas and package names.
It all depends upon the 'best practices' and development standards defined for your site/customer
There fixed it for you. |
Well done. Thanks ! What's your fav fish & chips place again? We should have a pint. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Sep 03, 2013 12:37 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
lancelotlinc wrote: |
Well done. Thanks ! What's your fav fish & chips place again? We should have a pint. |
Solve the riddle of my location and I'll tell you. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mgk |
Posted: Tue Sep 03, 2013 12:47 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
Solve the riddle of my location and I'll tell you. |
http://www.madeley.org.uk/t-blists.php
Kind 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 |
|
 |
smdavies99 |
Posted: Tue Sep 03, 2013 9:55 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
you have obviously been there then! As I once upon a time used to program in Bliss I though the riddle was a good one. The Chippy there isn't bad either. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mgk |
Posted: Wed Sep 04, 2013 1:23 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
you have obviously been there then! |
I'll confess. I have not been there, I simply "binged" the words "inclined hay blist bedlam" and that link was the first one. Sorry if I ruined your riddle
Kind 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 |
|
 |
|