The chances of two jobs writing to the file are slim and none I am searching a large number of files because I cannot find the data
And most importantly it is NOT a production job thanks -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Jeremy Nicoll Sent: Friday, March 26, 2021 9:13 AM To: [email protected] Subject: Re: Dataset contention On Fri, 26 Mar 2021, at 12:38, Joseph Reichman wrote: > The output file is shared among multiple jobs whenever I get an equal > condition I open put and close That won't work if two jobs simultaneously try to write to the file. You might not destroy the file, but you will lose the information that the second job tried to write to it. The jobs need (a) not to allocate the output dataset at all in the JCL (b) to have a retry loop that does something like the following when you want to write data out repeat try to get exclusive use of the results file if that fails and we've tried many times, perhaps write the data somewhere else? - though that might also fail stop trying end if exclusive use isn't acquired but we've not tried often, wait a bit (a random time interval) and try again if exclusive use was granted, update the file, free it again, and stop trying end -- Jeremy Nicoll - my opinions are my own. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
