Job Status Message

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
bharatmajeti
Participant
Posts: 13
Joined: Mon Feb 18, 2008 7:28 am

Job Status Message

Post by bharatmajeti »

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.
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Re: Job Status Message

Post by blewip »

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.
Modern Life is Rubbish - Blur
bharatmajeti
Participant
Posts: 13
Joined: Mon Feb 18, 2008 7:28 am

Post by bharatmajeti »

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)
Nothing but something
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Post by blewip »

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)
If the sequences that are not Restartable are run through a master sequence that always resets, no script is required.
Modern Life is Rubbish - Blur
bharatmajeti
Participant
Posts: 13
Joined: Mon Feb 18, 2008 7:28 am

Post by bharatmajeti »

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
Nothing but something
Lohit Iti
Participant
Posts: 2
Joined: Thu May 12, 2011 5:21 am
Location: India

Post by Lohit Iti »

blewip wrote:
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)
If the sequences that are not Restartable are run through a master sequence that always resets, no script is required.
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...
Thanks & Regards

Lohit Iti
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

U isn't trying to solve this; bharatmajeti is. The second person personal pronoun in English is spelled "you", not "u".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply