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

Recreating a corrupted generation of GDG


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

New User


Joined: 15 Sep 2006
Posts: 4
Location: Pune

PostPosted: Thu Jan 11, 2007 9:53 am
Reply with quote

Hi,

Suppose I have the following generations

A.B.C.D.G0001V00 -> created on Monday
A.B.C.D.G0002V00 -> created on Tuesday
A.B.C.D.G0003V00 -> created on Wednesday
A.B.C.D.G0004V00 -> created on Thursday
A.B.C.D.G0005V00 -> created on Friday

If for some reason i come to know that the data in the file created on Tuesday is corrupted and I have to DELETE the same. After deletion, I want to recreat the same generation (A.B.C.D.G0002V00). Is it possible? How? Please help!

Many Thanks...
Back to top
View user's profile Send private message
krishnareddymsc

New User


Joined: 08 Jan 2007
Posts: 9
Location: Bangalore

PostPosted: Thu Jan 11, 2007 10:48 am
Reply with quote

upto my knowledge, we can delete a GDG generation...but we cant create a gdg with the same version.....can any bdy give any suggestions....
icon_smile.gif
Back to top
View user's profile Send private message
Ladha
Warnings : 1

New User


Joined: 15 Sep 2006
Posts: 4
Location: Pune

PostPosted: Thu Jan 11, 2007 11:00 am
Reply with quote

Hi,

See the question here is "After the delete job is over, can we recreate the same generation somehow"
Before the job is finished, I am pretty sure that we can create the generation with giving (-3) instead of (+1)...
Hope that clarifies my question further...

Thanks.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 11, 2007 11:17 am
Reply with quote

This would be a perfect opportunity to catalog a dataset with a version number change. So, instead of deleting A.B.C.D.G0002V00, just catalog a dataset for the same generation with a new version, i.e. A.B.C.D.G0002V01.

Optionally, you could first delete A.B.C.D.G0002V00, then catalog a replacement as A.B.C.D.G0002V00.

Quote:

I am pretty sure that we can create the generation with giving (-3) instead of (+1)...


No, you can't.
Back to top
View user's profile Send private message
Ladha
Warnings : 1

New User


Joined: 15 Sep 2006
Posts: 4
Location: Pune

PostPosted: Thu Jan 11, 2007 11:46 am
Reply with quote

Hi,

Can you please further elaborate! As to why I can't give (-3) in the same job, say in the next step after the delete step.
e.g.

step01 -> A.B.C.D(-3),disp=delete
step02 -> A.B.C.D(-3),disp=(new,catlg,delete)

I think this should create the required generation again...

Thanks.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 11, 2007 11:56 am
Reply with quote

This is from Chapter 3.10.3 Relative Generation Number of the z/OS V1R7.0 DFSMS Using Data Sets Manual:

Quote:

Though any positive relative generation number can be used, a number greater than 1 can cause absolute generation numbers to be skipped. For example, if you have a single step job, and the generation being cataloged is a +2, one generation number is skipped. However, in a multiple-step job, one step might have a +1 and a second step a +2, in which case no numbers are skipped.


It's hard to say for absolutely sure. Did a test prove out your theory?
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Thu Jan 11, 2007 12:29 pm
Reply with quote

Hi Ladha,
In stead of giving
step01 -> A.B.C.D(-3),disp=delete
step02 -> A.B.C.D(-3),disp=(new,catlg,delete)

you can try below code. You skip step01 which deletes the dataset
and directly use step02 and in step02 u can give DISP=OLD,

it would be like

step02 -> DD DSN=A.B.C.D.G0002V00,disp=old

Here I assume you dont want update other versions of GDG and want to change only the 2nd version.

Let me know if it worked or not.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 11, 2007 9:04 pm
Reply with quote

Hello,

If you have not already deleted the "bad" file, you should be able to write over it - specify the output DD with the fully qualified dsn and DISP=OLD. . .
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 DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
No new posts How can I get Generation Nbr of GDG f... IBM Tools 1
No new posts Sequence number generation for multip... DFSORT/ICETOOL 2
Search our Forums:

Back to Top