dsjob Command - Handling Error Scenario
Posted: Thu Aug 25, 2016 4:00 am
Dear All,
Another day, another request for suggestions and help.
I am trying to create a UNIX script to trigger the jobs. These scripts would then be scheduled to run as per the requirements. I have encountered some trouble with certain scenarios and would like the advice of the experts here.
Please note that I am basically testing out error scenarios.
Background:
1. All the jobs that will be triggered through this script will be sequencers with restartability options enabled. (All the 4 properties in the Job properties & exception handling is also in place).
2. A conscious decision has been made not to reset any jobs from the script since it would remove the restartability capability of the jobs. In case where we definitely need to reset, it would be done by the Support team.
3. Sequencers have parameter sets with different value files for each environment. The value file name is read from a text file in the script.
Scenario:
1. Execute the job with an invalid value file name. The job is aborting as expected and returns the code 3.
2. The director seems to be in Aborted Status and not in Aborted/Restartable status.
3. On triggering the script again after providing the correct value file name, the jobs is not getting triggered and exiting with status code of -2 (DSJE_BADSTATE).
4. I assumed that this might be the case, Since we are not resetting the job, the job is not proceeding with the successful execution.
5. Same issue does not seem to happen if the underlying job fails for some reason in which case the job
Kindly help me understand the behaviour in such a case. Also if there is anyway we can handle such a scenario in the job ?
Is there any other scenarios that we need to handle in our script like 255, 1002 etc ?
Thank you for all the help in advance.
Cheers,
RBK
Another day, another request for suggestions and help.
I am trying to create a UNIX script to trigger the jobs. These scripts would then be scheduled to run as per the requirements. I have encountered some trouble with certain scenarios and would like the advice of the experts here.
Please note that I am basically testing out error scenarios.
Background:
1. All the jobs that will be triggered through this script will be sequencers with restartability options enabled. (All the 4 properties in the Job properties & exception handling is also in place).
2. A conscious decision has been made not to reset any jobs from the script since it would remove the restartability capability of the jobs. In case where we definitely need to reset, it would be done by the Support team.
3. Sequencers have parameter sets with different value files for each environment. The value file name is read from a text file in the script.
Scenario:
1. Execute the job with an invalid value file name. The job is aborting as expected and returns the code 3.
2. The director seems to be in Aborted Status and not in Aborted/Restartable status.
3. On triggering the script again after providing the correct value file name, the jobs is not getting triggered and exiting with status code of -2 (DSJE_BADSTATE).
4. I assumed that this might be the case, Since we are not resetting the job, the job is not proceeding with the successful execution.
5. Same issue does not seem to happen if the underlying job fails for some reason in which case the job
Kindly help me understand the behaviour in such a case. Also if there is anyway we can handle such a scenario in the job ?
Is there any other scenarios that we need to handle in our script like 255, 1002 etc ?
Thank you for all the help in advance.
Cheers,
RBK