IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Delete a dataset which is opened by other user


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vinay Pushpala

New User


Joined: 06 Nov 2013
Posts: 21
Location: India

PostPosted: Thu Jul 03, 2014 10:17 pm
Reply with quote

Hi all,
I need to know if there a way to force delete a ps file when it is opened by other users (in view or browse mode). All I know is PURGE option.

For example I use this in a job:
DELETE 'DATASETNAME' PURGE

Could anyone let me know if there any other way to do it ?
Any inputs can be helpful.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 03, 2014 11:05 pm
Reply with quote

WHY do you want to delete a data set opened by another user? This can lead to various problems up to and including corruption of the catalog, rendering the entire LPAR useless.
Back to top
View user's profile Send private message
Vinay Pushpala

New User


Joined: 06 Nov 2013
Posts: 21
Location: India

PostPosted: Thu Jul 03, 2014 11:19 pm
Reply with quote

Hi Robert,
This is a problem I am facing now. I am trying to run a job which delete some data sets. But the message I get is that the data set is open.
I faced the same issue in the past. The delete & purge statement was working until yesterday. The same job is producing an error now.
The DELETE & PURGE might not work always as it is happening now.

And @Robert, yes, you are right about the standards & LPAR. Just wanted to know if there is any other ways to do it.

Thank you.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Jul 03, 2014 11:19 pm
Reply with quote

Delete the user, not the dataset. icon_smile.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Jul 03, 2014 11:31 pm
Reply with quote

Terry Heinze wrote:
Delete the user, not the dataset. icon_smile.gif

I concur. It's a relatively simple thing to find out who has an ENQ on a data set, and to take the appropriate action (anything from a gentle IM to a sarky e-mail to his manager.)

(Incidentally, on my first project mumblety years ago, we used a DG Nova mini for data collection. The command for forcing a logoff was KILL. The operator's manual noted that, as the system could not be shut down if anyone was logged on, it might be necessary to KILL a user icon_biggrin.gif )
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 04, 2014 1:11 am
Reply with quote

Option 1 would be to use DISP=OLD on a DD statement so the job won't execute until the data set can be deleted.

Option 2 would be to manually find who has the ENQ on the data set and knock that user off the system.

The option you do NOT want to use is to attempt to delete the data set while it is in use by someone else.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Jul 04, 2014 1:14 am
Reply with quote

Quote:
The command for forcing a logoff was KILL.
I think one of the old DEC machines used that same command!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jul 04, 2014 6:03 pm
Reply with quote

on the other side... BSD has the BLESS command icon_cool.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
Search our Forums:

Back to Top