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.
Post Reply
Kapil Sharma
Registered Member
Posts: 52
Joined: Sun Sep 29, 2013 1:46 am
Location: India

Which Job is using the VSAM dataset?

Post by Kapil Sharma »

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: 1885
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Which Job is using the VSAM dataset?

Post by Robert Sample »

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.
Kapil Sharma
Registered Member
Posts: 52
Joined: Sun Sep 29, 2013 1:46 am
Location: India

Re: Which Job is using the VSAM dataset?

Post by Kapil Sharma »

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: 1885
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Which Job is using the VSAM dataset?

Post by Robert Sample »

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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

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