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

Delete GDG file


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

New User


Joined: 15 Jun 2009
Posts: 28
Location: bangalore

PostPosted: Thu Jun 17, 2010 2:38 pm
Reply with quote

Hi All,

How do I delete GDG files.
I have used the following command ...

DELETE 'ABC.ABCTABLE.BASE.BKUP' GDG FORCE

It is working fine when here is no generations created.

If there are any generations created I am facing following error.
IDC2054I INVALID AUTHORIZATION TO EXECUTE FUNCTION

Please advise.
How do I delete GDG file if there are any generations created...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 17, 2010 2:48 pm
Reply with quote

/RANT ON

When talking about GDS it is important to use the correct terminology, as both version and generation are both valid in terms of a GDS.

It is a well known fact that only one version of a GDS may exist at any one time, however, multiple generations may exist together.

Please learn and use the correct terminology when posting, as using the wrong term can cause confusion and possibly delay a resolution to your problem

/RANT OFF

What have you actually tried for yourself before posting.

You know that if no GENERATIONS exist, then the delete of the base will work. What does that lead you think that the course of action should be.
Back to top
View user's profile Send private message
brahmanandarm

New User


Joined: 15 Jun 2009
Posts: 28
Location: bangalore

PostPosted: Thu Jun 17, 2010 2:55 pm
Reply with quote

Hi,

I have tried with

DELETE 'ABC.ABCTABLE.BASE.BKUP' GDG FORCE PURGE
DELETE 'ABC.ABCTABLE.BASE.BKUP' GDG FORCE

Job has failed with following error...

INVALID AUTHORIZATION TO EXECUTE FUNCTION
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 17, 2010 3:06 pm
Reply with quote

brahmanandarm wrote:
INVALID AUTHORIZATION TO EXECUTE FUNCTION
Yes, we know that, it is standard practice to restrict the use of these parameters to the general user community because of the damage that your average user can do if allowed to use powerful commands. But that is not the problem.

In your original post you stated one important fact that you had found out for yourself. You can delete a GDG base when no generations exist, but you can not delete the base when generations do exist.

Now, given the fact that you are unauthorised to use the powerful option to delete a GDG base when generations exist, what do you think that you need to do to be able to delete the base definition.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 17, 2010 3:27 pm
Reply with quote

Unfortunately, there are a lot of suggestions on GOOGLE to use DELETE GDG FORCE -- clearly from people who don't understand the consequences. FORCE is almost always a bad option. And most of the shops, as Expat has also said, have locked it down this option. Locking it down will not prevent GDG deletions; it will prevent their being deleted the wrong way.

IBM specifically warns that HSM cleanup action is required when using the FORCE parameter, because it will strand (or “orphan”) migrated data sets. IBM also provides the means to lock down the ‘DELETE GDG FORCE’ command to prevent such issues - and most possibly your shop is one of such shops - and hence, you get INVALID AUTHORIZATION TO EXECUTE FUNCTION when you try this option.

Suggest you don't try it again - usually Storage-people are not as "polite" as "our expat" is. icon_biggrin.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 17, 2010 3:47 pm
Reply with quote

Anuj Dhawan wrote:
Suggest you don't try it again - usually Storage-people are not as "polite" as "our expat" is. icon_biggrin.gif
But Expat IS a storage person icon_lol.gif

I have tried to get the OP to think for themself ................ I await with anticipation
and a copy of War and Peace icon_lol.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Jun 17, 2010 5:02 pm
Reply with quote

There is a simple way to do this using one command twice in slightly different formats --as documented in the AMs for ICF manua, which can even be reached by clicking on the manuals link at the top of the page.

Hint: FORCE is not required.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jun 18, 2010 4:21 pm
Reply with quote

Robert Sample wrote:
FORCE is not required.
But it is better when it's with you icon_lol.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jun 18, 2010 5:02 pm
Reply with quote

I've always wondered if there's a Dark Side to the force, there must be a Light Side -- so where's the gray?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jun 18, 2010 5:15 pm
Reply with quote

Robert 'Darth' Sample wrote:
-- so where's the gray?
Unfortunately mainly on my head icon_cry.gif
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Fri Jun 18, 2010 6:50 pm
Reply with quote

I hope you want to delete the GDG base along with its generation. if yes, try this:
Code:

//IDCAMS01 EXEC PGM=IDCAMS       
//SYSUDUMP DD SYSOUT=*           
//SYSOUT   DD SYSOUT=*         
//SYSPRINT DD SYSOUT=*           
//SYSIN    DD *                   
  DELETE ("FILE1".*)             
  DELETE ("FILE1")               
/*
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts DELETE SPUFI DB2 1
Search our Forums:

Back to Top