reject file

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
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

reject file

Post by dodda »

Hi

In my job i am producing two rejectfiles with same filename for both the rejectfiles. The file write mode for both of them is Append.
The data to the two reject files varies.
In the end it seems like i am missing some data in the final reject file.
once I have given the different file name for both the reject files then i could see the data.the problem is only when i write the two rejects to a single file with append mode.

Any help would be appreciated

Regards
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

On any platform, any programming language, or any tool, its a big no no to have multiple processes write to the same file, results are unexpected as you have experienced. Sometimes it will, outright, blow up. So avoid it.
Continue writing to seperate files and in the after job subroutine, you can pass an OS level cat command to combine the files
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

Assuming that the same shared file was open at your box and that of your peer's. Now, imagine the consequences of both trying to update ("if you could") the same file at the same time.

:idea: :idea: :!: :!:
gateleys
Post Reply