a lilltle complex scenario...plz help

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
arnie_nits
Participant
Posts: 101
Joined: Mon Aug 13, 2007 2:32 am

a lilltle complex scenario...plz help

Post by arnie_nits »

Hi,

I have got a complex scenarion. The below the the sample source data.

Items Date transit value($) on hand value($)

Shocks 01/02/08 0 1
casual wear 01/02/08 1 0
underwear 02/02/08 2 2
sports wear 01/02/08 5 9

now, all the DATE values should be same. If there is a mismatch( as in the above case),the whole set of records must go to the error file. Again If there is a Zero in either of the $ value columns (i.e transit val and on hand val), the whole set of record must go to the SAME error file.

Please suggest me any idea as to how to proceed.

Thanks and regards,
Arnie.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Are you asking the framework or solution to identify whether to reject or not?

What is the source? If db, you can do in SQL.

'uniq -c' on second column and a 'grep -c' on 3rd and 4th column (combined) can do.

Alternatively, an 'awk' through the data must solve your issue.
Post Reply