How to find file contention.



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

How to find file contention.

Postby Raja190 » Tue May 10, 2016 5:41 pm

Hi All,

Say for example, I have a job down due to file contention and I would like to know which job/ID was using the file at at the time of abend.
I know who can find what are the all jobs that currently using a file, through whohas or pressing F1 twice when it says 'data set in use'.

is there anyway to find it or any existing internal tool available in mainframe?




Thanks
Raja
Raja190
 
Posts: 36
Joined: Mon Dec 14, 2015 8:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to find file contention.

Postby enrico-sorichetti » Tue May 10, 2016 5:49 pm

from the ispf command line try
TSO ISRDDN ENQ
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: How to find file contention.

Postby Raja190 » Tue May 10, 2016 5:53 pm

Hi Enrico,

Will "TSO ISRDDN ENQ" will find which job was held the file in the past and it caused for job abend due to file contention?
Raja190
 
Posts: 36
Joined: Mon Dec 14, 2015 8:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to find file contention.

Postby enrico-sorichetti » Tue May 10, 2016 6:01 pm

please use Your brain...

after a job has abended, it will NO LONGER hold any dataset

the only possible places to find out about the past history
the job log
the scheduler <logs>(*) for the abends
(*) whatever you scheduler calls them

the command will show the OUTSTANDING/CURRENT ENQs
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: How to find file contention.

Postby 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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to find file contention.

Postby Pedro » Tue May 10, 2016 9:34 pm

RMFWDM will keep a history of dataset contention. That is, it has to be setup to capture it, and then afterwards you can scroll back through the contention information that was captured. I think RMF comes with z/OS, so it should be available on your system.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: How to find file contention.

Postby sam_jj12 » Fri May 20, 2016 10:29 am

Hello raja,
Some shops will have the OMEGAMON installed by MVS for monitoring the job contention.Check with MVS.

Hello Enrico,
Am able to see the dataset which is needed by the job, but pls.let know how to get who is holding that another job/stc/tsu?
sam_jj12
 
Posts: 18
Joined: Sat Nov 21, 2015 12:02 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to find file contention.

Postby willy jensen » Fri May 20, 2016 6:23 pm

If you know the name of the dataset, then SMF types 14 and 15 might help you find who was using the dataset at that time. It is not a 100% solution as there will only be 14s or 15s if the dataset was opened.
willy jensen
 
Posts: 465
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: How to find file contention.

Postby Robert Sample » Fri May 20, 2016 6:36 pm

If you have console access, issue D GRS,C to see the resource contention at the current time. For historical data, the SMF 77 records will probably contain helpful information.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to find file contention.

Postby Terry Heinze » Fri May 20, 2016 9:23 pm

D GRS,RES=(SYSDSN,'datasetname') for a specific dataset contention.
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post