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
 

 

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: 7913
Location: Bellevue, IA

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: 1238
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: 1738
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: 7913
Location: Bellevue, IA

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: 1238
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: 10202
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 JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 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 To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts SORT - E15 and E35 using same user ex... Abhi Nature DFSORT/ICETOOL 12 Mon Oct 03, 2016 4:33 pm


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