Hi!
If I have to merge the two files in between the stage - suppose the transformation is over and now before loading the data into the repository i wanna add some records into the same file through the flat file,but constraint is" in a same job" ,so can it be possible under one job not using
before Job subroutine and after job subroutine ,any option .
Plz. do suggest
Hemant
Merge two files in between the job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Assuming that you are referring here to two text files, the answer is no.
This is not a DataStage restriction, it is an operating system restriction. The operating system will not permit simultaneous writers to a file.
In theory you could add a second Transformer stage to add the extra lines to the file, but where do these come from, and how do you synchronize with the primary stream of data?
Your choices are:
This is not a DataStage restriction, it is an operating system restriction. The operating system will not permit simultaneous writers to a file.
In theory you could add a second Transformer stage to add the extra lines to the file, but where do these come from, and how do you synchronize with the primary stream of data?
Your choices are:
- write the two files separately and use an after-stage routine to merge them (maybe cat file1 file2 > file3 executed via ExecSH is sufficient for your needs)
use an after-stage subroutine in the Transformer stage that loads the lines into the text file; you will need to segregate the processing that loads the file into the target database
use three jobs controlled by a sequence; one job loads the initial lines, the second job loads the extra lines, and the third job populates the target database
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks ray ....its works.
thanks again .
Regards
Hemant
thanks again .
Regards
Hemant
ray.wurlod wrote:Assuming that you are referring here to two text files, the answer is no.
This is not a DataStage restriction, it is an operating system restriction. The operating system will not permit simultaneous writers to a file.
In theory you could add a second Transformer stage to add the extra lines to the file, but where do these come from, and how do you synchronize with the primary stream of data?
Your choices are:
- write the two files separately and use an after-stage routine to merge them (maybe cat file1 file2 > file3 executed via ExecSH is sufficient for your needs)
use an after-stage subroutine in the Transformer stage that loads the lines into the text file; you will need to segregate the processing that loads the file into the target database
use three jobs controlled by a sequence; one job loads the initial lines, the second job loads the extra lines, and the third job populates the target database