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 GDG file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Delete GDG file
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 17, 2010 2:48 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 17, 2010 3:06 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jun 17, 2010 3:27 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 17, 2010 3:47 pm    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jun 17, 2010 5:02 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 18, 2010 4:21 pm    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jun 18, 2010 5:02 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 18, 2010 5:15 pm    Post subject:
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    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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