Best way to abort a job
Moderators: chulett, rschirm, roy
Best way to abort a job
Hi guys
I have a filter that has a Reject link.
If something comes down the Reject link i'd like to write the row to a file and then Abort the job.
The best way I can think of to do this is have:
Filter Stage -- reject link --> Sequential File Stage --> Transformer --> Data Set
In the Transformer I am doing an "Abort after 1 row" in the Constraint. I have to have the Data Set Stage so the Transformer has an output.
Is there a better way to do this?
Cheers
Jon
I have a filter that has a Reject link.
If something comes down the Reject link i'd like to write the row to a file and then Abort the job.
The best way I can think of to do this is have:
Filter Stage -- reject link --> Sequential File Stage --> Transformer --> Data Set
In the Transformer I am doing an "Abort after 1 row" in the Constraint. I have to have the Data Set Stage so the Transformer has an output.
Is there a better way to do this?
Cheers
Jon
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The output from the Transformer stage can go anywhere. If you don't want to keep that row, use a Copy stage with no output. If you simply want it in the job log, use a Peek stage. If you really want the row in a file, use a Sequential File stage. A Data Set is overkill for one row.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The original question was marked "parallel job" and I answered thus.
In both parallel and server jobs forcing an abort will roll back any uncommitted transactions.
Committed transactions have, well, been committed.
In both parallel and server jobs forcing an abort will roll back any uncommitted transactions.
Committed transactions have, well, been committed.
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.
This discomfort comes, only when it is a Parallel Job, on which i came to give enough focus with experimental result. If it is fortunately a Server Job, File Stage can be used to get records after the Transformer Stage which has "Abort after Rows" constraint.ray.wurlod wrote:The original question was marked "parallel job" and I answered thus.
I have no undersatnding of your word here - uncommited transaction and so i need a clarification of what the commit means to act in DataStage rather being mean to write/load records into file/table, because i saw the files, which are defined after our considered Transformer Stage or anywhere, created in the target place but will soon be dispappeared(file writes rolled back) at the end of that aborted Job.ray.wurlod wrote:In both parallel and server jobs forcing an abort will roll back any uncommitted transactions.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You are the only one who thinks it is strange.
If I have to leave my desk to deal with some other emergency, and my session to the database times out (or even if I just switch off my client), any uncommitted transaction will (eventually, in some cases) be rolled back.
If I have to leave my desk to deal with some other emergency, and my session to the database times out (or even if I just switch off my client), any uncommitted transaction will (eventually, in some cases) be rolled back.
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.
I dont find any row in the sequential file and the truth is file is not created in the target place and the reason i given already.ray.wurlod wrote:...If you really want the row in a file, use a Sequential File stage.
Still i have been holding this question "Why File is not created" without answer?
Please share your views.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
Dunno if this adds any value to the discussion but there is an option in the sequential file stage that's titled:
"Clean up on Failure" which is defaulted to true.
Setting it to false may give you some data in the file.
"Clean up on Failure" which is defaulted to true.
Setting it to false may give you some data in the file.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
'The first man'? Dude, it's just you and Ray (as usual) going back and forth. And at this point it's just annoying when you drag threads off on tangents like this.
Why don't we setup an Ram Ruminations topic over in the General forum? That way, when you want to do things like this, you can simply link back to the thread in question as a pointer, perhaps even throw a quote or two in and you can lay it all out there. Whomever wants to jump in can jump in to duke it out, but we keep all of this detritus out of innocent bystander's threads.
Why don't we setup an Ram Ruminations topic over in the General forum? That way, when you want to do things like this, you can simply link back to the thread in question as a pointer, perhaps even throw a quote or two in and you can lay it all out there. Whomever wants to jump in can jump in to duke it out, but we keep all of this detritus out of innocent bystander's threads.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Actually, it does. Thank you for posting that. I assume 'clean up' in this case means remove / delete when the job fails.ameyvaidya wrote:Dunno if this adds any value to the discussion but there is an option in the sequential file stage that's titled:
"Clean up on Failure" which is defaulted to true.
Setting it to false may give you some data in the file.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your first response was
But I ask you for a clear clarification and nothing else.
I dont deny anything here. I am always with you agreeing all the truth you declare.The output from the Transformer stage can go anywhere. If you don't want to keep that row, use a Copy stage with no output. If you simply want it in the job log, use a Peek stage. If you really want the row in a file, use a Sequential File stage. A Data Set is overkill for one row.
But I ask you for a clear clarification and nothing else.