View previous topic :: View next topic
|
Author |
Message |
nabarun
New User
Joined: 27 Apr 2005 Posts: 13 Location: india
|
|
|
|
HI,
I hv a query about the following JCL
//XYZ EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//PDS DD DSN=userid.NABA.COB,DISP=SHR
//SYSIN DD *
ALLOC DDN(ABC) SHR REUSE DSN ('userid.NABA.COB' )
DELETE userid.NABA.COB(ABC) FILE(PDS)
/*
//
IF WE USE THE ABOVE JCL THEN WE CAN DELETE THE PS EVEN IF SOMONE USING IT(EXCLUSIVE CONTROL).
HOW IS IT POSSIBLE???? THEN WHT IS THE MEANING OF EXCLUSIVE LOCK?????? PLZ EXPLAIN ME
when i run the JCL i opened the file in edit mode by using 3.4 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What do you want to happen if the dataset IS in use - or do you mean the member?
If you replace the IDCAMS step with IEFBR14/IEBGENER step(s) you can do whatever you need and will be protected if the dataset is in use.
Quote: |
HOW IS IT POSSIBLE???? THEN WHT IS THE MEANING OF EXCLUSIVE LOCK?????? |
Most likely this happened because you allocated the dataset with SHR. If you want an exclussive lock, try OLD. You also mentioned:
Quote: |
IF WE USE THE ABOVE JCL THEN WE CAN DELETE THE PS EVEN IF SOMONE USING IT(EXCLUSIVE CONTROL).
|
This is not really a PS, but a member of a PO (partioned organization - PDS).
If i totally missed the question, please let me know and i'll try again. |
|
Back to top |
|
|
nabarun
New User
Joined: 27 Apr 2005 Posts: 13 Location: india
|
|
|
|
hi dick,
by using 3.4 if we open a member in edit mode and try to delete it from another screen it will give "dataset in use". so when the above jcl runs why it is not giving the same message?? and logically speaking this should delete the member. it should also give "dataset in use". and could you plz explain me the JCL step
ALLOC DDN(ABC) SHR REUSE DSN ('userid.NABA.COB' ) and wht is it doing actually..
regards,
nabarun |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Nabarun,
Quote: |
ALLOC DDN(ABC) SHR REUSE DSN ('userid.NABA.COB' ) and wht is it doing actually.. |
This statement allocates the named dataset for use in "this" utility step. Changing the 'SHR' to 'OLD' may prevent the deletion, but may "wait" until it is canceled or the dataset is released online.
Is this an experiment or is there something you need to do?
Is there a chance that the IDCAMS ran on a different mainframe (do you have shared dasd?)? I've seen places where cross-system dataset enqueues had problems. |
|
Back to top |
|
|
|