Hi All,
Here is my requirement.
I need to call shell script and email notification from after job subroutine.
i.e ExecSH and DSSendMail funtions. Please suggest.
Thanks®ards
venu
How can i call two subroutine functions after job finishes.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 49
- Joined: Sat Mar 26, 2005 12:19 am
Here's a little routine that I use, routine name is RunMutlipleRoutines.
Feel free to change if required, but basically the routines being run should be delimited by '+' and any input arguments should be delimited by ' ' (space).
e.g. RunMutlipleRoutines(myRoutine1 InputArg+myRoutine2 InputArg)
Code: Select all
#Include DSINCLUDE JOBCONTROL.H
ErrorCode = 0 ; * set this to non-zero to stop the stage/job
RDel = "+"
ADel = " "
ProgList = CONVERT(RDel,@FM,InputArg)
ProgCount = DCOUNT(ProgList,@FM)
FOR i = 1 To ProgCount UNTIL ErrorCode
ProgData = ProgList<i>
ProgName = 'DSU.':TRIM(FIELD(ProgData,ADel,1))
ProgArg = TRIM(FIELD(ProgData,ADel,2,9999))
CALL @ProgName(ProgArg,ErrorCode)
NEXT i
IF Not(ErrorCode) THEN RETURN
CALL DSLogWarn('Error code ':ErrorCode:' returned from Routine call to ':ProgName,'RunBeforeJobRoutines')
e.g. RunMutlipleRoutines(myRoutine1 InputArg+myRoutine2 InputArg)