Which Job is using the VSAM dataset?

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Previous topicNext topic

Topic Author
Kapil Sharma
Registered Member
Posts: 40
Joined: Sun Sep 29, 2013 1:46 am
Location: India

Which Job is using the VSAM dataset?

Post by Kapil Sharma » Wed Dec 13, 2017 6:12 pm


One Job in production is abended for because of a VSAM dataset, as it was in contention. How can I know which job was using that dataset? Is there a way to find this that which job all jobs were using a VSAM dataset in for such an abended job?


User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1353
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: Which Job is using the VSAM dataset?

Post by Robert Sample » Wed Dec 13, 2017 6:26 pm

Once the job has abended, there is no way to know what other jobs / TSO users / started tasks had contention on the VSAM data set. While the contention is occurring, the D GRS console command can be used by someone at your site with sufficient authority to find out what is in contention for the data set. However, this command only works while the contention is there -- if your job abends, the command will not work to show past contention.

There are multiple ways to fix this issue: adding a DD statement with the VSAM data set using DISP=OLD is the most common solution. However, you could also change the SHAREOPTIONS when defining the data set as long as all programs accessing it use appropriate ENQUEUE and DEQUEUE mechanisms.

Previous topicNext topic