Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how can jcl delete the ps even if it is in exclusive lock

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nabarun

New User


Joined: 27 Apr 2005
Posts: 13
Location: india

PostPosted: Tue Jan 09, 2007 3:58 pm    Post subject: how can jcl delete the ps even if it is in exclusive lock
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jan 10, 2007 4:52 am    Post subject:
Reply with quote

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
View user's profile Send private message
nabarun

New User


Joined: 27 Apr 2005
Posts: 13
Location: india

PostPosted: Wed Jan 10, 2007 10:07 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jan 11, 2007 6:04 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm
No new posts Delete VSAM File Records amitc23 CICS 6 Sun Apr 10, 2016 10:10 am
No new posts DB2 Stored Procedure - Dynamic SQL - ... GuyC DB2 2 Wed Feb 17, 2016 5:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us