Hi,
I had ticked the check box "Add check points so that the job is restartable" in a sequencer Job properties. So the Job is able to restart from the point where it got aborted.
here we have a generic script for running datastage job. After running the datastage job, we are capturing the status and resetting the job if it is aborted.
The problem came when we have a restartable sequencer, where we need to start from the restart point, instead of starting from the beginning. so i need to differentiate the status "Aborted/Restartable", from the status "Aborted", so that i can apply reset strategy in second case.
i tried using job status, but it is giving 3 only in both the cases.
can anybody help me in differentiating above two job status messages, so that when the job is in "Aborted/Restartable" state, i will leave it as such, so that it can start from restart point. If the jobs is in "Aborted" state, i will reset it.
Thanks
Bharath.
Job Status Message
Moderators: chulett, rschirm, roy
Re: Job Status Message
I believe it is the Sequence that is re-startable, not the job. The job will typically get re-set anyway.
I don't think a job can abort half way through processing records and then on restart finish off the records that it hasn't processed.
On restart the job starts from the begining again.
I don't think a job can abort half way through processing records and then on restart finish off the records that it hasn't processed.
On restart the job starts from the begining again.
Modern Life is Rubbish - Blur
-
- Participant
- Posts: 13
- Joined: Mon Feb 18, 2008 7:28 am
I'm not sure how to differentiate those two just by checking the status code, you might ping your official support provider and see what they say. Worst case, I think you should be able to take an aborted Sequence and use "dsjob -jobinfo" to get the full text version of its status, then grep for "Restartable" in that output.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
If the sequences that are not Restartable are run through a master sequence that always resets, no script is required.bharatmajeti wrote:Hi,
Thanks for your reply, Here i am referring to sequencer job, not the individual job. can you please tell me a way of differentiating sequencer job status as "Aborted/Restartable" (Restartable sequencer) to "Aborted"(Normal Sequencer)
Modern Life is Rubbish - Blur
-
- Participant
- Posts: 13
- Joined: Mon Feb 18, 2008 7:28 am
Hi Chulett,
Thanks for you info. It completed my task. I implemented it in following way.
/apps/Ascential/DataStage/DSEngine/bin/dsjob -jobinfo TTE TTE_SEQ_RPTDB >Job_Restart.txt
Job_Restart=`cat Job_Restart.txt | grep "Job Restartable" | awk -F ":" '{print $2}' | sed s'/ //g'`
if [ $Job_Restart -eq 1 ];
then echo "Job had Restart strategy implemented. exiting with out reset...so that the job will start from restart point\n"
else
echo "Job does nt have any Restart strategy implemented. resetting..." | tee -a $LOG_FILE
/apps/Ascential/DataStage/DSEngine/bin/dsjob -run -mode RESET $Project $JobName | tee -a $LOG_FILE
Thanks for you info. It completed my task. I implemented it in following way.
/apps/Ascential/DataStage/DSEngine/bin/dsjob -jobinfo TTE TTE_SEQ_RPTDB >Job_Restart.txt
Job_Restart=`cat Job_Restart.txt | grep "Job Restartable" | awk -F ":" '{print $2}' | sed s'/ //g'`
if [ $Job_Restart -eq 1 ];
then echo "Job had Restart strategy implemented. exiting with out reset...so that the job will start from restart point\n"
else
echo "Job does nt have any Restart strategy implemented. resetting..." | tee -a $LOG_FILE
/apps/Ascential/DataStage/DSEngine/bin/dsjob -run -mode RESET $Project $JobName | tee -a $LOG_FILE
Nothing but something
If u add restart option in sequence then u will get the status which u have getting , just uncheck that option and try with some other functions from that u will get the status of the job...blewip wrote:If the sequences that are not Restartable are run through a master sequence that always resets, no script is required.bharatmajeti wrote:Hi,
Thanks for your reply, Here i am referring to sequencer job, not the individual job. can you please tell me a way of differentiating sequencer job status as "Aborted/Restartable" (Restartable sequencer) to "Aborted"(Normal Sequencer)
Thanks & Regards
Lohit Iti
Lohit Iti
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: