On Mon, 5 Dec 2005 11:01:19 -0600, Alan Schwartz
<[EMAIL PROTECTED]> wrote:

>We've had many times that our Customers IDCAMS DELETE statements fail due
>to a
>DATASET IN USE condition.  We would like to somehow trigger a GRS display
>or perform
>a GQSCAN at the time this occurs but have been unable to find a way to
>intercept this
>condition to see who has the enqueue on the dataset in question.

I'm not fully understanding what you're trying to accomplish. But assuming
you just want to produce a trail at the time of failure, you could add a
conditionally executed step that issues the operator command "D GRS,RES=
(SYSDSN,xxx)".

If you're trying to ensure that you can get an exclusive enqueue for the
dataset before delete, you could include a dd stmt for the dataset. Of
course, you could do the delete using DISP and skip the IDCAMS delete
altogether.

If you need something fancier, you could wrap the IDCAMS call in a rexx
exec that tries to allocate the dataset before deleting, You could also
parse the output from the D GRS cmd in this exec if that was useful.

-Rob

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to