Tivoli Schedule
Moderators: chulett, rschirm, roy
Tivoli Schedule
When I am scheduling a job through Tivoli, I am getting an ABEND status in TWS while the datastage job is running successfully.
Then I found out that Tivoli will give a success status only when the job status = 0. But whenever a job in datastage runs successfully, it gives a job status = 1. Can anyone help me out what changes can I make in DataStage and where I can make those changes.
To run the DataStage, I have given the dsjob run command in a batch file which starts the datastage job.
Then I found out that Tivoli will give a success status only when the job status = 0. But whenever a job in datastage runs successfully, it gives a job status = 1. Can anyone help me out what changes can I make in DataStage and where I can make those changes.
To run the DataStage, I have given the dsjob run command in a batch file which starts the datastage job.
Last edited by shyamrai on Fri Jun 08, 2007 9:40 am, edited 1 time in total.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Wrap your dsjob command in a script which catches the exit status and converts 1 (finished OK) and 2 (finished with warning) to 0 and anything else to 1. Or change the rules engine in the Tivoli scheduler so that an exit status of 1 or 2 is "good" for dsjob.
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.
You must be using -jobstatus with your dsjob command, that's what tells it you want an exit code of 1 for OK, 2 for Warnings, etc. You could use -wait instead in the dsjob call for more traditional exit code handling.
Simplest answer is to tell Tivoli what is a good exit status and what is a bad one. We've done that for Control-M and it's trivial - it's just not the default behaviour.
Simplest answer is to tell Tivoli what is a good exit status and what is a bad one. We've done that for Control-M and it's trivial - it's just not the default behaviour.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
The Tivoli job shcedule is used in a lot of other applications. So, do you think status can be applied only to DataStage.
I have used an if command in the batch file through which I schedule it in Tivoli, but I got the below result after the job
Resullt:
Status code=1
=0 was unexpected at this time
Code in batch file
//
echo off
dsjob -run -jobstatus DTR-Reliability MasterSAPPickList
If %jobstatus=1 then %jobstatus=0
else
exit
//
[quote="ray.wurlod"]Wrap your dsjob command in a script which catches the exit status and converts 1 (finished OK) and 2 (finished with warning) to 0 and anything else to 1. Or change the rules engine in the Tivoli scheduler so that an exit status of 1 or 2 is "good" for dsjob.[/quote]
I have used an if command in the batch file through which I schedule it in Tivoli, but I got the below result after the job
Resullt:
Status code=1
=0 was unexpected at this time
Code in batch file
//
echo off
dsjob -run -jobstatus DTR-Reliability MasterSAPPickList
If %jobstatus=1 then %jobstatus=0
else
exit
//
[quote="ray.wurlod"]Wrap your dsjob command in a script which catches the exit status and converts 1 (finished OK) and 2 (finished with warning) to 0 and anything else to 1. Or change the rules engine in the Tivoli scheduler so that an exit status of 1 or 2 is "good" for dsjob.[/quote]
I have contacted the tivoli scheduling team and they have said that it will not be possible for them to set up the status on a case-by-case basis.
Do you think I should be adding any error handling syntax in the code which I have written earlier so that it would change the status at the end of the job.
[quote="chulett"][quote="shyamrai"]The Tivoli job shcedule is used in a lot of other applications. So, do you think status can be applied only to DataStage.[/quote]
Certainly, "they" should be able to do it on a case-by-case basis.[/quote]
Do you think I should be adding any error handling syntax in the code which I have written earlier so that it would change the status at the end of the job.
[quote="chulett"][quote="shyamrai"]The Tivoli job shcedule is used in a lot of other applications. So, do you think status can be applied only to DataStage.[/quote]
Certainly, "they" should be able to do it on a case-by-case basis.[/quote]
-
- Participant
- Posts: 145
- Joined: Fri May 02, 2003 9:59 am
- Location: Seattle, Washington. USA
Batch files, shell scripts - same thing.
I find that very hard to believe. Sometimes that boils down to the fact they either don't know how to do it or simply don't want to do it. I know for a fact that it is trivial in Control-M but (unfortunately) can't speak to the specifics of how that would be done in Tivoli.I have contacted the tivoli scheduling team and they have said that it will not be possible for them to set up the status on a case-by-case basis.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers