Capture Reject Records

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
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Capture Reject Records

Post by bi_fujitsu »

Hi,

I have Server job with the following flow.

Seq. File Stage --------------->Transformer---------------->Dataset

Please let me know how can i capture the reject records from Seq. File Stage.
In parallel job i can have a reject link coming out of Seq. File stage but since this is a server job its not possible.

Please provide me a logic where i can capture all the reject records which does not meet the metadata of my Seq. File Stage.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can't.

Server edition does not have the concept of data types.

You will need to perform any necessary validation testing in the Transformer stage, and create an output link from that which can handle any rows that are not passed to the third stage.

Server jobs do not have the concept of Data Sets, and therefore don't have a Data Set stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Post by bi_fujitsu »

Thanks Ray,

My problem is that if say there are 10,000 records in the source file with pipe as delimiter then if there is are few records where pipe is a part of value its causing the whole job to abort.

and it becomes very difficult to identify those few culprit records.

Isn't there a way to separate those records and process the remaining clean records.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

bi_fujitsu wrote:Thanks Ray,

My problem is that if say there are 10,000 records in the source file with pipe as delimiter then if there is are few records where pipe is a part of value its causing the whole job to abort.

and it becomes very difficult to identify those few culprit records.

Isn't there a way to separate those records and process the remaining clean records.
As Ray said, you can read the complete line in one column and try to identify those records in transformer and if It doesn't fit your requirement send it to other link as a rejected records.

Regards,
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Add a dummy column at the end with "Replace" with blank. If this contains value at any time, reject it in the transformer.
velagapudi_k
Premium Member
Premium Member
Posts: 142
Joined: Mon Jun 27, 2005 5:31 pm
Location: Atlanta GA

Post by velagapudi_k »

Or you can try this aprroach. If you have 'n' columns, you should be having 'n-1' delimiters(Pipes in your case). Count the number of delimters
using a routine. If there are more than n-1, then reject those records.
Venkat Velagapudi
Post Reply