Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
Posted: Fri Jan 19, 2007 4:48 am Post subject: Way to find whether the data set is being used by TSO or JOB
Hi,
In our production environment, certain jobs are taking long time because some data sets it is trying to access are being browsed or edited by TSO users. Using "D GRS.." command we can find the contention job name, but is there any way we can find apart from the batch job, the other user is a TSO ID or another batch job itself ??
I have assembler rexx to take the output of "D GRS.." command to find if it is a TSO ID using the MVS control blocks, but the problem is we have a sysplex, so the control block will not provide the information if the TSO ID is active on the other Lpar of the Sysplex.
Any type of help is appreciated. I also cannot use "D TS,L" or "D J,L" to find if the other user of "D GRS.." output is TSO ID as it is very CPU intensive. Kindly advise.
Regards,
- Amit. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
Posted: Sat Jan 20, 2007 10:11 pm Post subject:
Hi Kolusu,
Thanks for the response. But, this is part of our automation which we are running under AF/Operator-an automation tool provided by IBM Tivoli. The TSO rexx functions like ISRDDN,OUTTRAP, etc. are not supported for REXX running under AF/Operator.
Just to give you a brief backgroupd, what we actually do is af/operator runs as a started task and it traps the contention message issued by job in the system log and based on the data set name captured from this message, issue the command to find out who all are using the data set in the subject. Now, if any TSO ID is using this data set, we just want to take some action. But we are not able to find out this information from any single command like "D GRS.." as it mentions all the users as "JOBNAME" in the output of "D GRS,RES=(SYSDSN,datasetname)"
Is there any shorter way to find out whether any TSO ID is using the data set apart from the job ?? Like getting the JOBNAMEs from "D GRS.." and using some shortcut to find if its a TSO ID ??
Thanks for the response.
Regards,
- Amit. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Sun Jan 21, 2007 12:53 am Post subject:
You can write your own query program using the GQSCAN macro. That is what ISRDDN, QDS, the various WHOHAS commands etc use. I'm not sure how it will perform in a multisystem environment. If you want a starting point, see the QUERYENQ function at http://sillysot.com/ftp/queryenq.txt which is a Rexx function to get ENQs without a TSO requirement.
Note that this code is a sample and is not intended to be production quality because it never underwent a formal test. But it should give you a basis of where to look for how to create such a program.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum