Capture Rejected rows along with its description in rej file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kailas
Participant
Posts: 21
Joined: Mon Nov 17, 2008 11:49 pm
Location: bangalore

Capture Rejected rows along with its description in rej file

Post by kailas »

I have a parallel job to load the data into a table in db2 from the sequential file.
some records are getting rejected from the source sequential file itself .My requirement is along with the rejected records
the decription for the rejected rows like( Delimiter for field "SpecialComments" not found; input: {E x t e r n a l}, at offset: 758)
should also be there in the rejected file. can anyone help me in this regard


Here is my job design

Seq file(source file) ------> Transforer ............> DB2 Table


Seq file(source file)..............> Seqfile (Reject file)



Output

The reject file should contain the rejected records along with the description of the rejection

Can anyone help me out on this problem...

Any solution for this problem is really appreciated.............

Thanks
kj
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Post by DS_FocusGroup »

i think you need to check first line columns names to true so you can properly read the records. :roll: and if you need to capture the rejects from Db2 i think you can drag a reject link out of it
kailas
Participant
Posts: 21
Joined: Mon Nov 17, 2008 11:49 pm
Location: bangalore

Post by kailas »

Hi ,
I have already dragged a reject link to the source and i m getting the rejected rows also in the reject file but the client want rejected rows along with the reason or description of the rejection
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your reject link needs to have sqlcode on it, then you need to look this up against a table of error codes. This could be a sparse lookup back to the DB2 error codes table (for example).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

Post by senthilmp »

Hi sorry for jumping in,

Am also having the same requirement to capture the error field with the error message.

How to capture the error code in the table?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The same way as advised to kailas.
:roll:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply