Page 1 of 1

Constraint in Job Mainframe,

Posted: Tue Aug 12, 2003 2:51 pm
by jseclen
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

Posted: Tue Aug 12, 2003 4:24 pm
by mhester
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

Posted: Wed Mar 01, 2006 7:19 am
by natan66
hi,
i have a mf job and i want capture all the rows that didn't met the constraints in previous links. i want to use
the rejectedcode variable.

Posted: Wed Mar 01, 2006 8:17 am
by ray.wurlod
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.

Error handling

Posted: Thu Aug 28, 2008 5:57 am
by asaf_arbely
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 ?

Posted: Thu Aug 28, 2008 7:01 am
by chulett
:!: This has nothing to do with the original posted topic and this kind of 'hijack' is frowned upon. Please start a new post in proper forum so we have all your particulars i.e. if you are talking Server or PX job, version number, O/S, etc.