I have a situation wherein I need to use the same Sequential file as the source , do some transformations and then load this data into the same sequential file which will have the updated data for the next run.
You're in a very bad situation, then. How would you do it with any other software? Seriously - all you can do is write to a temporary file then, once the job has completed, delete the source file and rename the temporary file. Or use different directories.
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 wrote:You're in a very bad situation, then. How would you do it with any other software? Seriously - all you can do is write to a temporary file then, once the job has completed, delete the source file a ...
I thought of this, but I was thinking if this is possible with DataStage...
I have a situation wherein I need to use the same Sequential file as the source , do some transformations and then load this data into the same sequential file which will have the updated data for the next run.
Please help...
Create 2 jobs ,in first job take one temporary file as target and use same file as source in next job and load into u r original sequential file.
I have a situation wherein I need to use the same Sequential file as the source , do some transformations and then load this data into the same sequential file which will have the updated data for the next run.
Please help...
Create 2 jobs ,in first job take one temporary file as target and use same file as source in next job and load into u r original sequential file.
... thanks.... ...but i need to do this in a single job.
What the responders have alluded to, but not stated explicitly, is that a sequential cannot be read from and written to at the same time. This has nothing at all to do with DataStage but is an inherent limitation of the sequential file type on all operating systems.
So the suggestions all try to work around that limitation in some manner. I like renaming the original file from X to Y and then writing output from the DataStage job to X, then deleting the file Y when the job finishes successfully. There are many variations on this theme possible. You can use the Before and After job subroutine calls to perform these renaming and deleting options.
ArndW wrote:What the responders have alluded to, but not stated explicitly, is that a sequential cannot be read from and written to at the same time. This has nothing at all to do with DataStage but is an inherent limitation of the sequential file type on all operating systems.
So the suggestions all try to work around that limitation in some manner. I like renaming the original file from X to Y and then writing output from the DataStage job to X, then deleting the file Y when the job finishes successfully. There are many variations on this theme possible. You can use the Before and After job subroutine calls to perform these renaming and deleting options.
Thanks ...I thought of using the Before and After job subroutine calls to perform the renaming and deleting the file ...but I was told that this can be achieved in some other way too ... So I thought may be if anybody has a different way of working towards this could suggest the same... anyways thank you all for the help ...