help needed in generating logic

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
e1994264
Premium Member
Premium Member
Posts: 28
Joined: Mon Jul 18, 2011 5:12 pm

help needed in generating logic

Post by e1994264 »

Hi,
we have followiing output files:
FileP0001
REC_TYPE,EMPNO,LOCAATION, ACTION,
P0001,1234,MI,Hire
P0001,2234, MI, REHIRE
P0001,2345,US, Termination


File P0002
REC_TYPE,EMPNO,BASE PAY, JOBTYPE,EFFECTIVEDATE,
P0002, 1234,4000,S,12/31/2006
P0002,2234,30000,H,09/30/2009


Bascially i have 40 REC_TYPE Files like P0001,P0002,P0003,P0004,..P0040
I need to design jobs based on Senarios. Example one senario like ACTION=Hire which is in File P0001. for this senarios i need get the employee with REC_TYPE P0001,p0002,P0003,P0010,P0011, P00039,P0040which are in different file foramt structures

The outpput should be like this
P0001,1234,MI,Hire
P0002, 1234,4000,S,12/31/2006
P0003, 1234,xxx,xxx,xx
P0010, 1234,XXX,XXX
P0011,1234,XX,XXX,XXX,XXX,XXX,XXX,XXXX
P0039, 1234,XX,XXXX,
P0040, 1234,XX,XXXX,XXX,XX,XX,XX,XXX,XXX,...

Please can anybody tell me how to desing the job in DS
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Write the mapping specification for each output column in English (or use FastTrack if you have it).

It's not clear from your examples how each output column is derived from the inputs.

In any case you should learn how to create/use mapping specifications.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
e1994264
Premium Member
Premium Member
Posts: 28
Joined: Mon Jul 18, 2011 5:12 pm

Post by e1994264 »

Hi i am getting data from the database table and i am generating the rec_types
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Generating how? What are the specifications?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
e1994264
Premium Member
Premium Member
Posts: 28
Joined: Mon Jul 18, 2011 5:12 pm

Post by e1994264 »

ray.wurlod wrote:Generating how? What are the specifications?
Hi,
Rec_types means P0001, P0002.....etc
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Assuming all the source files have identical structure, use a Sequential File stage to read them using File Pattern, and have that stage generate the file name into an additional output column.
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