Help with logic

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
Hope
Participant
Posts: 97
Joined: Sun May 13, 2007 2:51 pm
Contact:

Help with logic

Post by Hope »

Hi
The data looks in a file looks like this

Acct_No Site
111 1000
111 1100
111 1200
111 1300
222 1100
222 1300
333 1300
444 1000
444 1300
555 1000
555 1100

I have to check if Acct_No exists in all the 4 sites 1000,1100,1200,1300 .

ex 111 is there in all Sites so I dont want this record in my out put file
222 doesn't exist in Sites 1000 and 1200 so my out put should have

222 1200
222 1000

so overall my Output file should look like this.
Acct_No Site
222 1000
222 1200
333 1100
333 1200
333 1000
444 1100
444 1200
555 1200
555 1300

Please suggest.
jib
Participant
Posts: 4
Joined: Thu Jan 09, 2003 4:37 pm
Location: India

Re: Help with logic

Post by jib »

Hi Hope,

Though I dont have a solution, here is one suggestion. Creata an additional file (File B) containing 4 sites (1000, 1100, 1200, 1300). Make a full outer join between your source file (File A) and file B on the site and check the output which may help to get the required output by the using a filter/transformer.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Server job (as posted) or parallel job (as marked)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Count rows < 4 => write to target
Post Reply