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: 43
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

Hello,

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?


Thanks,
Kapil

User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1379
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.




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

Re: Which Job is using the VSAM dataset?

Post by Kapil Sharma » Sun Jan 28, 2018 6:50 pm

Thanks Robert.

I don't have the authority to issue the D GRS command. I want to learn the ENQUEUE and DEQUEUE mechanism, is there a way I can learn it in test region without harming the existing functionality.


Thanks,
Kapil

User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1379
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 » Sun Jan 28, 2018 9:02 pm

ENQUEUE and DEQUEUE are covered in the CICS Application Programming manuals so you should start reading there. However, if you are testing in A test region, how do you expect to learn how it works? You need at least two regions to be able to use ENQUEUE and DEQUEUE appropriately.



Previous topicNext topic

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”