There is a "WHOHAS" TSO command which is probably on CBT.
Command:
tso whohas 'sys1.proclib'
response is:
SYS1.PROCLIB
JOB_NAME SCOPE SYS_NAME TYPE STATUS JOBTYPE ASID
-------- ------- -------- ---- -------
------- ----
TSOUSR1 System SYSA SHR Using TSU 01B5
***
Then you can decide whether to send a message to free the data set, or just to
cancel the TSO session.
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of John McKown
Sent: Thursday, July 07, 2016 10:05 AM
To: [email protected]
Subject: Re: Command to display Enqueue
On Thu, Jul 7, 2016 at 9:51 AM, FRISBIE, JIM <[email protected]> wrote:
> Is there a system command that will show if a specific file is enqueued?
> And even better, who holds the enqueue? We have a nightly batch job
> that backs up a file on System-A and then restores it on System-B.
> About once a month a TSO user (almost always the same Operator) will
> have that file open, DFDSS can't get an exclusive enqueue and issues
> RC=8. If it can be determined whether the file is in use before the
> job is run, the Operator won't run the job and I won't get a phone
> call at midnight. Even though the documentation says "Fill out a
> Problem Report and DON"T CALL ANYBODY" the Operator persists in calling.
>
> My sleep and the life of the Operator are at risk, any help would be
> greatly appreciated.
>
I cheat. I put an IEFBR14 step at the end of the job with:
//ENQUEUE EXEC PGM=IEFBR14
//STOPIT DD DISP=SHR,DSN=dsn.to.reserve
I also put SHARE TOL(ENQF) in my DFDSS control cards if all I'm doing is a
non-critical back up.
>
>
> Jim Frisbie
> Sr Systems Programmer
> 919-831-4711
>
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."
From "Star Nomad" by Lindsay Buroker:
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN