Creation of GDG files with relative generation numbers

General discussion on the JZOS batch launcher and toolkit
Post Reply
kedel
Posts: 2
Joined: Wed Jul 19, 2006 4:32 am
Location: Stuttgart, Germany

Creation of GDG files with relative generation numbers

Post by kedel »

Hi,

I want to create a new GDG generation using ZFile with a relative number e.g. (+1). If I try to create a second generation using (+1) again in the same java program but the created file handle points still to the same generation not to a new one. So I am not able to create new generations without stopping the program. I allways overwrite my first created generation.

How can I solve this problem?

DFSMS documentation says "use absolute numbers". But how can I get the absolute GDG number of the last generation?

Has someone experience with the readDSCB() Method?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

You might try dynamically allocating a DD using ZFile.bpxwdyn and then opening the DD with ZFile. Then after closing the file, free the DD. This should allow you to create a new generation.
kedel
Posts: 2
Joined: Wed Jul 19, 2006 4:32 am
Location: Stuttgart, Germany

Post by kedel »

Thanks, it works.

Note: You need the BPXWDYN module of at least z/OS version 1.6!

And how can I get the real name or absolute generation of the DD?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

There is currently not a method for getting the real dataset name of a file opened via a DD. This will be added in the future. I'm not sure about the absolute generation number. How does one usually get this?
Post Reply