Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Delete a dataset which is opened by other user

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Delete a dataset which is opened by other user
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: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 03, 2014 11:05 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1775
Location: Bloomington, IL

PostPosted: Thu Jul 03, 2014 11:31 pm    Post subject:
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: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jul 04, 2014 1:11 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10309
Location: italy

PostPosted: Fri Jul 04, 2014 6:03 pm    Post subject: Reply to: Delete a dataset which is opened by other user
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    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 Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Delete IMS remote transaction when MO... Sam Singh IMS DB/DC 0 Wed Aug 23, 2017 9:12 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us