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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Fizu

New User


Joined: 15 Jul 2005
Posts: 6
Location: Argentina

PostPosted: Thu Nov 24, 2005 2:57 am    Post subject: delete GDG generation
Reply with quote

I use a +1 GDG (new,catalog,delete) in DD for IDCAMS
and when a repro fails, the generation doesn't delete.

is it possible?

//OUTDD1 DD DSN=MY.GDG.BASE(+1),
//SYSIN DD *
REPRO INFILE(INDD1) OUTFILE(OUTDD1)
/*
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Nov 24, 2005 5:12 am    Post subject: Re: delete GDG generation
Reply with quote

Fizu,

I believe your confusion is in whether the program actually failed in the eyes of the operating system. IDCAMS probably returned a RC=0012, but did not ABEND. If the IDCAMS program were to have abended, the operating system would have deleted the new GDG.

If you need to delete the GDG after a bad return code, you can code the next step to delete the GDG.

Anyone please correct me if I?m wrong.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Nov 24, 2005 11:00 am    Post subject: Re: delete GDG generation
Reply with quote

hi frnd,
i think the GDG will delete when there is OS abend codes. as per our frnd said above u can use the LASTCC or any other coding technique to delete the same.
Back to top
View user's profile Send private message
Fizu

New User


Joined: 15 Jul 2005
Posts: 6
Location: Argentina

PostPosted: Thu Nov 24, 2005 9:00 pm    Post subject:
Reply with quote

ok, but how I made it with a GDG

IF LASTCC = 0 THEN DO
...
END
ELSE DO
DELETE *****
END

what I have to put in the **** to made it delete de current generation of the GDG? I don't know witch generation is. I must use the DD name? How I do that? FILE(OUTDD1) doesn't work
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Nov 25, 2005 5:16 am    Post subject: Re: delete GDG generation
Reply with quote

Try something like below. The newly created datasets are not cataloged until the termination of the job. So all references to the +1 gen in step JS0100 is still +1 throughout the remainder of the JCL. The COND=(0.EQ.JS0100) says to SKIP this step if the condition is true. So, in the case below, you will delete the +1 gen for anything except a RC=0000.


//JS0100 EXEC PGM=IDCAMS
:
:
//OUTDD1 DD DSN=MY.GDG.BASE(+1),
// DISP=(,CATLG,DELETE),
:
//SYSIN DD *
REPRO INFILE(INDD1) OUTFILE(OUTDD1)
/*
//ABND0100 EXEC PGM=IEFBR14,COND=(0,EQ,JS0100)
//DELDD DD DSN=MY.GDG.BASE(+1),
// DISP=(OLD,DELETE,DELETE)
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Mon Nov 28, 2005 11:22 am    Post subject: Delete GDG
Reply with quote

hi frnd,

Quote:
what I have to put in the **** to made it delete de current generation of the GDG?


use the following GDG to delete the current version
Code:

//STEP1 EXEC PGM=IDCAMS
//SYSIN DD*
DELETE(ACCOUNTS.MONTHLY) GDG FORCE
/*


note that v can use either FORCE/PURGE/ nothing... it depends on ur requirement. refer some previous forums for details
Back to top
View user's profile Send private message
Fizu

New User


Joined: 15 Jul 2005
Posts: 6
Location: Argentina

PostPosted: Mon Nov 28, 2005 9:28 pm    Post subject:
Reply with quote

ok, but DELETE(ACCOUNTS.MONTHLY) GDG FORCE deletes the GDG base, isn't it?.
what I need is to delete the last generation
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Tue Nov 29, 2005 11:20 am    Post subject: GDG
Reply with quote

hi frnd,
try this

Code:
      DELETE(ACCOUNTS.MONTHLY(0)) GDG FORCE


i had not used this. try and let me know
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 Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 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 SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
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 How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm

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