more than one argument in routines
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 97
- Joined: Tue Feb 21, 2006 6:45 am
more than one argument in routines
Cant we have more than one argument for Before/After Subroutines. If not, they why does the RoutineActivity stage say that it can pass more than one argument?
Hi,
The Arguments are InputArg and ErrorCode, this doesn't mean the InputArg can't be an array of parameters and their values that you can deconstruct to variables inside the routine or use predefined common area variables.
IHTH,
The Arguments are InputArg and ErrorCode, this doesn't mean the InputArg can't be an array of parameters and their values that you can deconstruct to variables inside the routine or use predefined common area variables.
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
Meena, you can specify optional arguments in user routines; but the number of parameters used in Before/After job routines as in the original post is fixed and you cannot change that.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
InputArg receives the contents of the Input Value field from wherever the subroutine was invoked. This might be a delimited string, that can be parsed within the subroutine code.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 97
- Joined: Tue Feb 21, 2006 6:45 am
I used to use job control extensively, but that was before sequences existed, now I think it is better for maintenance purposes to use a before/after routine and pass the parameters via one long dynamic array. DataStage is very, very efficient with strings so I wouldn't worry about the length.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A Routine activity can only access a routine whose type is "transform function". This can have between one and 254 arguments.
A before/after subroutine is intended to be invoked from job or active stage properties; it is never invoked directly from job control/job sequence.
You can, of course, CALL a before/after subroutine (with "DSU." prefix) from any other routine.
A before/after subroutine is intended to be invoked from job or active stage properties; it is never invoked directly from job control/job sequence.
You can, of course, CALL a before/after subroutine (with "DSU." prefix) from any other routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi ArndW,
That's true that we can not use more than the parameters specified in the BEFORE/AFTER Routines.
My reply is a wrong answer to the above question.
That's true that we can not use more than the parameters specified in the BEFORE/AFTER Routines.
My reply is a wrong answer to the above question.
Thank you,Meena, you can specify optional arguments in user routines; but the number of parameters used in Before/After job routines as in the original post is fixed and you cannot change that.