Page 1 of 1

reject file

Posted: Fri Feb 29, 2008 12:36 pm
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

Posted: Fri Feb 29, 2008 1:52 pm
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

Posted: Fri Feb 29, 2008 2:42 pm
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: :!: :!: