Constraint in Job Mainframe,

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
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Constraint in Job Mainframe,

Post 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
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post 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
natan66
Participant
Posts: 3
Joined: Thu Sep 29, 2005 1:45 pm

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
asaf_arbely
Premium Member
Premium Member
Posts: 87
Joined: Sat Jul 14, 2007 2:24 pm

Error handling

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

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply