how to read multiple stages in datastage one by one

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
hellboy
Participant
Posts: 34
Joined: Tue Sep 01, 2009 12:22 am
Location: kolkata

how to read multiple stages in datastage one by one

Post by hellboy »

how to read multiple stages in datastage one by one

my req is like i have 3 input file stages with me , where i want to start reading the second input stage only when the 1st get over same for the 3rd when 2nd get over...

is this possible in data stage to di it in same job.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No. It might help to know what's in these three input stages, however, to determine a best course of action for you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
hellboy
Participant
Posts: 34
Joined: Tue Sep 01, 2009 12:22 am
Location: kolkata

Post by hellboy »

input stages are seqfile stages and the data is normal business data ,i just want to check wheater it is possible to read the files one by one .
when ever i m trying to do the testing every time stages start reading on same time ... do i need to setup any constarints to achieve this result.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, they will always run in parallel. Again, why three separate stages? Is the metadata different? Can you not read all three in a single stage using a File Pattern?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Even that may be in parallel.

You need a single File property and a Filter Command to cat the three files together.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Assuming you can. We still don't know the reasoning behind 'needing' three separate stages or the serial processing.
-craig

"You can never have too many knives" -- Logan Nine Fingers
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Assuming you need to do some data validation of each file, and that's the reason you can't combined 3 files into 1 (using cat command etc.) .

you can have a single job with multi instance, to append into a single file, from the three(or more) instance of job.
hellboy
Participant
Posts: 34
Joined: Tue Sep 01, 2009 12:22 am
Location: kolkata

Post by hellboy »

thanks for the valuable suggestions....

no the input meta is different but i need to combine the output in a single file with the common columns from the input files.

so is it not possible in a single job to read one after the other...???
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Server job it is certainly possible and easy to implement.

Parallel , possible, tricky. and probably not very useful.

i don't have PX environment now so can't test.
try this

take the last records from 1st file as refrence input to the second file using lookup stage, so that the second file will wait untill it get the last record from 1st file.
hellboy
Participant
Posts: 34
Joined: Tue Sep 01, 2009 12:22 am
Location: kolkata

Post by hellboy »

thanks keshav,
yes u r right by this way we can go on...

can u please tell us how it is possible in Server job....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

U is not posting in this forum today. And certainly not in this thread. (Though I note that U has made a post today.)

The second person personal pronoun in English is spelled "you". DSXchange is not a mobile telephone nor is there any requirement to limit your messages to 72 or 144 characters. Please maintain a professional standard of written English on DSXchange, not least because it helps those whose first language is not English.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Read 1st file, and write into a sequential file(file_1), and in the output of the file_1 read the 2nd file, and append to file_1 , again in the output read 3rd file and append to File_1
hellboy
Participant
Posts: 34
Joined: Tue Sep 01, 2009 12:22 am
Location: kolkata

Post by hellboy »

Thanks keshav,

Yes you are right by this way we can go on...

Could you please tell us how it is possible in Server job....?


thanks for the guiding me...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

:D
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

hellboy wrote:Could you please tell us how it is possible in Server job....?
Server job questions really belong in the server job forum.

This helps future searchers.
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