call subroutine in after-job subroutine
Moderators: chulett, rschirm, roy
call subroutine in after-job subroutine
Hi,
is it possible to call subroutine in after-job subroutine of job properties? how the statement will be?
what option should choose ?
Thanks 1st.
is it possible to call subroutine in after-job subroutine of job properties? how the statement will be?
what option should choose ?
Thanks 1st.
Hi,
can you please specify more what it is you want to acomplish?
If you mean simply invoke a DS transform routine the answer is:
Yes, but indirectly - meaning you must build a before/after wrapper routine that runs the ds transform rouine and use it there.
depending on the functionality you want to perform you might need more info.
IHTH,
can you please specify more what it is you want to acomplish?
If you mean simply invoke a DS transform routine the answer is:
Yes, but indirectly - meaning you must build a before/after wrapper routine that runs the ds transform rouine and use it there.
depending on the functionality you want to perform you might need more info.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
chooi,
Usually you will write & wish to call DataStage functions (as opposed to before-after subroutines); they allow you to specify as many parameters as you wish. Before/After subroutines have a defined 2-parameter limit, although you can always put multiple values in the one parameter you do have available.
If you write a function AddMe with 2 parameters, a & b and compile it in the Manager then to use it in a before/after subroutine (or another function) you need to include code such as:
The method for calling a subroutine is similar, only you don't need to tell the compiler to define a function, just call
Usually you will write & wish to call DataStage functions (as opposed to before-after subroutines); they allow you to specify as many parameters as you wish. Before/After subroutines have a defined 2-parameter limit, although you can always put multiple values in the one parameter you do have available.
If you write a function AddMe with 2 parameters, a & b and compile it in the Manager then to use it in a before/after subroutine (or another function) you need to include code such as:
Code: Select all
DEFFUN AddMe(a,b) CALLING 'DSU.AddMe'
a = 3
b = 4
c = AddMe(a,b)
Code: Select all
DSU.MyBeforeAfterRoutineName(ParameterValue,ReturnCode)
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Job Parameters are (in almost all cases) enclosed in pound signs or 'hashes' (#) when referenced. The colon is used for concatenation. So, if you simply wanted to refer to a job parameter called DATA, you would do it like this:
If you wanted to include it as part of a string in a command, then something like this might be in order:
Code: Select all
#DATA#
Code: Select all
'Some string ' : #DATA# : ' the rest of the string'
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers