by Robert Sample » Tue May 10, 2016 7:03 pm
Raja190, I think you have a serious misunderstanding. A job will not ABEND for file contention. If the job needs a data set and that data set is allocated exclusively to another job (or TSO user or started task), the job will wait for the data set. Similarly, if another address space has the data set allocated and the job needs exclusive access to the data set, the job will wait. The job could wait forever, potentially. However, to prevent some unknown number of jobs hanging around waiting for access to data sets, there is a wait time out set by the system. After that amount of time expires, if the job has not been able to start executing, the job is ABENDED. The reason for the ABEND, technically, is that the time out was exceeded -- NOT because of data set contention.
Also, you MAY be able to find out what was holding a data set by looking at the SMF 77 records. However, if you have never done anything with SMF data you need to find someone in your site support group to help you as most sites do not allow application programmers access to the SMF data, and it can be very difficult for a novice to understand the format of the SMF data. Plus, it is not a requirement that your site keep type 77 records -- only someone in your site support group can tell you for sure whether or not they are kept.