abort Job & Archive

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

abort Job & Archive

Post by edward_m »

ALL,

How do we abort a job after 1 warning i.e how do we set up this in job level,my project is setup abort job after 50 warnings.

and also i need to archive the source file after succesfull job completion,suggest me how to do that?

Thanks..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Multiple ways. What stages are you using? Some have a check box to 'Treat Warnings as Fatal', that would do it. If you are using reject rows to capture issues, they can be set to abort after X rows - set that to 1. How are you actually running these jobs? The command line dsjob can take a -warn option to override your defaults, have it pass in a 1 there.

Oh, and archive? Define what 'archive' means to you. The typical answer will be by using a script or batch file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

Can you build a job sequencer for that. If yes,you can can achieve this with a job like

JobActivity---Sequencer(ALL Mode) Then Delete the file
|
sequencer(ANY mode)
|
Notification Activity
|
Routine Activity(where you may have call a routine which will abort the job after 1 warning)


One way of doing it..

Thanks,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Kind of late to abort at that point, job would have already finished. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Post by edward_m »

chulett wrote:Multiple ways. What stages are you using? Some have a check box to 'Treat Warnings as Fatal', that would do it. If you are using reject rows to capture issues, they can be set to abort after X rows - set that to 1. How are you actually running these jobs? The command line dsjob can take a -warn option to override your defaults, have it pass in a 1 there.

Oh, and archive? Define what 'archive' means to you. The typical answer will be by using a script or batch file.
Actual job contails sequential stage as source and ODBC as target.where do i mention 'Treat Warnings as Fatal'??
My final job is sequencer with original job and notofication activities..if the original job fails i need to send an email notification success/failure
i am planning to run this job using tivoli..dsjob - run <projectname> <jobname>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's why I mentioned 'if available' for that Treat Warnings as Fatal option, not all stages support it. OCI does, ODBC doesn't for example. You may be able to leverage the Error Codes tab of the ODBC stage for that.

Simplest solution would probably be to run your Sequence job from Tivoli, adding "-warn 1" to the command line. The child jobs will inherit that setting from the Sequence job parent.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If you want to do it from designer, you can set it project wide by logging into the director, go to tools, options and set the warning limit to 1 over there.
For command line, pass warn 1 along with the dsjob -run command.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply