Hi,
In the job mainframe can't define a reject link, in job server i mark the check box.. but in the mainframe what is the choice ???
Miguel Seclen
Lima - Peru
Constraint in Job Mainframe,
Moderators: chulett, rschirm, roy
Miguel,
DataStage XE/390 Job Developer's Guide (pn# - 00D 005DS60) pp's 14 - 16 of the Transformer Stages section outlines how to handle rejects very nicely.
In short, you have to define a constraint that will test the variable REJECTEDCODE for any link that should cause a reject (whether it is a constraint or DBMS reject).
If you are testing a link to a relational database then do the following -
Define a link to a relational DB
Define a link to a flat file log and in the flat file log link constraint you could do the following -
linkname.REJECTEDCODE = DSE_TRXLINK
This would test for a DBMS error. You could also trap the error and send it down the log link by defining an additional column and setting the value of that column to -
linkname.DBMSCODE
Hope this helps, but also please review the developer's guide.
Regards,
Michael Hester
DataStage XE/390 Job Developer's Guide (pn# - 00D 005DS60) pp's 14 - 16 of the Transformer Stages section outlines how to handle rejects very nicely.
In short, you have to define a constraint that will test the variable REJECTEDCODE for any link that should cause a reject (whether it is a constraint or DBMS reject).
If you are testing a link to a relational database then do the following -
Define a link to a relational DB
Define a link to a flat file log and in the flat file log link constraint you could do the following -
linkname.REJECTEDCODE = DSE_TRXLINK
This would test for a DBMS error. You could also trap the error and send it down the log link by defining an additional column and setting the value of that column to -
linkname.DBMSCODE
Hope this helps, but also please review the developer's guide.
Regards,
Michael Hester
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard! :D
Just use the expression Michael showed you in the post prior to yours as a constraint expression in the Transformer stage, on a separate output link that is for handling rejected rows. Of course, that link must lead somewhere, such as another flat file.
Just use the expression Michael showed you in the post prior to yours as a constraint expression in the Transformer stage, on a separate output link that is for handling rejected rows. Of course, that link must lead somewhere, such as another flat file.
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.
-
- Premium Member
- Posts: 87
- Joined: Sat Jul 14, 2007 2:24 pm
Error handling
Hi
I want to design a job that inserts rows into DB2 by using a relational stage,
Whenever a row rejected from the database for any reason, I want to write this row into a file that collects the rejected rows,
I use the offer reminded here (linkname.REJECTEDCODE = DSE_TRXLINK) on the constraint for the link of the file,
but only the first row is written into it, and then the program aborts.
Is there any way for me to determine when the program aborts and when not ?
I want to design a job that inserts rows into DB2 by using a relational stage,
Whenever a row rejected from the database for any reason, I want to write this row into a file that collects the rejected rows,
I use the offer reminded here (linkname.REJECTEDCODE = DSE_TRXLINK) on the constraint for the link of the file,
but only the first row is written into it, and then the program aborts.
Is there any way for me to determine when the program aborts and when not ?
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers