Can we DELETE all the Generations of a GDG at once, WITHOUT
deleting the GDG itself ?

Answers were Sorted based on User's Feedback



Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ? ..

Answer / kalone

Yes , we can do that by using following step :

//step1 dd pgm=iefbr14
//gdggen dd dsn=base-gdg-file,DISP=(MOD,DELETE,DELETE)

The above code will delete all the generations except the
base GDG.TO delete base GDG you need to use IDCAMS.

Is This Answer Correct ?    20 Yes 3 No

Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ? ..

Answer / kranthi kumar m

yes,we can,by pressing d infront of command prompt before
all generations but we can't delete gdg base directly, if we
want delete base use syntax like dis,
//sysin dd *
delete (base-name) purge
/*
//

Is This Answer Correct ?    9 Yes 5 No

Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ? ..

Answer / deepak narasappa

During such scenario..always create dummy GDG version at
the end of job.. SO whenever your job runs, atleast one
dummy file will be present and also you can avoid abend..

Is This Answer Correct ?    3 Yes 1 No

Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ? ..

Answer / dedicated_programmer

Thanks Kranthi,
And Using Purge or Force will delete the GDG Base as well as
all the generations of the GDG. While Using Delete without
any option DELETS only the INDEX of the GDG.
Could you please help in sorting out whether there is a way
to DELETE ONLY ALL THE GENERATIONS OF THE GDG WITHOUT
DELETING THE BASE, "USING JCL".

Is This Answer Correct ?    2 Yes 1 No

Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ? ..

Answer / dedicated_programmer

Thanks for completing the answer, Kalone.

Is This Answer Correct ?    4 Yes 3 No

Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ? ..

Answer / bobie kamahuha bobzy

Do the following;

//p gxxxxxx
gxxxxxx
gxxxxxx
gxxxxxx
gxxxxxx
gxxxxxx
// gxxxxxx



Make sure the *//* are properly arrigned

Is This Answer Correct ?    1 Yes 1 No

Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ? ..

Answer / sam

I am facing problems while deleting all GDG versions except
base using IEFBR14. My job fails when I try to execute
IEFBR14 with my GDG base having no versions, causing
problems in my job flow.

I want to delete all gdg versions if they exist otherwsie
my job should execute fine.

Can anyone suggest solution for this?

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More JCL Interview Questions

IN-STREAM DATA NOT ALLOWED IN PROC how can come out from this problem

7 Answers  


I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

0 Answers  


If Region=0k means What Happen?

2 Answers   IBM,


How to find the number of duplicates in a file using Sort?

4 Answers   Fidelity,


What are steplib and joblib?

0 Answers  






what is d/f b/w sysout & sysprint

4 Answers   TCS,


What is the purpose of include statement in a JCL?

2 Answers  


What is the difference between primary and secondary allocations for a dataset?

8 Answers  


how to do automated restart when a job abends?

0 Answers   IBM,


The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The DISP in the JCL is SHR and the program opens the file in EXTEND mode. What happens ?

3 Answers  


1) max no of steps with jcl job can execute 2) how many extentions r possible in sequencial files with job 3) what is set parameter will do 4)how to get syntax errors without sub 5) what is differ between error and abend 6) hw mvs knows who submitted the job and whoom it has to forward 7) what are the positinal parameters of data descripter

1 Answers   L&T,


When cursor is not closed what is the error?

3 Answers   IBM,


Categories