Page 1 of 1

help needed in generating logic

Posted: Mon Sep 19, 2011 1:19 pm
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

Posted: Mon Sep 19, 2011 3:36 pm
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.

Posted: Mon Sep 26, 2011 12:32 pm
by e1994264
Hi i am getting data from the database table and i am generating the rec_types

Posted: Mon Sep 26, 2011 2:59 pm
by ray.wurlod
Generating how? What are the specifications?

Posted: Thu Sep 29, 2011 10:08 am
by e1994264
ray.wurlod wrote:Generating how? What are the specifications?
Hi,
Rec_types means P0001, P0002.....etc

Posted: Thu Sep 29, 2011 4:28 pm
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.