Reject records in using seq. files

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
marc_brown98
Premium Member
Premium Member
Posts: 67
Joined: Wed Apr 14, 2004 11:33 am

Reject records in using seq. files

Post by marc_brown98 »

I have 1 input file and 2 hash lookups. I want to direct records that have a 0 for account number into my reject file and the rest go to the next transformer. Rows are being written to the reject file and the next transformer, ie it puts them into both locations. For example, my log will indicate:
125179 rows read from inRecs
125177 rows read from CC_lkup
125179 rows read from cal_day_lkup
125177 rows written to outRecs
17537 rows written to badStg

I only want to process good records. I am using a constraint right now to avoid warning messages being issued. I use 2 stage variables and check to see if either = 0, if so, they go to badStg. Any thoughts?

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

Post by ray.wurlod »

Use a constraint expression on each output link.

For good rows, col1 <> 0 And col2 <> 0.
For the rejects link, col1 = 0 Or col2 = 0.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
marc_brown98
Premium Member
Premium Member
Posts: 67
Joined: Wed Apr 14, 2004 11:33 am

Post by marc_brown98 »

Thanks Ray, I will do so.
Post Reply